diff --git a/Gemfile.lock b/Gemfile.lock
index 8d041f9e..3f6d7068 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -3,8 +3,8 @@ PATH
specs:
spoom (1.2.4)
erubi (>= 1.10.0)
+ prism (>= 0.19.0)
sorbet-static-and-runtime (>= 0.5.10187)
- syntax_tree (>= 6.1.1)
thor (>= 0.19.2)
GEM
@@ -34,7 +34,6 @@ GEM
parser (3.3.0.5)
ast (~> 2.4.1)
racc
- prettier_print (1.2.1)
prism (0.19.0)
psych (5.1.2)
stringio
@@ -77,8 +76,6 @@ GEM
sorbet (= 0.5.11287)
sorbet-runtime (= 0.5.11287)
stringio (3.1.0)
- syntax_tree (6.2.0)
- prettier_print (>= 1.2.0)
tapioca (0.12.0)
bundler (>= 2.2.25)
netrc (>= 0.11.0)
diff --git a/lib/spoom/deadcode.rb b/lib/spoom/deadcode.rb
index abee7c7d..376ab2d1 100644
--- a/lib/spoom/deadcode.rb
+++ b/lib/spoom/deadcode.rb
@@ -2,8 +2,9 @@
# frozen_string_literal: true
require "erubi"
-require "syntax_tree"
+require "prism"
+require_relative "deadcode/visitor"
require_relative "deadcode/erb"
require_relative "deadcode/index"
require_relative "deadcode/indexer"
@@ -18,10 +19,15 @@
module Spoom
module Deadcode
class Error < Spoom::Error
- extend T::Sig
extend T::Helpers
abstract!
+ end
+
+ class ParserError < Error; end
+
+ class IndexerError < Error
+ extend T::Sig
sig { params(message: String, parent: Exception).void }
def initialize(message, parent:)
@@ -30,23 +36,29 @@ def initialize(message, parent:)
end
end
- class ParserError < Error; end
- class IndexerError < Error; end
-
class << self
extend T::Sig
- sig { params(ruby: String, file: String).returns(SyntaxTree::Node) }
+ sig { params(ruby: String, file: String).returns(Prism::Node) }
def parse_ruby(ruby, file:)
- SyntaxTree.parse(ruby)
- rescue SyntaxTree::Parser::ParseError => e
- raise ParserError.new("Error while parsing #{file} (#{e.message} at #{e.lineno}:#{e.column})", parent: e)
+ result = Prism.parse(ruby)
+ unless result.success?
+ message = +"Error while parsing #{file}:\n"
+
+ result.errors.each do |e|
+ message << "- #{e.message} (at #{e.location.start_line}:#{e.location.start_column})\n"
+ end
+
+ raise ParserError, message
+ end
+
+ result.value
end
sig do
params(
index: Index,
- node: SyntaxTree::Node,
+ node: Prism::Node,
ruby: String,
file: String,
plugins: T::Array[Deadcode::Plugins::Base],
diff --git a/lib/spoom/deadcode/indexer.rb b/lib/spoom/deadcode/indexer.rb
index d9879ca2..b52ca6e5 100644
--- a/lib/spoom/deadcode/indexer.rb
+++ b/lib/spoom/deadcode/indexer.rb
@@ -3,7 +3,7 @@
module Spoom
module Deadcode
- class Indexer < SyntaxTree::Visitor
+ class Indexer < Visitor
extend T::Sig
sig { returns(String) }
@@ -21,9 +21,9 @@ def initialize(path, source, index, plugins: [])
@source = source
@index = index
@plugins = plugins
- @previous_node = T.let(nil, T.nilable(SyntaxTree::Node))
+ @previous_node = T.let(nil, T.nilable(Prism::Node))
@names_nesting = T.let([], T::Array[String])
- @nodes_nesting = T.let([], T::Array[SyntaxTree::Node])
+ @nodes_nesting = T.let([], T::Array[Prism::Node])
@in_const_field = T.let(false, T::Boolean)
@in_opassign = T.let(false, T::Boolean)
@in_symbol_literal = T.let(false, T::Boolean)
@@ -31,7 +31,7 @@ def initialize(path, source, index, plugins: [])
# Visit
- sig { override.params(node: T.nilable(SyntaxTree::Node)).void }
+ sig { override.params(node: T.nilable(Prism::Node)).void }
def visit(node)
return unless node
@@ -41,163 +41,233 @@ def visit(node)
@previous_node = node
end
- sig { override.params(node: SyntaxTree::AliasNode).void }
- def visit_alias(node)
- reference_method(node_string(node.right), node)
+ sig { override.params(node: Prism::AliasMethodNode).void }
+ def visit_alias_method_node(node)
+ reference_method(node.old_name.slice, node)
end
- sig { override.params(node: SyntaxTree::ARef).void }
- def visit_aref(node)
+ sig { override.params(node: Prism::AndNode).void }
+ def visit_and_node(node)
+ reference_method(node.operator_loc.slice, node)
super
-
- reference_method("[]", node)
- end
-
- sig { override.params(node: SyntaxTree::ARefField).void }
- def visit_aref_field(node)
- super
-
- reference_method("[]=", node)
end
- sig { override.params(node: SyntaxTree::ArgBlock).void }
- def visit_arg_block(node)
- value = node.value
-
- case value
- when SyntaxTree::SymbolLiteral
- # If the block call is something like `x.select(&:foo)`, we need to reference the `foo` method
- reference_method(symbol_string(value), node)
- when SyntaxTree::VCall
- # If the block call is something like `x.select { ... }`, we need to visit the block
- super
+ sig { override.params(node: Prism::BlockArgumentNode).void }
+ def visit_block_argument_node(node)
+ expression = node.expression
+ case expression
+ when Prism::SymbolNode
+ reference_method(expression.unescaped, expression)
+ else
+ visit(expression)
end
end
- sig { override.params(node: SyntaxTree::Binary).void }
- def visit_binary(node)
- super
-
- op = node.operator
+ sig { override.params(node: Prism::CallAndWriteNode).void }
+ def visit_call_and_write_node(node)
+ visit(node.receiver)
+ reference_method(node.read_name.to_s, node)
+ reference_method(node.write_name.to_s, node)
+ visit(node.value)
+ end
- # Reference the operator itself
- reference_method(op.to_s, node)
+ sig { override.params(node: Prism::CallOperatorWriteNode).void }
+ def visit_call_operator_write_node(node)
+ visit(node.receiver)
+ reference_method(node.read_name.to_s, node)
+ reference_method(node.write_name.to_s, node)
+ visit(node.value)
+ end
- case op
- when :<, :>, :<=, :>=
- # For comparison operators, we also reference the `<=>` method
- reference_method("<=>", node)
- end
+ sig { override.params(node: Prism::CallOrWriteNode).void }
+ def visit_call_or_write_node(node)
+ visit(node.receiver)
+ reference_method(node.read_name.to_s, node)
+ reference_method(node.write_name.to_s, node)
+ visit(node.value)
end
- sig { override.params(node: SyntaxTree::CallNode).void }
- def visit_call(node)
+ sig { override.params(node: Prism::CallNode).void }
+ def visit_call_node(node)
visit_send(
Send.new(
node: node,
- name: node_string(node.message),
+ name: node.name.to_s,
recv: node.receiver,
- args: call_args(node.arguments),
+ args: node.arguments&.arguments || [],
+ block: node.block,
),
)
end
- sig { override.params(node: SyntaxTree::ClassDeclaration).void }
- def visit_class(node)
- const_name = node_string(node.constant)
- @names_nesting << const_name
- define_class(T.must(const_name.split("::").last), @names_nesting.join("::"), node)
+ sig { override.params(node: Prism::ClassNode).void }
+ def visit_class_node(node)
+ constant_path = node.constant_path.slice
+
+ if constant_path.start_with?("::")
+ full_name = constant_path.delete_prefix("::")
+
+ # We found a top level definition such as `class ::A; end`, we need to reset the name nesting
+ old_nesting = @names_nesting.dup
+ @names_nesting.clear
+ @names_nesting << full_name
- # We do not call `super` here because we don't want to visit the `constant` again
- visit(node.superclass) if node.superclass
- visit(node.bodystmt)
+ define_class(T.must(constant_path.split("::").last), full_name, node)
+
+ # We do not call `super` here because we don't want to visit the `constant` again
+ visit(node.superclass) if node.superclass
+ visit(node.body)
+
+ # Restore the name nesting once we finished visited the class
+ @names_nesting.clear
+ @names_nesting = old_nesting
+ else
+ @names_nesting << constant_path
+ define_class(T.must(constant_path.split("::").last), @names_nesting.join("::"), node)
- @names_nesting.pop
+ # We do not call `super` here because we don't want to visit the `constant` again
+ visit(node.superclass) if node.superclass
+ visit(node.body)
+
+ @names_nesting.pop
+ end
end
- sig { override.params(node: SyntaxTree::Command).void }
- def visit_command(node)
- visit_send(
- Send.new(
- node: node,
- name: node_string(node.message),
- args: call_args(node.arguments),
- block: node.block,
- ),
- )
+ sig { override.params(node: Prism::ConstantAndWriteNode).void }
+ def visit_constant_and_write_node(node)
+ reference_constant(node.name.to_s, node)
+ visit(node.value)
end
- sig { override.params(node: SyntaxTree::CommandCall).void }
- def visit_command_call(node)
- visit_send(
- Send.new(
- node: node,
- name: node_string(node.message),
- recv: node.receiver,
- args: call_args(node.arguments),
- block: node.block,
- ),
- )
+ sig { override.params(node: Prism::ConstantOperatorWriteNode).void }
+ def visit_constant_operator_write_node(node)
+ reference_constant(node.name.to_s, node)
+ visit(node.value)
+ end
+
+ sig { override.params(node: Prism::ConstantOrWriteNode).void }
+ def visit_constant_or_write_node(node)
+ reference_constant(node.name.to_s, node)
+ visit(node.value)
end
- sig { override.params(node: SyntaxTree::Const).void }
- def visit_const(node)
- reference_constant(node.value, node) unless @in_symbol_literal
+ sig { override.params(node: Prism::ConstantPathWriteNode).void }
+ def visit_constant_path_write_node(node)
+ parent = node.target.parent
+ name = node.target.child.slice
+
+ if parent
+ visit(parent)
+
+ parent_name = parent.slice
+ full_name = [*@names_nesting, parent_name, name].compact.join("::")
+ define_constant(name, full_name, node)
+ else
+ define_constant(name, name, node)
+ end
+
+ visit(node.value)
end
- sig { override.params(node: SyntaxTree::ConstPathField).void }
- def visit_const_path_field(node)
- # We do not call `super` here because we don't want to visit the `constant` again
- visit(node.parent)
+ sig { override.params(node: Prism::ConstantReadNode).void }
+ def visit_constant_read_node(node)
+ reference_constant(node.name.to_s, node)
+ end
- name = node.constant.value
- full_name = [*@names_nesting, node_string(node.parent), name].join("::")
+ sig { override.params(node: Prism::ConstantWriteNode).void }
+ def visit_constant_write_node(node)
+ name = node.name.to_s
+ full_name = [*@names_nesting, name].join("::")
define_constant(name, full_name, node)
+ visit(node.value)
end
- sig { override.params(node: SyntaxTree::DefNode).void }
- def visit_def(node)
- name = node_string(node.name)
+ sig { override.params(node: Prism::DefNode).void }
+ def visit_def_node(node)
+ name = node.name.to_s
define_method(name, [*@names_nesting, name].join("::"), node)
super
end
- sig { override.params(node: SyntaxTree::Field).void }
- def visit_field(node)
- visit(node.parent)
+ sig { override.params(node: Prism::LocalVariableAndWriteNode).void }
+ def visit_local_variable_and_write_node(node)
+ name = node.name.to_s
+ reference_method(name, node)
+ reference_method("#{name}=", node)
+ visit(node.value)
+ end
- name = node.name
- case name
- when SyntaxTree::Const
- name = name.value
- full_name = [*@names_nesting, node_string(node.parent), name].join("::")
- define_constant(name, full_name, node)
- when SyntaxTree::Ident
- reference_method(name.value, node) if @in_opassign
- reference_method("#{name.value}=", node)
- end
+ sig { override.params(node: Prism::LocalVariableOperatorWriteNode).void }
+ def visit_local_variable_operator_write_node(node)
+ name = node.name.to_s
+ reference_method(name, node)
+ reference_method("#{name}=", node)
+ visit(node.value)
end
- sig { override.params(node: SyntaxTree::ModuleDeclaration).void }
- def visit_module(node)
- const_name = node_string(node.constant)
- @names_nesting << const_name
- define_module(T.must(const_name.split("::").last), @names_nesting.join("::"), node)
+ sig { override.params(node: Prism::LocalVariableOrWriteNode).void }
+ def visit_local_variable_or_write_node(node)
+ name = node.name.to_s
+ reference_method(name, node)
+ reference_method("#{name}=", node)
+ visit(node.value)
+ end
+
+ sig { override.params(node: Prism::LocalVariableWriteNode).void }
+ def visit_local_variable_write_node(node)
+ visit(node.value)
+ reference_method("#{node.name}=", node)
+ end
+
+ sig { override.params(node: Prism::ModuleNode).void }
+ def visit_module_node(node)
+ constant_path = node.constant_path.slice
+
+ if constant_path.start_with?("::")
+ full_name = constant_path.delete_prefix("::")
+
+ # We found a top level definition such as `class ::A; end`, we need to reset the name nesting
+ old_nesting = @names_nesting.dup
+ @names_nesting.clear
+ @names_nesting << full_name
+
+ define_module(T.must(constant_path.split("::").last), full_name, node)
+
+ visit(node.body)
+
+ # Restore the name nesting once we finished visited the class
+ @names_nesting.clear
+ @names_nesting = old_nesting
+ else
+ @names_nesting << constant_path
+ define_module(T.must(constant_path.split("::").last), @names_nesting.join("::"), node)
+
+ # We do not call `super` here because we don't want to visit the `constant` again
+ visit(node.body)
- # We do not call `super` here because we don't want to visit the `constant` again
- visit(node.bodystmt)
+ @names_nesting.pop
+ end
+ end
- @names_nesting.pop
+ sig { override.params(node: Prism::MultiWriteNode).void }
+ def visit_multi_write_node(node)
+ node.lefts.each do |const|
+ case const
+ when Prism::ConstantTargetNode, Prism::ConstantPathTargetNode
+ name = const.slice
+ define_constant(T.must(name.split("::").last), [*@names_nesting, name].join("::"), const)
+ when Prism::LocalVariableTargetNode
+ reference_method("#{const.name}=", node)
+ end
+ end
+ visit(node.value)
end
- sig { override.params(node: SyntaxTree::OpAssign).void }
- def visit_opassign(node)
- # Both `FOO = x` and `FOO += x` yield a VarField node, but the former is a constant definition and the latter is
- # a constant reference. We need to distinguish between the two cases.
- @in_opassign = true
+ sig { override.params(node: Prism::OrNode).void }
+ def visit_or_node(node)
+ reference_method(node.operator_loc.slice, node)
super
- @in_opassign = false
end
sig { params(send: Send).void }
@@ -207,23 +277,23 @@ def visit_send(send)
case send.name
when "attr_reader"
send.args.each do |arg|
- next unless arg.is_a?(SyntaxTree::SymbolLiteral)
+ next unless arg.is_a?(Prism::SymbolNode)
- name = symbol_string(arg)
+ name = arg.unescaped
define_attr_reader(name, [*@names_nesting, name].join("::"), arg)
end
when "attr_writer"
send.args.each do |arg|
- next unless arg.is_a?(SyntaxTree::SymbolLiteral)
+ next unless arg.is_a?(Prism::SymbolNode)
- name = symbol_string(arg)
+ name = arg.unescaped
define_attr_writer("#{name}=", "#{[*@names_nesting, name].join("::")}=", arg)
end
when "attr_accessor"
send.args.each do |arg|
- next unless arg.is_a?(SyntaxTree::SymbolLiteral)
+ next unless arg.is_a?(Prism::SymbolNode)
- name = symbol_string(arg)
+ name = arg.unescaped
full_name = [*@names_nesting, name].join("::")
define_attr_reader(name, full_name, arg)
define_attr_writer("#{name}=", "#{full_name}=", arg)
@@ -234,50 +304,21 @@ def visit_send(send)
end
reference_method(send.name, send.node)
- visit_all(send.args)
- visit(send.block)
- end
- end
-
- sig { override.params(node: SyntaxTree::SymbolLiteral).void }
- def visit_symbol_literal(node)
- # Something like `:FOO` will yield a Const node but we do not want to treat it as a constant reference.
- # So we need to distinguish between the two cases.
- @in_symbol_literal = true
- super
- @in_symbol_literal = false
- end
- sig { override.params(node: SyntaxTree::TopConstField).void }
- def visit_top_const_field(node)
- define_constant(node.constant.value, node.constant.value, node)
- end
-
- sig { override.params(node: SyntaxTree::VarField).void }
- def visit_var_field(node)
- value = node.value
- case value
- when SyntaxTree::Const
- if @in_opassign
- reference_constant(value.value, node)
- else
- name = value.value
- define_constant(name, [*@names_nesting, name].join("::"), node)
+ case send.name
+ when "<", ">", "<=", ">="
+ # For comparison operators, we also reference the `<=>` method
+ reference_method("<=>", send.node)
end
- when SyntaxTree::Ident
- reference_method(value.value, node) if @in_opassign
- reference_method("#{value.value}=", node)
- end
- end
- sig { override.params(node: SyntaxTree::VCall).void }
- def visit_vcall(node)
- visit_send(Send.new(node: node, name: node_string(node.value)))
+ visit_all(send.args)
+ visit(send.block)
+ end
end
# Definition indexing
- sig { params(name: String, full_name: String, node: SyntaxTree::Node).void }
+ sig { params(name: String, full_name: String, node: Prism::Node).void }
def define_attr_reader(name, full_name, node)
definition = Definition.new(
kind: Definition::Kind::AttrReader,
@@ -289,7 +330,7 @@ def define_attr_reader(name, full_name, node)
@plugins.each { |plugin| plugin.internal_on_define_accessor(self, definition) }
end
- sig { params(name: String, full_name: String, node: SyntaxTree::Node).void }
+ sig { params(name: String, full_name: String, node: Prism::Node).void }
def define_attr_writer(name, full_name, node)
definition = Definition.new(
kind: Definition::Kind::AttrWriter,
@@ -301,7 +342,7 @@ def define_attr_writer(name, full_name, node)
@plugins.each { |plugin| plugin.internal_on_define_accessor(self, definition) }
end
- sig { params(name: String, full_name: String, node: SyntaxTree::Node).void }
+ sig { params(name: String, full_name: String, node: Prism::Node).void }
def define_class(name, full_name, node)
definition = Definition.new(
kind: Definition::Kind::Class,
@@ -313,7 +354,7 @@ def define_class(name, full_name, node)
@plugins.each { |plugin| plugin.internal_on_define_class(self, definition) }
end
- sig { params(name: String, full_name: String, node: SyntaxTree::Node).void }
+ sig { params(name: String, full_name: String, node: Prism::Node).void }
def define_constant(name, full_name, node)
definition = Definition.new(
kind: Definition::Kind::Constant,
@@ -325,7 +366,7 @@ def define_constant(name, full_name, node)
@plugins.each { |plugin| plugin.internal_on_define_constant(self, definition) }
end
- sig { params(name: String, full_name: String, node: SyntaxTree::Node).void }
+ sig { params(name: String, full_name: String, node: Prism::Node).void }
def define_method(name, full_name, node)
definition = Definition.new(
kind: Definition::Kind::Method,
@@ -337,7 +378,7 @@ def define_method(name, full_name, node)
@plugins.each { |plugin| plugin.internal_on_define_method(self, definition) }
end
- sig { params(name: String, full_name: String, node: SyntaxTree::Node).void }
+ sig { params(name: String, full_name: String, node: Prism::Node).void }
def define_module(name, full_name, node)
definition = Definition.new(
kind: Definition::Kind::Module,
@@ -351,19 +392,19 @@ def define_module(name, full_name, node)
# Reference indexing
- sig { params(name: String, node: SyntaxTree::Node).void }
+ sig { params(name: String, node: Prism::Node).void }
def reference_constant(name, node)
@index.reference(Reference.new(name: name, kind: Reference::Kind::Constant, location: node_location(node)))
end
- sig { params(name: String, node: SyntaxTree::Node).void }
+ sig { params(name: String, node: Prism::Node).void }
def reference_method(name, node)
@index.reference(Reference.new(name: name, kind: Reference::Kind::Method, location: node_location(node)))
end
# Context
- sig { returns(SyntaxTree::Node) }
+ sig { returns(Prism::Node) }
def current_node
T.must(@nodes_nesting.last)
end
@@ -377,33 +418,19 @@ def nesting_node(type)
nil
end
- sig { returns(T.nilable(SyntaxTree::ClassDeclaration)) }
+ sig { returns(T.nilable(Prism::ClassNode)) }
def nesting_class
- nesting_node(SyntaxTree::ClassDeclaration)
+ nesting_node(Prism::ClassNode)
end
- sig { returns(T.nilable(SyntaxTree::BlockNode)) }
+ sig { returns(T.nilable(Prism::BlockNode)) }
def nesting_block
- nesting_node(SyntaxTree::BlockNode)
- end
-
- sig { returns(T.nilable(SyntaxTree::MethodAddBlock)) }
- def nesting_block_call
- nesting_node(SyntaxTree::MethodAddBlock)
+ nesting_node(Prism::BlockNode)
end
- sig { returns(T.nilable(String)) }
- def nesting_block_call_name
- block = nesting_block_call
- return unless block.is_a?(SyntaxTree::MethodAddBlock)
-
- call = block.call
- case call
- when SyntaxTree::ARef
- node_string(call.collection)
- when SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall
- node_string(call.message)
- end
+ sig { returns(T.nilable(Prism::CallNode)) }
+ def nesting_call
+ nesting_node(Prism::CallNode)
end
sig { returns(T.nilable(String)) }
@@ -411,7 +438,7 @@ def nesting_class_name
nesting_class = self.nesting_class
return unless nesting_class
- node_string(nesting_class.constant)
+ nesting_class.name.to_s
end
sig { returns(T.nilable(String)) }
@@ -419,52 +446,23 @@ def nesting_class_superclass_name
nesting_class_superclass = nesting_class&.superclass
return unless nesting_class_superclass
- node_string(nesting_class_superclass).delete_prefix("::")
+ nesting_class_superclass.slice.delete_prefix("::")
end
sig { returns(T.nilable(String)) }
def last_sig
- return unless @previous_node.is_a?(SyntaxTree::MethodAddBlock)
+ previous_call = @previous_node
+ return unless previous_call.is_a?(Prism::CallNode)
+ return unless previous_call.name == :sig
- node_string(@previous_node)
+ previous_call.slice
end
# Node utils
- sig { params(node: T.any(Symbol, SyntaxTree::Node)).returns(String) }
- def node_string(node)
- case node
- when Symbol
- node.to_s
- else
- T.must(@source[node.location.start_char...node.location.end_char])
- end
- end
-
- sig { params(node: SyntaxTree::Node).returns(Location) }
+ sig { params(node: Prism::Node).returns(Location) }
def node_location(node)
- Location.from_syntax_tree(@path, node.location)
- end
-
- sig { params(node: SyntaxTree::Node).returns(String) }
- def symbol_string(node)
- node_string(node).delete_prefix(":")
- end
-
- sig do
- params(
- node: T.any(SyntaxTree::Args, SyntaxTree::ArgParen, SyntaxTree::ArgsForward, NilClass),
- ).returns(T::Array[SyntaxTree::Node])
- end
- def call_args(node)
- case node
- when SyntaxTree::ArgParen
- call_args(node.arguments)
- when SyntaxTree::Args
- node.parts
- else
- []
- end
+ Location.from_prism(@path, node.location)
end
end
end
diff --git a/lib/spoom/deadcode/location.rb b/lib/spoom/deadcode/location.rb
index 8fe353cc..db811b6a 100644
--- a/lib/spoom/deadcode/location.rb
+++ b/lib/spoom/deadcode/location.rb
@@ -30,8 +30,8 @@ def from_string(location_string)
new(file, start_line.to_i, start_column.to_i, end_line.to_i, end_column.to_i)
end
- sig { params(file: String, location: SyntaxTree::Location).returns(Location) }
- def from_syntax_tree(file, location)
+ sig { params(file: String, location: Prism::Location).returns(Location) }
+ def from_prism(file, location)
new(file, location.start_line, location.start_column, location.end_line, location.end_column)
end
end
diff --git a/lib/spoom/deadcode/plugins/action_mailer.rb b/lib/spoom/deadcode/plugins/action_mailer.rb
index 455787a1..193c8537 100644
--- a/lib/spoom/deadcode/plugins/action_mailer.rb
+++ b/lib/spoom/deadcode/plugins/action_mailer.rb
@@ -11,8 +11,8 @@ class ActionMailer < Base
def on_send(indexer, send)
return unless send.recv.nil? && ActionPack::CALLBACKS.include?(send.name)
- send.each_arg(SyntaxTree::SymbolLiteral) do |arg|
- indexer.reference_method(indexer.node_string(arg.value), send.node)
+ send.each_arg(Prism::SymbolNode) do |arg|
+ indexer.reference_method(arg.unescaped, send.node)
end
end
end
diff --git a/lib/spoom/deadcode/plugins/actionpack.rb b/lib/spoom/deadcode/plugins/actionpack.rb
index 31bb44e8..23dbfa3b 100644
--- a/lib/spoom/deadcode/plugins/actionpack.rb
+++ b/lib/spoom/deadcode/plugins/actionpack.rb
@@ -38,18 +38,16 @@ def on_send(indexer, send)
arg = send.args.first
case arg
- when SyntaxTree::SymbolLiteral
- indexer.reference_method(indexer.node_string(arg.value), send.node)
- when SyntaxTree::VarRef
- indexer.reference_constant(indexer.node_string(arg), send.node)
+ when Prism::SymbolNode
+ indexer.reference_method(arg.unescaped, send.node)
end
send.each_arg_assoc do |key, value|
- key = indexer.node_string(key).delete_suffix(":")
+ key = key.slice.delete_suffix(":")
case key
when "if", "unless"
- indexer.reference_method(indexer.symbol_string(value), send.node) if value
+ indexer.reference_method(value.slice.delete_prefix(":"), send.node) if value
else
indexer.reference_constant(camelize(key), send.node)
end
diff --git a/lib/spoom/deadcode/plugins/active_model.rb b/lib/spoom/deadcode/plugins/active_model.rb
index 7e9f90e4..b8f3cfda 100644
--- a/lib/spoom/deadcode/plugins/active_model.rb
+++ b/lib/spoom/deadcode/plugins/active_model.rb
@@ -16,27 +16,27 @@ def on_send(indexer, send)
case send.name
when "attribute", "attributes"
- send.each_arg(SyntaxTree::SymbolLiteral) do |arg|
- indexer.reference_method(indexer.node_string(arg.value), send.node)
+ send.each_arg(Prism::SymbolNode) do |arg|
+ indexer.reference_method(arg.unescaped, send.node)
end
when "validate", "validates", "validates!", "validates_each"
- send.each_arg(SyntaxTree::SymbolLiteral) do |arg|
- indexer.reference_method(indexer.node_string(arg.value), send.node)
+ send.each_arg(Prism::SymbolNode) do |arg|
+ indexer.reference_method(arg.unescaped, send.node)
end
send.each_arg_assoc do |key, value|
- key = indexer.node_string(key).delete_suffix(":")
+ key = key.slice.delete_suffix(":")
case key
when "if", "unless"
- indexer.reference_method(indexer.symbol_string(value), send.node) if value
+ indexer.reference_method(value.slice.delete_prefix(":"), send.node) if value
else
indexer.reference_constant(camelize(key), send.node)
end
end
when "validates_with"
arg = send.args.first
- if arg.is_a?(SyntaxTree::SymbolLiteral)
- indexer.reference_constant(indexer.node_string(arg.value), send.node)
+ if arg.is_a?(Prism::SymbolNode)
+ indexer.reference_constant(arg.unescaped, send.node)
end
end
end
diff --git a/lib/spoom/deadcode/plugins/active_record.rb b/lib/spoom/deadcode/plugins/active_record.rb
index ba4a5666..6301b5a6 100644
--- a/lib/spoom/deadcode/plugins/active_record.rb
+++ b/lib/spoom/deadcode/plugins/active_record.rb
@@ -73,8 +73,8 @@ class ActiveRecord < Base
sig { override.params(indexer: Indexer, send: Send).void }
def on_send(indexer, send)
if send.recv.nil? && CALLBACKS.include?(send.name)
- send.each_arg(SyntaxTree::SymbolLiteral) do |arg|
- indexer.reference_method(indexer.node_string(arg.value), send.node)
+ send.each_arg(Prism::SymbolNode) do |arg|
+ indexer.reference_method(arg.unescaped, send.node)
end
return
end
@@ -84,21 +84,18 @@ def on_send(indexer, send)
case send.name
when *CRUD_METHODS
send.each_arg_assoc do |key, _value|
- key = indexer.symbol_string(key).delete_suffix(":")
+ key = key.slice.delete_suffix(":")
indexer.reference_method("#{key}=", send.node)
end
when *ARRAY_METHODS
- send.each_arg(SyntaxTree::ArrayLiteral) do |arg|
- args = arg.contents
- next unless args.is_a?(SyntaxTree::Args)
+ send.each_arg(Prism::ArrayNode) do |arg|
+ arg.elements.each do |part|
+ next unless part.is_a?(Prism::HashNode)
- args.parts.each do |part|
- next unless part.is_a?(SyntaxTree::HashLiteral)
+ part.elements.each do |assoc|
+ next unless assoc.is_a?(Prism::AssocNode)
- part.assocs.each do |assoc|
- next unless assoc.is_a?(SyntaxTree::Assoc)
-
- key = indexer.symbol_string(assoc.key).delete_suffix(":")
+ key = assoc.key.slice.delete_suffix(":")
indexer.reference_method("#{key}=", send.node)
end
end
diff --git a/lib/spoom/deadcode/plugins/active_support.rb b/lib/spoom/deadcode/plugins/active_support.rb
index 45d125a2..d7f61e1c 100644
--- a/lib/spoom/deadcode/plugins/active_support.rb
+++ b/lib/spoom/deadcode/plugins/active_support.rb
@@ -22,8 +22,8 @@ class ActiveSupport < Base
def on_send(indexer, send)
return unless send.recv.nil? && SETUP_AND_TEARDOWN_METHODS.include?(send.name)
- send.each_arg(SyntaxTree::SymbolLiteral) do |arg|
- indexer.reference_method(indexer.node_string(arg.value), send.node)
+ send.each_arg(Prism::SymbolNode) do |arg|
+ indexer.reference_method(T.must(arg.value), send.node)
end
end
end
diff --git a/lib/spoom/deadcode/plugins/base.rb b/lib/spoom/deadcode/plugins/base.rb
index b1f66f58..d8fa7d0e 100644
--- a/lib/spoom/deadcode/plugins/base.rb
+++ b/lib/spoom/deadcode/plugins/base.rb
@@ -269,7 +269,7 @@ def internal_on_define_module(indexer, definition)
# return unless send.name == "dsl_method"
# return if send.args.empty?
#
- # method_name = indexer.node_string(send.args.first).delete_prefix(":")
+ # method_name = send.args.first.slice.delete_prefix(":")
# indexer.reference_method(method_name, send.node)
# end
# end
diff --git a/lib/spoom/deadcode/plugins/graphql.rb b/lib/spoom/deadcode/plugins/graphql.rb
index 11ca70a7..341e9063 100644
--- a/lib/spoom/deadcode/plugins/graphql.rb
+++ b/lib/spoom/deadcode/plugins/graphql.rb
@@ -29,16 +29,16 @@ def on_send(indexer, send)
return unless send.recv.nil? && send.name == "field"
arg = send.args.first
- return unless arg.is_a?(SyntaxTree::SymbolLiteral)
+ return unless arg.is_a?(Prism::SymbolNode)
- indexer.reference_method(indexer.node_string(arg.value), send.node)
+ indexer.reference_method(arg.unescaped, send.node)
send.each_arg_assoc do |key, value|
- key = indexer.node_string(key).delete_suffix(":")
+ key = key.slice.delete_suffix(":")
next unless key == "resolver_method"
next unless value
- indexer.reference_method(indexer.symbol_string(value), send.node)
+ indexer.reference_method(value.slice.delete_prefix(":"), send.node)
end
end
end
diff --git a/lib/spoom/deadcode/plugins/namespaces.rb b/lib/spoom/deadcode/plugins/namespaces.rb
index b4e0642d..d3484b60 100644
--- a/lib/spoom/deadcode/plugins/namespaces.rb
+++ b/lib/spoom/deadcode/plugins/namespaces.rb
@@ -22,11 +22,9 @@ def on_define_module(indexer, definition)
sig { params(indexer: Indexer).returns(T::Boolean) }
def used_as_namespace?(indexer)
node = indexer.current_node
- return false unless node.is_a?(SyntaxTree::ClassDeclaration) || node.is_a?(SyntaxTree::ModuleDeclaration)
+ return false unless node.is_a?(Prism::ClassNode) || node.is_a?(Prism::ModuleNode)
- node.bodystmt.statements.body.any? do |stmt|
- !stmt.is_a?(SyntaxTree::VoidStmt)
- end
+ !!node.body
end
end
end
diff --git a/lib/spoom/deadcode/plugins/ruby.rb b/lib/spoom/deadcode/plugins/ruby.rb
index e6dc185e..7b1e3c4e 100644
--- a/lib/spoom/deadcode/plugins/ruby.rb
+++ b/lib/spoom/deadcode/plugins/ruby.rb
@@ -27,34 +27,25 @@ def on_send(indexer, send)
reference_symbol_as_constant(indexer, send, T.must(send.args.first))
when "send", "__send__", "try"
arg = send.args.first
- indexer.reference_method(indexer.node_string(arg.value), send.node) if arg.is_a?(SyntaxTree::SymbolLiteral)
+ indexer.reference_method(arg.unescaped, send.node) if arg.is_a?(Prism::SymbolNode)
when "alias_method"
last_arg = send.args.last
- name = case last_arg
- when SyntaxTree::SymbolLiteral
- indexer.node_string(last_arg.value)
- when SyntaxTree::StringLiteral
- last_arg.parts.map { |part| indexer.node_string(part) }.join
+ if last_arg.is_a?(Prism::SymbolNode) || last_arg.is_a?(Prism::StringNode)
+ indexer.reference_method(last_arg.unescaped, send.node)
end
-
- return unless name
-
- indexer.reference_method(name, send.node)
end
end
private
- sig { params(indexer: Indexer, send: Send, node: SyntaxTree::Node).void }
+ sig { params(indexer: Indexer, send: Send, node: Prism::Node).void }
def reference_symbol_as_constant(indexer, send, node)
case node
- when SyntaxTree::SymbolLiteral
- name = indexer.node_string(node.value)
- indexer.reference_constant(name, send.node)
- when SyntaxTree::StringLiteral
- string = T.must(indexer.node_string(node)[1..-2])
- string.split("::").each do |name|
+ when Prism::SymbolNode
+ indexer.reference_constant(node.unescaped, send.node)
+ when Prism::StringNode
+ node.unescaped.split("::").each do |name|
indexer.reference_constant(name, send.node) unless name.empty?
end
end
diff --git a/lib/spoom/deadcode/plugins/sorbet.rb b/lib/spoom/deadcode/plugins/sorbet.rb
index 98ec5851..6c10a18f 100644
--- a/lib/spoom/deadcode/plugins/sorbet.rb
+++ b/lib/spoom/deadcode/plugins/sorbet.rb
@@ -21,24 +21,18 @@ def on_define_method(indexer, definition)
sig { params(indexer: Indexer, definition: Definition).returns(T::Boolean) }
def sorbet_type_member?(indexer, definition)
- assign = indexer.nesting_node(SyntaxTree::Assign)
+ assign = indexer.nesting_node(Prism::ConstantWriteNode)
return false unless assign
value = assign.value
+ return false unless value.is_a?(Prism::CallNode)
- case value
- when SyntaxTree::MethodAddBlock
- indexer.node_string(value.call).match?(/^(type_member|type_template)/)
- when SyntaxTree::VCall
- indexer.node_string(value.value).match?(/^(type_member|type_template)/)
- else
- false
- end
+ value.name == :type_member || value.name == :type_template
end
sig { params(indexer: Indexer, definition: Definition).returns(T::Boolean) }
def sorbet_enum_constant?(indexer, definition)
- /^(::)?T::Enum$/.match?(indexer.nesting_class_superclass_name) && indexer.nesting_block_call_name == "enums"
+ /^(::)?T::Enum$/.match?(indexer.nesting_class_superclass_name) && indexer.nesting_call&.name == :enums
end
end
end
diff --git a/lib/spoom/deadcode/remover.rb b/lib/spoom/deadcode/remover.rb
index 93a66dcf..d0e2e161 100644
--- a/lib/spoom/deadcode/remover.rb
+++ b/lib/spoom/deadcode/remover.rb
@@ -52,11 +52,15 @@ def apply_edit
node = @node_context.node
case node
- when SyntaxTree::ClassDeclaration, SyntaxTree::ModuleDeclaration, SyntaxTree::DefNode
+ when Prism::ClassNode, Prism::ModuleNode, Prism::DefNode
delete_node_and_comments_and_sigs(@node_context)
- when SyntaxTree::Const, SyntaxTree::ConstPathField
+ when Prism::ConstantWriteNode, Prism::ConstantOperatorWriteNode,
+ Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode,
+ Prism::ConstantPathWriteNode, Prism::ConstantPathOperatorWriteNode,
+ Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode,
+ Prism::ConstantTargetNode
delete_constant_assignment(@node_context)
- when SyntaxTree::SymbolLiteral # for attr accessors
+ when Prism::SymbolNode # for attr accessors
delete_attr_accessor(@node_context)
else
raise Error, "Unsupported node type: #{node.class}"
@@ -67,19 +71,26 @@ def apply_edit
sig { params(context: NodeContext).void }
def delete_constant_assignment(context)
- # Pop the Varfield node from the nesting nodes
- if context.node.is_a?(SyntaxTree::Const)
- context = context.parent_context
+ case context.node
+ when Prism::ConstantWriteNode, Prism::ConstantOperatorWriteNode,
+ Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode,
+ Prism::ConstantPathWriteNode, Prism::ConstantPathOperatorWriteNode,
+ Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode
+ # Nesting node is an assign, it means only one constant is assigned on the line
+ # so we can remove the whole assign
+ delete_node_and_comments_and_sigs(context)
+ return
end
+ # We're assigning multiple constants, we need to remove only the useless node
parent_context = context.parent_context
parent_node = parent_context.node
- if parent_node.is_a?(SyntaxTree::Assign)
+ if parent_node.is_a?(Prism::ConstantWriteNode)
# Nesting node is an assign, it means only one constant is assigned on the line
# so we can remove the whole assign
delete_node_and_comments_and_sigs(parent_context)
return
- elsif parent_node.is_a?(SyntaxTree::MLHS) && parent_node.parts.size == 1
+ elsif parent_node.is_a?(Prism::MultiWriteNode) && parent_node.lefts.size == 1
# Nesting node is a single left hand side, it means only one constant is assigned
# so we can remove the whole line
delete_node_and_comments_and_sigs(parent_context.parent_context)
@@ -102,36 +113,36 @@ def delete_constant_assignment(context)
# BAZ = 42
# ~~~
delete_lines(node.location.start_line, node.location.end_line)
- elsif prev_node && next_node
+ elsif prev_node && next_node.is_a?(Prism::ConstantTargetNode)
# We have a node before and after one the same line, just remove the part of the line
#
# ~~~
# FOO, BAR, BAZ = 42 # we need to remove BAR
# ~~~
- replace_chars(prev_node.location.end_char, next_node.location.start_char, ", ")
+ replace_chars(prev_node.location.end_offset, next_node.location.start_offset, ", ")
elsif prev_node
# We have a node before, on the same line, but no node after, just remove the part of the line
#
# ~~~
# FOO, BAR = 42 # we need to remove BAR
# ~~~
- nesting_context = parent_context.parent_context
- nesting_assign = T.cast(nesting_context.node, T.any(SyntaxTree::MAssign, SyntaxTree::MLHSParen))
- case nesting_assign
- when SyntaxTree::MAssign
- replace_chars(prev_node.location.end_char, nesting_assign.value.location.start_char, " = ")
- when SyntaxTree::MLHSParen
- nesting_context = nesting_context.parent_context
- nesting_assign = T.cast(nesting_context.node, SyntaxTree::MAssign)
- replace_chars(prev_node.location.end_char, nesting_assign.value.location.start_char, ") = ")
+ nesting_assign = T.cast(parent_context.node, Prism::MultiWriteNode)
+
+ rparen_loc = nesting_assign.rparen_loc
+ if rparen_loc
+ # We have an assign with parenthesis, we need to remove the part of the line until the closing parenthesis
+ delete_chars(prev_node.location.end_offset, rparen_loc.start_offset)
+ else
+ # We don't have a parenthesis, we need to remove the part of the line until the operator
+ replace_chars(prev_node.location.end_offset, nesting_assign.operator_loc.start_offset, " ")
end
- elsif next_node
+ elsif next_node.is_a?(Prism::ConstantTargetNode)
# We don't have a node before but a node after on the same line, just remove the part of the line
#
# ~~~
# FOO, BAR = 42 # we need to remove FOO
# ~~~
- delete_chars(node.location.start_char, next_node.location.start_char)
+ delete_chars(node.location.start_offset, next_node.location.start_offset)
else
# Should have been removed as a single MLHS node
raise "Unexpected case while removing constant assignment"
@@ -142,10 +153,10 @@ def delete_constant_assignment(context)
def delete_attr_accessor(context)
args_context = context.parent_context
send_context = args_context.parent_context
- send_context = send_context.parent_context if send_context.node.is_a?(SyntaxTree::ArgParen)
+ send_context = send_context.parent_context if send_context.node.is_a?(Prism::ArgumentsNode)
- send_node = T.cast(send_context.node, T.any(SyntaxTree::Command, SyntaxTree::CallNode))
- need_accessor = context.node_string(send_node.message) == "attr_accessor"
+ send_node = T.cast(send_context.node, Prism::CallNode)
+ need_accessor = send_node.name == :attr_accessor
if args_context.node.child_nodes.size == 1
# Only one accessor is defined, we can remove the whole node
@@ -175,21 +186,21 @@ def delete_attr_accessor(context)
# ~~~
# attr_reader :foo, :bar, :baz # we need to remove bar
# ~~~
- replace_chars(prev_node.location.end_char, next_node.location.start_char, ", ")
+ replace_chars(prev_node.location.end_offset, next_node.location.start_offset, ", ")
elsif prev_node
# We have a node before, on the same line, but no node after, just remove the part of the line
#
# ~~~
# attr_reader :foo, :bar, :baz # we need to remove baz
# ~~~
- delete_chars(prev_node.location.end_char, context.node.location.end_char)
+ delete_chars(prev_node.location.end_offset, context.node.location.end_offset)
elsif next_node
# We don't have a node before but a node after on the same line, just remove the part of the line
#
# ~~~
# attr_reader :foo, :bar, :baz # we need to remove foo
# ~~~
- delete_chars(context.node.location.start_char, next_node.location.start_char)
+ delete_chars(context.node.location.start_offset, next_node.location.start_offset)
else
raise "Unexpected case while removing attr_accessor"
end
@@ -199,13 +210,13 @@ def delete_attr_accessor(context)
sig do
params(
- node: SyntaxTree::Node,
+ node: Prism::Node,
send_context: NodeContext,
was_removed: T::Boolean,
).void
end
def insert_accessor(node, send_context, was_removed:)
- name = @node_context.node_string(node)
+ name = node.slice
code = case @kind
when Definition::Kind::AttrReader
"attr_writer #{name}"
@@ -221,10 +232,10 @@ def insert_accessor(node, send_context, was_removed:)
node_after = send_context.next_node
if was_removed
- first_node = send_context.attached_comments_and_sigs.first || send_context.node
+ first_node = send_context.attached_sigs.first || send_context.node
at_line = first_node.location.start_line - 1
- prev_context = NodeContext.new(@old_source, first_node, send_context.nesting)
+ prev_context = NodeContext.new(@old_source, @node_context.comments, first_node, send_context.nesting)
node_before = prev_context.previous_node
new_line_before = node_before && send_context.node.location.start_line - node_before.location.end_line < 2
@@ -251,21 +262,51 @@ def delete_node_and_comments_and_sigs(context)
start_line = context.node.location.start_line
end_line = context.node.location.end_line
- # Adjust the lines to remove to include the comments
- nodes = context.attached_comments_and_sigs
- if nodes.any?
- start_line = T.must(nodes.first).location.start_line
+ # TODO: remove once Prism location are fixed
+ node = context.node
+ case node
+ when Prism::ConstantWriteNode, Prism::ConstantOperatorWriteNode,
+ Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode,
+ Prism::ConstantPathWriteNode, Prism::ConstantPathOperatorWriteNode,
+ Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode
+ value = node.value
+ if value.is_a?(Prism::StringNode)
+ end_line = value.closing_loc&.start_line || value.location.end_line
+ end
end
+ # Adjust the lines to remove to include sigs attached to the node
+ first_node = context.attached_sigs.first || context.node
+ start_line = first_node.location.start_line if first_node
+
+ # Adjust the lines to remove to include comments attached to the node
+ first_comment = context.attached_comments(first_node).first
+ start_line = first_comment.location.start_line if first_comment
+
# Adjust the lines to remove to include previous blank lines
- prev_context = NodeContext.new(@old_source, nodes.first || context.node, context.nesting)
- before = prev_context.previous_node
+ prev_context = NodeContext.new(@old_source, @node_context.comments, first_node, context.nesting)
+ before = T.let(prev_context.previous_node, T.nilable(T.any(Prism::Node, Prism::Comment)))
+
+ # There may be an unrelated comment between the current node and the one before
+ # if there is, we only want to delete lines up to the last comment found
+ if before
+ to_node = first_comment || node
+ comment = @node_context.comments_between_lines(before.location.end_line, to_node.location.start_line).last
+ before = comment if comment
+ end
+
if before && before.location.end_line < start_line - 1
# There is a node before and a blank line
start_line = before.location.end_line + 1
- elsif before.nil? && context.parent_node.location.start_line < start_line - 1
- # There is no node before, but a blank line
- start_line = context.parent_node.location.start_line + 1
+ elsif before.nil?
+ # There is no node before, check if there is a blank line
+ parent_context = context.parent_context
+ # With Prism the StatementsNode location starts at the first line of the first node
+ parent_context = parent_context.parent_context if parent_context.node.is_a?(Prism::StatementsNode)
+ if parent_context.node.location.start_line < start_line - 1
+ # There is a blank line before the node
+ start_line = parent_context.node.location.start_line + 1
+ end
end
# Adjust the lines to remove to include following blank lines
@@ -296,32 +337,24 @@ def replace_chars(start_char, end_char, replacement)
@new_source[start_char...end_char] = replacement
end
- sig do
- params(
- node: SyntaxTree::MethodAddBlock,
- name: String,
- kind: T.nilable(Definition::Kind),
- ).returns(String)
- end
+ sig { params(node: Prism::CallNode, name: String, kind: T.nilable(Definition::Kind)).returns(String) }
def transform_sig(node, name:, kind:)
type = T.let(nil, T.nilable(String))
- statements = node.block.bodystmt
- statements = statements.statements if statements.is_a?(SyntaxTree::BodyStmt)
+ block = T.cast(node.block, Prism::BlockNode)
+ statements = T.cast(block.body, Prism::StatementsNode)
statements.body.each do |call|
- next unless call.is_a?(SyntaxTree::CallNode)
- next unless @node_context.node_string(call.message) == "returns"
+ next unless call.is_a?(Prism::CallNode)
+ next unless call.name == :returns
args = call.arguments
- args = args.arguments if args.is_a?(SyntaxTree::ArgParen)
-
- next unless args.is_a?(SyntaxTree::Args)
+ next unless args
- first = args.parts.first
+ first = args.arguments.first
next unless first
- type = @node_context.node_string(first)
+ type = first.slice
end
name = name.delete_prefix(":")
@@ -339,20 +372,31 @@ def transform_sig(node, name:, kind:)
class NodeContext
extend T::Sig
- sig { returns(SyntaxTree::Node) }
+ sig { returns(T::Hash[Integer, Prism::Comment]) }
+ attr_reader :comments
+
+ sig { returns(Prism::Node) }
attr_reader :node
- sig { returns(T::Array[SyntaxTree::Node]) }
+ sig { returns(T::Array[Prism::Node]) }
attr_accessor :nesting
- sig { params(source: String, node: SyntaxTree::Node, nesting: T::Array[SyntaxTree::Node]).void }
- def initialize(source, node, nesting)
+ sig do
+ params(
+ source: String,
+ comments: T::Hash[Integer, Prism::Comment],
+ node: Prism::Node,
+ nesting: T::Array[Prism::Node],
+ ).void
+ end
+ def initialize(source, comments, node, nesting)
@source = source
+ @comments = comments
@node = node
@nesting = nesting
end
- sig { returns(SyntaxTree::Node) }
+ sig { returns(Prism::Node) }
def parent_node
parent = @nesting.last
raise "No parent for node #{node}" unless parent
@@ -366,100 +410,119 @@ def parent_context
parent = nesting.pop
raise "No parent context for node #{@node}" unless parent
- NodeContext.new(@source, parent, nesting)
+ NodeContext.new(@source, @comments, parent, nesting)
end
- sig { returns(T::Array[SyntaxTree::Node]) }
+ sig { returns(T::Array[Prism::Node]) }
def previous_nodes
parent = parent_node
+ child_nodes = parent.child_nodes.compact
- index = parent.child_nodes.index(@node)
+ index = child_nodes.index(@node)
raise "Node #{@node} not found in parent #{parent}" unless index
- parent.child_nodes[0...index].reject { |child| child.is_a?(SyntaxTree::VoidStmt) }
+ T.must(child_nodes[0...index])
end
- sig { returns(T.nilable(SyntaxTree::Node)) }
+ sig { returns(T.nilable(Prism::Node)) }
def previous_node
previous_nodes.last
end
- sig { returns(T::Array[SyntaxTree::Node]) }
+ sig { returns(T::Array[Prism::Node]) }
def next_nodes
parent = parent_node
+ child_nodes = parent.child_nodes.compact
- index = parent.child_nodes.index(node)
+ index = child_nodes.index(node)
raise "Node #{@node} not found in nesting node #{parent}" unless index
- parent.child_nodes[(index + 1)..-1].reject { |node| node.is_a?(SyntaxTree::VoidStmt) }
+ T.must(child_nodes.compact[(index + 1)..-1])
end
- sig { returns(T.nilable(SyntaxTree::Node)) }
+ sig { returns(T.nilable(Prism::Node)) }
def next_node
next_nodes.first
end
sig { returns(T.nilable(NodeContext)) }
def sclass_context
- sclass = T.let(nil, T.nilable(SyntaxTree::SClass))
+ sclass = T.let(nil, T.nilable(Prism::SingletonClassNode))
nesting = @nesting.dup
until nesting.empty? || sclass
node = nesting.pop
- next unless node.is_a?(SyntaxTree::SClass)
+ next unless node.is_a?(Prism::SingletonClassNode)
sclass = node
end
- return unless sclass.is_a?(SyntaxTree::SClass)
+ return unless sclass.is_a?(Prism::SingletonClassNode)
+
+ body = sclass.body
+ return NodeContext.new(@source, @comments, sclass, nesting) unless body.is_a?(Prism::StatementsNode)
- nodes = sclass.bodystmt.statements.body.reject do |node|
- node.is_a?(SyntaxTree::VoidStmt) || node.is_a?(SyntaxTree::Comment) ||
- sorbet_signature?(node) || sorbet_extend_sig?(node)
+ nodes = body.child_nodes.reject do |node|
+ sorbet_signature?(node) || sorbet_extend_sig?(node)
end
if nodes.size <= 1
- return NodeContext.new(@source, sclass, nesting)
+ return NodeContext.new(@source, @comments, sclass, nesting)
end
nil
end
- sig { params(node: T.nilable(SyntaxTree::Node)).returns(T::Boolean) }
+ sig { params(node: T.nilable(Prism::Node)).returns(T::Boolean) }
def sorbet_signature?(node)
- return false unless node.is_a?(SyntaxTree::MethodAddBlock)
+ node.is_a?(Prism::CallNode) && node.name == :sig
+ end
- call = node.call
- return false unless call.is_a?(SyntaxTree::CallNode)
+ sig { params(node: T.nilable(Prism::Node)).returns(T::Boolean) }
+ def sorbet_extend_sig?(node)
+ return false unless node.is_a?(Prism::CallNode)
+ return false unless node.name == :extend
- ident = call.message
- return false unless ident.is_a?(SyntaxTree::Ident)
+ args = node.arguments
+ return false unless args
+ return false unless args.arguments.size == 1
- ident.value == "sig"
+ args.arguments.first&.slice == "T::Sig"
end
- sig { params(node: T.nilable(SyntaxTree::Node)).returns(T::Boolean) }
- def sorbet_extend_sig?(node)
- return false unless node.is_a?(SyntaxTree::Command)
- return false unless node_string(node.message) == "extend"
- return false unless node.arguments.parts.size == 1
+ sig { params(start_line: Integer, end_line: Integer).returns(T::Array[Prism::Comment]) }
+ def comments_between_lines(start_line, end_line)
+ comments = T.let([], T::Array[Prism::Comment])
+
+ (start_line + 1).upto(end_line - 1) do |line|
+ comment = @comments[line]
+ comments << comment if comment
+ end
- node_string(T.must(node.arguments.parts.first)) == "T::Sig"
+ comments
end
- sig { params(comment: SyntaxTree::Node, node: SyntaxTree::Node).returns(T::Boolean) }
- def comment_for_node?(comment, node)
- return false unless comment.is_a?(SyntaxTree::Comment)
+ sig { params(node: Prism::Node).returns(T::Array[Prism::Comment]) }
+ def attached_comments(node)
+ comments = T.let([], T::Array[Prism::Comment])
+
+ start_line = node.location.start_line - 1
+ start_line.downto(1) do |line|
+ comment = @comments[line]
+ break unless comment
+
+ comments << comment
+ end
- comment.location.end_line == node.location.start_line - 1
+ comments.reverse
end
- sig { returns(T::Array[SyntaxTree::Node]) }
- def attached_comments_and_sigs
- nodes = T.let([], T::Array[SyntaxTree::Node])
+ sig { returns(T::Array[Prism::Node]) }
+ def attached_sigs
+ nodes = T.let([], T::Array[Prism::Node])
previous_nodes.reverse_each do |prev_node|
- break unless comment_for_node?(prev_node, nodes.last || node) || sorbet_signature?(prev_node)
+ break unless sorbet_signature?(prev_node)
nodes << prev_node
end
@@ -467,13 +530,13 @@ def attached_comments_and_sigs
nodes.reverse
end
- sig { returns(T.nilable(SyntaxTree::MethodAddBlock)) }
+ sig { returns(T.nilable(Prism::CallNode)) }
def attached_sig
previous_nodes.reverse_each do |node|
- if node.is_a?(SyntaxTree::Comment)
+ if node.is_a?(Prism::Comment)
next
elsif sorbet_signature?(node)
- return T.cast(node, SyntaxTree::MethodAddBlock)
+ return T.cast(node, Prism::CallNode)
else
break
end
@@ -481,19 +544,9 @@ def attached_sig
nil
end
-
- sig { params(node: T.any(Symbol, SyntaxTree::Node)).returns(String) }
- def node_string(node)
- case node
- when Symbol
- node.to_s
- else
- T.must(@source[node.location.start_char...node.location.end_char])
- end
- end
end
- class NodeFinder < SyntaxTree::Visitor
+ class NodeFinder < Visitor
extend T::Sig
class << self
@@ -501,10 +554,18 @@ class << self
sig { params(source: String, location: Location, kind: T.nilable(Definition::Kind)).returns(NodeContext) }
def find(source, location, kind)
- tree = SyntaxTree.parse(source)
+ result = Prism.parse(source)
+
+ unless result.success?
+ message = result.errors.map do |e|
+ "#{e.message} (at #{e.location.start_line}:#{e.location.start_column})."
+ end.join(" ")
+
+ raise ParserError, "Error while parsing #{location.file}: #{message}"
+ end
visitor = new(location)
- visitor.visit(tree)
+ visitor.visit(result.value)
node = visitor.node
unless node
@@ -515,45 +576,60 @@ def find(source, location, kind)
raise Error, "Can't find node at #{location}, expected #{kind} but got #{node.class}"
end
- NodeContext.new(source, node, visitor.nodes_nesting)
+ comments_by_line = T.let(
+ result.comments.to_h do |comment|
+ [comment.location.start_line, comment]
+ end,
+ T::Hash[Integer, Prism::Comment],
+ )
+
+ NodeContext.new(source, comments_by_line, node, visitor.nodes_nesting)
end
- sig { params(node: SyntaxTree::Node, kind: Definition::Kind).returns(T::Boolean) }
+ sig { params(node: Prism::Node, kind: Definition::Kind).returns(T::Boolean) }
def node_match_kind?(node, kind)
case kind
when Definition::Kind::AttrReader, Definition::Kind::AttrWriter
- node.is_a?(SyntaxTree::SymbolLiteral)
+ node.is_a?(Prism::SymbolNode)
when Definition::Kind::Class
- node.is_a?(SyntaxTree::ClassDeclaration)
+ node.is_a?(Prism::ClassNode)
when Definition::Kind::Constant
- node.is_a?(SyntaxTree::Const) || node.is_a?(SyntaxTree::ConstPathField)
+ node.is_a?(Prism::ConstantWriteNode) ||
+ node.is_a?(Prism::ConstantAndWriteNode) ||
+ node.is_a?(Prism::ConstantOrWriteNode) ||
+ node.is_a?(Prism::ConstantOperatorWriteNode) ||
+ node.is_a?(Prism::ConstantPathWriteNode) ||
+ node.is_a?(Prism::ConstantPathAndWriteNode) ||
+ node.is_a?(Prism::ConstantPathOrWriteNode) ||
+ node.is_a?(Prism::ConstantPathOperatorWriteNode) ||
+ node.is_a?(Prism::ConstantTargetNode)
when Definition::Kind::Method
- node.is_a?(SyntaxTree::DefNode)
+ node.is_a?(Prism::DefNode)
when Definition::Kind::Module
- node.is_a?(SyntaxTree::ModuleDeclaration)
+ node.is_a?(Prism::ModuleNode)
end
end
end
- sig { returns(T.nilable(SyntaxTree::Node)) }
+ sig { returns(T.nilable(Prism::Node)) }
attr_reader :node
- sig { returns(T::Array[SyntaxTree::Node]) }
+ sig { returns(T::Array[Prism::Node]) }
attr_reader :nodes_nesting
sig { params(location: Location).void }
def initialize(location)
super()
@location = location
- @node = T.let(nil, T.nilable(SyntaxTree::Node))
- @nodes_nesting = T.let([], T::Array[SyntaxTree::Node])
+ @node = T.let(nil, T.nilable(Prism::Node))
+ @nodes_nesting = T.let([], T::Array[Prism::Node])
end
- sig { override.params(node: T.nilable(SyntaxTree::Node)).void }
+ sig { override.params(node: T.nilable(Prism::Node)).void }
def visit(node)
return unless node
- location = location_from_node(node)
+ location = Location.from_prism(@location.file, node.location)
if location == @location
# We found the node we're looking for at `@location`
@@ -569,38 +645,6 @@ def visit(node)
super(node)
end
end
-
- private
-
- # TODO: remove once SyntaxTree location are fixed
- sig { params(node: SyntaxTree::Node).returns(Location) }
- def location_from_node(node)
- case node
- when SyntaxTree::Program, SyntaxTree::BodyStmt
- # Patch SyntaxTree node locations to use the one of their children
- location_from_children(node, node.statements.body)
- when SyntaxTree::Statements
- # Patch SyntaxTree node locations to use the one of their children
- location_from_children(node, node.body)
- else
- Location.from_syntax_tree(@location.file, node.location)
- end
- end
-
- # TODO: remove once SyntaxTree location are fixed
- sig { params(node: SyntaxTree::Node, nodes: T::Array[SyntaxTree::Node]).returns(Location) }
- def location_from_children(node, nodes)
- first = T.must(nodes.first)
- last = T.must(nodes.last)
-
- Location.new(
- @location.file,
- first.location.start_line,
- first.location.start_column,
- last.location.end_line,
- last.location.end_column,
- )
- end
end
end
end
diff --git a/lib/spoom/deadcode/send.rb b/lib/spoom/deadcode/send.rb
index 89ba5941..45e39259 100644
--- a/lib/spoom/deadcode/send.rb
+++ b/lib/spoom/deadcode/send.rb
@@ -3,16 +3,15 @@
module Spoom
module Deadcode
- # An abstraction to simplify handling of SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall and
- # SyntaxTree::VCall nodes.
+ # An abstraction to simplify handling of Prism::CallNode nodes.
class Send < T::Struct
extend T::Sig
- const :node, SyntaxTree::Node
+ const :node, Prism::CallNode
const :name, String
- const :recv, T.nilable(SyntaxTree::Node), default: nil
- const :args, T::Array[SyntaxTree::Node], default: []
- const :block, T.nilable(SyntaxTree::Node), default: nil
+ const :recv, T.nilable(Prism::Node), default: nil
+ const :args, T::Array[Prism::Node], default: []
+ const :block, T.nilable(Prism::Node), default: nil
sig do
type_parameters(:T)
@@ -25,13 +24,13 @@ def each_arg(arg_type, &block)
end
end
- sig { params(block: T.proc.params(key: SyntaxTree::Node, value: T.nilable(SyntaxTree::Node)).void).void }
+ sig { params(block: T.proc.params(key: Prism::Node, value: T.nilable(Prism::Node)).void).void }
def each_arg_assoc(&block)
args.each do |arg|
- next unless arg.is_a?(SyntaxTree::BareAssocHash) || arg.is_a?(SyntaxTree::HashLiteral)
+ next unless arg.is_a?(Prism::KeywordHashNode) || arg.is_a?(Prism::HashNode)
- arg.assocs.each do |assoc|
- yield(assoc.key, assoc.value) if assoc.is_a?(SyntaxTree::Assoc)
+ arg.elements.each do |assoc|
+ yield(assoc.key, assoc.value) if assoc.is_a?(Prism::AssocNode)
end
end
end
diff --git a/lib/spoom/deadcode/visitor.rb b/lib/spoom/deadcode/visitor.rb
new file mode 100644
index 00000000..f4a5d817
--- /dev/null
+++ b/lib/spoom/deadcode/visitor.rb
@@ -0,0 +1,755 @@
+# typed: strict
+# frozen_string_literal: true
+
+module Spoom
+ module Deadcode
+ class Visitor < Prism::Visitor
+ extend T::Sig
+
+ sig { override.params(node: Prism::Node).void }
+ def visit_child_nodes(node)
+ node.child_nodes.compact.each { |node| visit(node) }
+ end
+
+ sig { override.params(node: Prism::AliasGlobalVariableNode).void }
+ def visit_alias_global_variable_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::AliasMethodNode).void }
+ def visit_alias_method_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::AlternationPatternNode).void }
+ def visit_alternation_pattern_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::AndNode).void }
+ def visit_and_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ArgumentsNode).void }
+ def visit_arguments_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ArrayNode).void }
+ def visit_array_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ArrayPatternNode).void }
+ def visit_array_pattern_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::AssocNode).void }
+ def visit_assoc_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::AssocSplatNode).void }
+ def visit_assoc_splat_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::BackReferenceReadNode).void }
+ def visit_back_reference_read_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::BeginNode).void }
+ def visit_begin_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::BlockArgumentNode).void }
+ def visit_block_argument_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::BlockLocalVariableNode).void }
+ def visit_block_local_variable_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::BlockNode).void }
+ def visit_block_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::BlockParameterNode).void }
+ def visit_block_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::BlockParametersNode).void }
+ def visit_block_parameters_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::BreakNode).void }
+ def visit_break_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::CallAndWriteNode).void }
+ def visit_call_and_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::CallNode).void }
+ def visit_call_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::CallOperatorWriteNode).void }
+ def visit_call_operator_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::CallOrWriteNode).void }
+ def visit_call_or_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::CallTargetNode).void }
+ def visit_call_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::CapturePatternNode).void }
+ def visit_capture_pattern_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::CaseMatchNode).void }
+ def visit_case_match_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::CaseNode).void }
+ def visit_case_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ClassNode).void }
+ def visit_class_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ClassVariableAndWriteNode).void }
+ def visit_class_variable_and_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ClassVariableOperatorWriteNode).void }
+ def visit_class_variable_operator_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ClassVariableOrWriteNode).void }
+ def visit_class_variable_or_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ClassVariableReadNode).void }
+ def visit_class_variable_read_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ClassVariableTargetNode).void }
+ def visit_class_variable_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ClassVariableWriteNode).void }
+ def visit_class_variable_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantAndWriteNode).void }
+ def visit_constant_and_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantOperatorWriteNode).void }
+ def visit_constant_operator_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantOrWriteNode).void }
+ def visit_constant_or_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantPathAndWriteNode).void }
+ def visit_constant_path_and_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantPathNode).void }
+ def visit_constant_path_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantPathOperatorWriteNode).void }
+ def visit_constant_path_operator_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantPathOrWriteNode).void }
+ def visit_constant_path_or_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantPathTargetNode).void }
+ def visit_constant_path_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantPathWriteNode).void }
+ def visit_constant_path_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantReadNode).void }
+ def visit_constant_read_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantTargetNode).void }
+ def visit_constant_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ConstantWriteNode).void }
+ def visit_constant_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::DefNode).void }
+ def visit_def_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::DefinedNode).void }
+ def visit_defined_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ElseNode).void }
+ def visit_else_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::EmbeddedStatementsNode).void }
+ def visit_embedded_statements_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::EmbeddedVariableNode).void }
+ def visit_embedded_variable_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::EnsureNode).void }
+ def visit_ensure_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::FalseNode).void }
+ def visit_false_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::FindPatternNode).void }
+ def visit_find_pattern_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::FlipFlopNode).void }
+ def visit_flip_flop_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::FloatNode).void }
+ def visit_float_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ForNode).void }
+ def visit_for_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ForwardingArgumentsNode).void }
+ def visit_forwarding_arguments_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ForwardingParameterNode).void }
+ def visit_forwarding_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ForwardingSuperNode).void }
+ def visit_forwarding_super_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::GlobalVariableAndWriteNode).void }
+ def visit_global_variable_and_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::GlobalVariableOperatorWriteNode).void }
+ def visit_global_variable_operator_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::GlobalVariableOrWriteNode).void }
+ def visit_global_variable_or_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::GlobalVariableReadNode).void }
+ def visit_global_variable_read_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::GlobalVariableTargetNode).void }
+ def visit_global_variable_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::GlobalVariableWriteNode).void }
+ def visit_global_variable_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::HashNode).void }
+ def visit_hash_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::HashPatternNode).void }
+ def visit_hash_pattern_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::IfNode).void }
+ def visit_if_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ImaginaryNode).void }
+ def visit_imaginary_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ImplicitNode).void }
+ def visit_implicit_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ImplicitRestNode).void }
+ def visit_implicit_rest_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InNode).void }
+ def visit_in_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::IndexAndWriteNode).void }
+ def visit_index_and_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::IndexOperatorWriteNode).void }
+ def visit_index_operator_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::IndexOrWriteNode).void }
+ def visit_index_or_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::IndexTargetNode).void }
+ def visit_index_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InstanceVariableAndWriteNode).void }
+ def visit_instance_variable_and_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InstanceVariableOperatorWriteNode).void }
+ def visit_instance_variable_operator_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InstanceVariableOrWriteNode).void }
+ def visit_instance_variable_or_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InstanceVariableReadNode).void }
+ def visit_instance_variable_read_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InstanceVariableTargetNode).void }
+ def visit_instance_variable_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InstanceVariableWriteNode).void }
+ def visit_instance_variable_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::IntegerNode).void }
+ def visit_integer_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InterpolatedMatchLastLineNode).void }
+ def visit_interpolated_match_last_line_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InterpolatedRegularExpressionNode).void }
+ def visit_interpolated_regular_expression_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InterpolatedStringNode).void }
+ def visit_interpolated_string_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InterpolatedSymbolNode).void }
+ def visit_interpolated_symbol_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::InterpolatedXStringNode).void }
+ def visit_interpolated_x_string_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::KeywordHashNode).void }
+ def visit_keyword_hash_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::KeywordRestParameterNode).void }
+ def visit_keyword_rest_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::LambdaNode).void }
+ def visit_lambda_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::LocalVariableAndWriteNode).void }
+ def visit_local_variable_and_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::LocalVariableOperatorWriteNode).void }
+ def visit_local_variable_operator_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::LocalVariableOrWriteNode).void }
+ def visit_local_variable_or_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::LocalVariableReadNode).void }
+ def visit_local_variable_read_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::LocalVariableTargetNode).void }
+ def visit_local_variable_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::LocalVariableWriteNode).void }
+ def visit_local_variable_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::MatchLastLineNode).void }
+ def visit_match_last_line_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::MatchPredicateNode).void }
+ def visit_match_predicate_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::MatchRequiredNode).void }
+ def visit_match_required_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::MatchWriteNode).void }
+ def visit_match_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::MissingNode).void }
+ def visit_missing_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ModuleNode).void }
+ def visit_module_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::MultiTargetNode).void }
+ def visit_multi_target_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::MultiWriteNode).void }
+ def visit_multi_write_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::NextNode).void }
+ def visit_next_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::NilNode).void }
+ def visit_nil_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::NoKeywordsParameterNode).void }
+ def visit_no_keywords_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::NumberedParametersNode).void }
+ def visit_numbered_parameters_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::NumberedReferenceReadNode).void }
+ def visit_numbered_reference_read_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::OptionalKeywordParameterNode).void }
+ def visit_optional_keyword_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::OptionalParameterNode).void }
+ def visit_optional_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::OrNode).void }
+ def visit_or_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ParametersNode).void }
+ def visit_parameters_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ParenthesesNode).void }
+ def visit_parentheses_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::PinnedExpressionNode).void }
+ def visit_pinned_expression_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::PinnedVariableNode).void }
+ def visit_pinned_variable_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::PostExecutionNode).void }
+ def visit_post_execution_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::PreExecutionNode).void }
+ def visit_pre_execution_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ProgramNode).void }
+ def visit_program_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RangeNode).void }
+ def visit_range_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RationalNode).void }
+ def visit_rational_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RedoNode).void }
+ def visit_redo_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RegularExpressionNode).void }
+ def visit_regular_expression_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RequiredKeywordParameterNode).void }
+ def visit_required_keyword_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RequiredParameterNode).void }
+ def visit_required_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RescueModifierNode).void }
+ def visit_rescue_modifier_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RescueNode).void }
+ def visit_rescue_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RestParameterNode).void }
+ def visit_rest_parameter_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::RetryNode).void }
+ def visit_retry_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::ReturnNode).void }
+ def visit_return_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::SelfNode).void }
+ def visit_self_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::SingletonClassNode).void }
+ def visit_singleton_class_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::SourceEncodingNode).void }
+ def visit_source_encoding_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::SourceFileNode).void }
+ def visit_source_file_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::SourceLineNode).void }
+ def visit_source_line_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::SplatNode).void }
+ def visit_splat_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::StatementsNode).void }
+ def visit_statements_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::StringNode).void }
+ def visit_string_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::SuperNode).void }
+ def visit_super_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::SymbolNode).void }
+ def visit_symbol_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::TrueNode).void }
+ def visit_true_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::UndefNode).void }
+ def visit_undef_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::UnlessNode).void }
+ def visit_unless_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::UntilNode).void }
+ def visit_until_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::WhenNode).void }
+ def visit_when_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::WhileNode).void }
+ def visit_while_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::XStringNode).void }
+ def visit_x_string_node(node)
+ visit_child_nodes(node)
+ end
+
+ sig { override.params(node: Prism::YieldNode).void }
+ def visit_yield_node(node)
+ visit_child_nodes(node)
+ end
+ end
+ end
+end
diff --git a/sorbet/rbi/gems/base64@0.1.1.rbi b/sorbet/rbi/gems/base64@0.1.1.rbi
deleted file mode 100644
index 58bcecc2..00000000
--- a/sorbet/rbi/gems/base64@0.1.1.rbi
+++ /dev/null
@@ -1,172 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `base64` gem.
-# Please instead update this file by running `bin/tapioca gem base64`.
-
-# The Base64 module provides for the encoding (#encode64, #strict_encode64,
-# #urlsafe_encode64) and decoding (#decode64, #strict_decode64,
-# #urlsafe_decode64) of binary data using a Base64 representation.
-#
-# == Example
-#
-# A simple encoding and decoding.
-#
-# require "base64"
-#
-# enc = Base64.encode64('Send reinforcements')
-# # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n"
-# plain = Base64.decode64(enc)
-# # -> "Send reinforcements"
-#
-# The purpose of using base64 to encode data is that it translates any
-# binary data into purely printable characters.
-module Base64
- private
-
- # Returns the Base64-decoded version of +str+.
- # This method complies with RFC 2045.
- # Characters outside the base alphabet are ignored.
- #
- # require 'base64'
- # str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +
- # 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' +
- # 'ZSB0aHJlZQpBbmQgc28gb24uLi4K'
- # puts Base64.decode64(str)
- #
- # Generates:
- #
- # This is line one
- # This is line two
- # This is line three
- # And so on...
- #
- # source://base64//base64.rb#58
- def decode64(str); end
-
- # Returns the Base64-encoded version of +bin+.
- # This method complies with RFC 2045.
- # Line feeds are added to every 60 encoded characters.
- #
- # require 'base64'
- # Base64.encode64("Now is the time for all good coders\nto learn Ruby")
- #
- # Generates:
- #
- # Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
- # UnVieQ==
- #
- # source://base64//base64.rb#38
- def encode64(bin); end
-
- # Returns the Base64-decoded version of +str+.
- # This method complies with RFC 4648.
- # ArgumentError is raised if +str+ is incorrectly padded or contains
- # non-alphabet characters. Note that CR or LF are also rejected.
- #
- # source://base64//base64.rb#73
- def strict_decode64(str); end
-
- # Returns the Base64-encoded version of +bin+.
- # This method complies with RFC 4648.
- # No line feeds are added.
- #
- # source://base64//base64.rb#65
- def strict_encode64(bin); end
-
- # Returns the Base64-decoded version of +str+.
- # This method complies with ``Base 64 Encoding with URL and Filename Safe
- # Alphabet'' in RFC 4648.
- # The alphabet uses '-' instead of '+' and '_' instead of '/'.
- #
- # The padding character is optional.
- # This method accepts both correctly-padded and unpadded input.
- # Note that it still rejects incorrectly-padded input.
- #
- # source://base64//base64.rb#98
- def urlsafe_decode64(str); end
-
- # Returns the Base64-encoded version of +bin+.
- # This method complies with ``Base 64 Encoding with URL and Filename Safe
- # Alphabet'' in RFC 4648.
- # The alphabet uses '-' instead of '+' and '_' instead of '/'.
- # Note that the result can still contain '='.
- # You can remove the padding by setting +padding+ as false.
- #
- # source://base64//base64.rb#83
- def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
-
- class << self
- # Returns the Base64-decoded version of +str+.
- # This method complies with RFC 2045.
- # Characters outside the base alphabet are ignored.
- #
- # require 'base64'
- # str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +
- # 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' +
- # 'ZSB0aHJlZQpBbmQgc28gb24uLi4K'
- # puts Base64.decode64(str)
- #
- # Generates:
- #
- # This is line one
- # This is line two
- # This is line three
- # And so on...
- #
- # source://base64//base64.rb#58
- def decode64(str); end
-
- # Returns the Base64-encoded version of +bin+.
- # This method complies with RFC 2045.
- # Line feeds are added to every 60 encoded characters.
- #
- # require 'base64'
- # Base64.encode64("Now is the time for all good coders\nto learn Ruby")
- #
- # Generates:
- #
- # Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
- # UnVieQ==
- #
- # source://base64//base64.rb#38
- def encode64(bin); end
-
- # Returns the Base64-decoded version of +str+.
- # This method complies with RFC 4648.
- # ArgumentError is raised if +str+ is incorrectly padded or contains
- # non-alphabet characters. Note that CR or LF are also rejected.
- #
- # source://base64//base64.rb#73
- def strict_decode64(str); end
-
- # Returns the Base64-encoded version of +bin+.
- # This method complies with RFC 4648.
- # No line feeds are added.
- #
- # source://base64//base64.rb#65
- def strict_encode64(bin); end
-
- # Returns the Base64-decoded version of +str+.
- # This method complies with ``Base 64 Encoding with URL and Filename Safe
- # Alphabet'' in RFC 4648.
- # The alphabet uses '-' instead of '+' and '_' instead of '/'.
- #
- # The padding character is optional.
- # This method accepts both correctly-padded and unpadded input.
- # Note that it still rejects incorrectly-padded input.
- #
- # source://base64//base64.rb#98
- def urlsafe_decode64(str); end
-
- # Returns the Base64-encoded version of +bin+.
- # This method complies with ``Base 64 Encoding with URL and Filename Safe
- # Alphabet'' in RFC 4648.
- # The alphabet uses '-' instead of '+' and '_' instead of '/'.
- # Note that the result can still contain '='.
- # You can remove the padding by setting +padding+ as false.
- #
- # source://base64//base64.rb#83
- def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
- end
-end
diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi
deleted file mode 100644
index 4e1f7915..00000000
--- a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi
+++ /dev/null
@@ -1,1083 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `diff-lcs` gem.
-# Please instead update this file by running `bin/tapioca gem diff-lcs`.
-
-# source://diff-lcs//lib/diff/lcs.rb#3
-module Diff; end
-
-# source://diff-lcs//lib/diff/lcs.rb#51
-module Diff::LCS
- # Returns the difference set between +self+ and +other+. See Diff::LCS#diff.
- #
- # source://diff-lcs//lib/diff/lcs.rb#75
- def diff(other, callbacks = T.unsafe(nil), &block); end
-
- # Returns an Array containing the longest common subsequence(s) between
- # +self+ and +other+. See Diff::LCS#lcs.
- #
- # lcs = seq1.lcs(seq2)
- #
- # A note when using objects: Diff::LCS only works properly when each object
- # can be used as a key in a Hash, which typically means that the objects must
- # implement Object#eql? in a way that two identical values compare
- # identically for key purposes. That is:
- #
- # O.new('a').eql?(O.new('a')) == true
- #
- # source://diff-lcs//lib/diff/lcs.rb#70
- def lcs(other, &block); end
-
- # Attempts to patch +self+ with the provided +patchset+. A new sequence based
- # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts
- # to autodiscover the direction of the patch.
- #
- # source://diff-lcs//lib/diff/lcs.rb#101
- def patch(patchset); end
-
- # Attempts to patch +self+ with the provided +patchset+. A new sequence based
- # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no
- # patch direction autodiscovery.
- #
- # source://diff-lcs//lib/diff/lcs.rb#109
- def patch!(patchset); end
-
- # Attempts to patch +self+ with the provided +patchset+, using #patch!. If
- # the sequence this is used on supports #replace, the value of +self+ will be
- # replaced. See Diff::LCS#patch. Does no patch direction autodiscovery.
- #
- # source://diff-lcs//lib/diff/lcs.rb#123
- def patch_me(patchset); end
-
- # Returns the balanced ("side-by-side") difference set between +self+ and
- # +other+. See Diff::LCS#sdiff.
- #
- # source://diff-lcs//lib/diff/lcs.rb#81
- def sdiff(other, callbacks = T.unsafe(nil), &block); end
-
- # Traverses the discovered longest common subsequences between +self+ and
- # +other+ using the alternate, balanced algorithm. See
- # Diff::LCS#traverse_balanced.
- #
- # source://diff-lcs//lib/diff/lcs.rb#94
- def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end
-
- # Traverses the discovered longest common subsequences between +self+ and
- # +other+. See Diff::LCS#traverse_sequences.
- #
- # source://diff-lcs//lib/diff/lcs.rb#87
- def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end
-
- # Attempts to patch +self+ with the provided +patchset+. A new sequence based
- # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts
- # to autodiscover the direction of the patch.
- #
- # source://diff-lcs//lib/diff/lcs.rb#101
- def unpatch(patchset); end
-
- # Attempts to unpatch +self+ with the provided +patchset+. A new sequence
- # based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch.
- # Does no patch direction autodiscovery.
- #
- # source://diff-lcs//lib/diff/lcs.rb#116
- def unpatch!(patchset); end
-
- # Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!.
- # If the sequence this is used on supports #replace, the value of +self+ will
- # be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery.
- #
- # source://diff-lcs//lib/diff/lcs.rb#134
- def unpatch_me(patchset); end
-
- class << self
- # :yields seq1[i] for each matched:
- #
- # source://diff-lcs//lib/diff/lcs.rb#144
- def LCS(seq1, seq2, &block); end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#52
- def callbacks_for(callbacks); end
-
- # #diff computes the smallest set of additions and deletions necessary to
- # turn the first sequence into the second, and returns a description of these
- # changes.
- #
- # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate
- # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a
- # Class argument is provided for +callbacks+, #diff will attempt to
- # initialise it. If the +callbacks+ object (possibly initialised) responds to
- # #finish, it will be called.
- #
- # source://diff-lcs//lib/diff/lcs.rb#168
- def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end
-
- # :yields seq1[i] for each matched:
- #
- # source://diff-lcs//lib/diff/lcs.rb#144
- def lcs(seq1, seq2, &block); end
-
- # Applies a +patchset+ to the sequence +src+ according to the +direction+
- # (:patch or :unpatch), producing a new sequence.
- #
- # If the +direction+ is not specified, Diff::LCS::patch will attempt to
- # discover the direction of the +patchset+.
- #
- # A +patchset+ can be considered to apply forward (:patch) if the
- # following expression is true:
- #
- # patch(s1, diff(s1, s2)) -> s2
- #
- # A +patchset+ can be considered to apply backward (:unpatch) if the
- # following expression is true:
- #
- # patch(s2, diff(s1, s2)) -> s1
- #
- # If the +patchset+ contains no changes, the +src+ value will be returned as
- # either src.dup or +src+. A +patchset+ can be deemed as having no
- # changes if the following predicate returns true:
- #
- # patchset.empty? or
- # patchset.flatten(1).all? { |change| change.unchanged? }
- #
- # === Patchsets
- #
- # A +patchset+ is always an enumerable sequence of changes, hunks of changes,
- # or a mix of the two. A hunk of changes is an enumerable sequence of
- # changes:
- #
- # [ # patchset
- # # change
- # [ # hunk
- # # change
- # ]
- # ]
- #
- # The +patch+ method accepts patchsets that are enumerable sequences
- # containing either Diff::LCS::Change objects (or a subclass) or the array
- # representations of those objects. Prior to application, array
- # representations of Diff::LCS::Change objects will be reified.
- #
- # source://diff-lcs//lib/diff/lcs.rb#624
- def patch(src, patchset, direction = T.unsafe(nil)); end
-
- # Given a set of patchset, convert the current version to the next version.
- # Does no auto-discovery.
- #
- # source://diff-lcs//lib/diff/lcs.rb#734
- def patch!(src, patchset); end
-
- # #sdiff computes all necessary components to show two sequences and their
- # minimized differences side by side, just like the Unix utility
- # sdiff does:
- #
- # old < -
- # same same
- # before | after
- # - > new
- #
- # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate
- # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a
- # Class argument is provided for +callbacks+, #diff will attempt to
- # initialise it. If the +callbacks+ object (possibly initialised) responds to
- # #finish, it will be called.
- #
- # Each element of a returned array is a Diff::LCS::ContextChange object,
- # which can be implicitly converted to an array.
- #
- # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)|
- # case action
- # when '!'
- # # replace
- # when '-'
- # # delete
- # when '+'
- # # insert
- # end
- # end
- #
- # source://diff-lcs//lib/diff/lcs.rb#200
- def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end
-
- # #traverse_balanced is an alternative to #traverse_sequences. It uses a
- # different algorithm to iterate through the entries in the computed longest
- # common subsequence. Instead of viewing the changes as insertions or
- # deletions from one of the sequences, #traverse_balanced will report
- # changes between the sequences.
- #
- # The arguments to #traverse_balanced are the two sequences to traverse and a
- # callback object, like this:
- #
- # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new)
- #
- # #sdiff is implemented with #traverse_balanced.
- #
- # == Callback Methods
- #
- # Optional callback methods are emphasized.
- #
- # callbacks#match:: Called when +a+ and +b+ are pointing to
- # common elements in +A+ and +B+.
- # callbacks#discard_a:: Called when +a+ is pointing to an
- # element not in +B+.
- # callbacks#discard_b:: Called when +b+ is pointing to an
- # element not in +A+.
- # callbacks#change:: Called when +a+ and +b+ are pointing to
- # the same relative position, but
- # A[a] and B[b] are not
- # the same; a change has
- # occurred.
- #
- # #traverse_balanced might be a bit slower than #traverse_sequences,
- # noticable only while processing huge amounts of data.
- #
- # == Algorithm
- #
- # a---+
- # v
- # A = a b c e h j l m n p
- # B = b c d e f j k l m r s t
- # ^
- # b---+
- #
- # === Matches
- #
- # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+
- # and +B+, the arrows will initially point to the first elements of their
- # respective sequences. #traverse_sequences will advance the arrows through
- # the sequences one element at a time, calling a method on the user-specified
- # callback object before each advance. It will advance the arrows in such a
- # way that if there are elements A[i] and B[j] which are
- # both equal and part of the longest common subsequence, there will be some
- # moment during the execution of #traverse_sequences when arrow +a+ is
- # pointing to A[i] and arrow +b+ is pointing to B[j]. When
- # this happens, #traverse_sequences will call callbacks#match and
- # then it will advance both arrows.
- #
- # === Discards
- #
- # Otherwise, one of the arrows is pointing to an element of its sequence that
- # is not part of the longest common subsequence. #traverse_sequences will
- # advance that arrow and will call callbacks#discard_a or
- # callbacks#discard_b, depending on which arrow it advanced.
- #
- # === Changes
- #
- # If both +a+ and +b+ point to elements that are not part of the longest
- # common subsequence, then #traverse_sequences will try to call
- # callbacks#change and advance both arrows. If
- # callbacks#change is not implemented, then
- # callbacks#discard_a and callbacks#discard_b will be
- # called in turn.
- #
- # The methods for callbacks#match, callbacks#discard_a,
- # callbacks#discard_b, and callbacks#change are invoked
- # with an event comprising the action ("=", "+", "-", or "!", respectively),
- # the indicies +i+ and +j+, and the elements A[i] and B[j].
- # Return values are discarded by #traverse_balanced.
- #
- # === Context
- #
- # Note that +i+ and +j+ may not be the same index position, even if +a+ and
- # +b+ are considered to be pointing to matching or changed elements.
- #
- # source://diff-lcs//lib/diff/lcs.rb#475
- def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end
-
- # #traverse_sequences is the most general facility provided by this module;
- # #diff and #lcs are implemented as calls to it.
- #
- # The arguments to #traverse_sequences are the two sequences to traverse, and
- # a callback object, like this:
- #
- # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new)
- #
- # == Callback Methods
- #
- # Optional callback methods are emphasized.
- #
- # callbacks#match:: Called when +a+ and +b+ are pointing to
- # common elements in +A+ and +B+.
- # callbacks#discard_a:: Called when +a+ is pointing to an
- # element not in +B+.
- # callbacks#discard_b:: Called when +b+ is pointing to an
- # element not in +A+.
- # callbacks#finished_a:: Called when +a+ has reached the end of
- # sequence +A+.
- # callbacks#finished_b:: Called when +b+ has reached the end of
- # sequence +B+.
- #
- # == Algorithm
- #
- # a---+
- # v
- # A = a b c e h j l m n p
- # B = b c d e f j k l m r s t
- # ^
- # b---+
- #
- # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+
- # and +B+, the arrows will initially point to the first elements of their
- # respective sequences. #traverse_sequences will advance the arrows through
- # the sequences one element at a time, calling a method on the user-specified
- # callback object before each advance. It will advance the arrows in such a
- # way that if there are elements A[i] and B[j] which are
- # both equal and part of the longest common subsequence, there will be some
- # moment during the execution of #traverse_sequences when arrow +a+ is
- # pointing to A[i] and arrow +b+ is pointing to B[j]. When
- # this happens, #traverse_sequences will call callbacks#match and
- # then it will advance both arrows.
- #
- # Otherwise, one of the arrows is pointing to an element of its sequence that
- # is not part of the longest common subsequence. #traverse_sequences will
- # advance that arrow and will call callbacks#discard_a or
- # callbacks#discard_b, depending on which arrow it advanced. If both
- # arrows point to elements that are not part of the longest common
- # subsequence, then #traverse_sequences will advance arrow +a+ and call the
- # appropriate callback, then it will advance arrow +b+ and call the appropriate
- # callback.
- #
- # The methods for callbacks#match, callbacks#discard_a, and
- # callbacks#discard_b are invoked with an event comprising the
- # action ("=", "+", or "-", respectively), the indicies +i+ and +j+, and the
- # elements A[i] and B[j]. Return values are discarded by
- # #traverse_sequences.
- #
- # === End of Sequences
- #
- # If arrow +a+ reaches the end of its sequence before arrow +b+ does,
- # #traverse_sequence will try to call callbacks#finished_a with the
- # last index and element of +A+ (A[-1]) and the current index and
- # element of +B+ (B[j]). If callbacks#finished_a does not
- # exist, then callbacks#discard_b will be called on each element of
- # +B+ until the end of the sequence is reached (the call will be done with
- # A[-1] and B[j] for each element).
- #
- # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+,
- # callbacks#finished_b will be called with the current index and
- # element of +A+ (A[i]) and the last index and element of +B+
- # (A[-1]). Again, if callbacks#finished_b does not exist on
- # the callback object, then callbacks#discard_a will be called on
- # each element of +A+ until the end of the sequence is reached (A[i]
- # and B[-1]).
- #
- # There is a chance that one additional callbacks#discard_a or
- # callbacks#discard_b will be called after the end of the sequence
- # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet
- # reached the end of +B+.
- #
- # source://diff-lcs//lib/diff/lcs.rb#285
- def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end
-
- # Given a set of patchset, convert the current version to the prior version.
- # Does no auto-discovery.
- #
- # source://diff-lcs//lib/diff/lcs.rb#728
- def unpatch!(src, patchset); end
-
- private
-
- # source://diff-lcs//lib/diff/lcs/internals.rb#4
- def diff_traversal(method, seq1, seq2, callbacks, &block); end
- end
-end
-
-# An alias for DefaultCallbacks that is used in
-# Diff::LCS#traverse_balanced.
-#
-# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks)
-#
-# source://diff-lcs//lib/diff/lcs/callbacks.rb#50
-Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks
-
-# A block is an operation removing, adding, or changing a group of items.
-# Basically, this is just a list of changes, where each change adds or
-# deletes a single item. Used by bin/ldiff.
-#
-# source://diff-lcs//lib/diff/lcs/block.rb#6
-class Diff::LCS::Block
- # @return [Block] a new instance of Block
- #
- # source://diff-lcs//lib/diff/lcs/block.rb#9
- def initialize(chunk); end
-
- # Returns the value of attribute changes.
- #
- # source://diff-lcs//lib/diff/lcs/block.rb#7
- def changes; end
-
- # source://diff-lcs//lib/diff/lcs/block.rb#21
- def diff_size; end
-
- # Returns the value of attribute insert.
- #
- # source://diff-lcs//lib/diff/lcs/block.rb#7
- def insert; end
-
- # source://diff-lcs//lib/diff/lcs/block.rb#25
- def op; end
-
- # Returns the value of attribute remove.
- #
- # source://diff-lcs//lib/diff/lcs/block.rb#7
- def remove; end
-end
-
-# Represents a simplistic (non-contextual) change. Represents the removal or
-# addition of an element from either the old or the new sequenced
-# enumerable.
-#
-# source://diff-lcs//lib/diff/lcs/change.rb#6
-class Diff::LCS::Change
- include ::Comparable
-
- # @return [Change] a new instance of Change
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#27
- def initialize(*args); end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#65
- def <=>(other); end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#58
- def ==(other); end
-
- # Returns the action this Change represents.
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#20
- def action; end
-
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#72
- def adding?; end
-
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#84
- def changed?; end
-
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#76
- def deleting?; end
-
- # Returns the sequence element of the Change.
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#25
- def element; end
-
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#88
- def finished_a?; end
-
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#92
- def finished_b?; end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#34
- def inspect(*_args); end
-
- # Returns the position of the Change.
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#23
- def position; end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#38
- def to_a; end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#38
- def to_ary; end
-
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#80
- def unchanged?; end
-
- class << self
- # source://diff-lcs//lib/diff/lcs/change.rb#44
- def from_a(arr); end
-
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#15
- def valid_action?(action); end
- end
-end
-
-# source://diff-lcs//lib/diff/lcs/change.rb#7
-Diff::LCS::Change::IntClass = Integer
-
-# The only actions valid for changes are '+' (add), '-' (delete), '='
-# (no change), '!' (changed), '<' (tail changes from first sequence), or
-# '>' (tail changes from second sequence). The last two ('<>') are only
-# found with Diff::LCS::diff and Diff::LCS::sdiff.
-#
-# source://diff-lcs//lib/diff/lcs/change.rb#13
-Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array)
-
-# Represents a contextual change. Contains the position and values of the
-# elements in the old and the new sequenced enumerables as well as the action
-# taken.
-#
-# source://diff-lcs//lib/diff/lcs/change.rb#100
-class Diff::LCS::ContextChange < ::Diff::LCS::Change
- # @return [ContextChange] a new instance of ContextChange
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#114
- def initialize(*args); end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#166
- def <=>(other); end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#157
- def ==(other); end
-
- # Returns the new element being changed.
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#112
- def new_element; end
-
- # Returns the new position being changed.
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#108
- def new_position; end
-
- # Returns the old element being changed.
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#110
- def old_element; end
-
- # Returns the old position being changed.
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#106
- def old_position; end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#122
- def to_a; end
-
- # source://diff-lcs//lib/diff/lcs/change.rb#122
- def to_ary; end
-
- class << self
- # source://diff-lcs//lib/diff/lcs/change.rb#132
- def from_a(arr); end
-
- # Simplifies a context change for use in some diff callbacks. '<' actions
- # are converted to '-' and '>' actions are converted to '+'.
- #
- # source://diff-lcs//lib/diff/lcs/change.rb#138
- def simplify(event); end
- end
-end
-
-# This will produce a compound array of contextual diff change objects. Each
-# element in the #diffs array is a "hunk" array, where each element in each
-# "hunk" array is a single change. Each change is a Diff::LCS::ContextChange
-# that contains both the old index and new index values for the change. The
-# "hunk" provides the full context for the changes. Both old and new objects
-# will be presented for changed objects. +nil+ will be substituted for a
-# discarded object.
-#
-# seq1 = %w(a b c e h j l m n p)
-# seq2 = %w(b c d e f j k l m r s t)
-#
-# diffs = Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks)
-# # This example shows a simplified array format.
-# # [ [ [ '-', [ 0, 'a' ], [ 0, nil ] ] ], # 1
-# # [ [ '+', [ 3, nil ], [ 2, 'd' ] ] ], # 2
-# # [ [ '-', [ 4, 'h' ], [ 4, nil ] ], # 3
-# # [ '+', [ 5, nil ], [ 4, 'f' ] ] ],
-# # [ [ '+', [ 6, nil ], [ 6, 'k' ] ] ], # 4
-# # [ [ '-', [ 8, 'n' ], [ 9, nil ] ], # 5
-# # [ '+', [ 9, nil ], [ 9, 'r' ] ],
-# # [ '-', [ 9, 'p' ], [ 10, nil ] ],
-# # [ '+', [ 10, nil ], [ 10, 's' ] ],
-# # [ '+', [ 10, nil ], [ 11, 't' ] ] ] ]
-#
-# The five hunks shown are comprised of individual changes; if there is a
-# related set of changes, they are still shown individually.
-#
-# This callback can also be used with Diff::LCS#sdiff, which will produce
-# results like:
-#
-# diffs = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextCallbacks)
-# # This example shows a simplified array format.
-# # [ [ [ "-", [ 0, "a" ], [ 0, nil ] ] ], # 1
-# # [ [ "+", [ 3, nil ], [ 2, "d" ] ] ], # 2
-# # [ [ "!", [ 4, "h" ], [ 4, "f" ] ] ], # 3
-# # [ [ "+", [ 6, nil ], [ 6, "k" ] ] ], # 4
-# # [ [ "!", [ 8, "n" ], [ 9, "r" ] ], # 5
-# # [ "!", [ 9, "p" ], [ 10, "s" ] ],
-# # [ "+", [ 10, nil ], [ 11, "t" ] ] ] ]
-#
-# The five hunks are still present, but are significantly shorter in total
-# presentation, because changed items are shown as changes ("!") instead of
-# potentially "mismatched" pairs of additions and deletions.
-#
-# The result of this operation is similar to that of
-# Diff::LCS::SDiffCallbacks. They may be compared as:
-#
-# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" }
-# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1)
-#
-# s == c # -> true
-#
-# === Use
-#
-# This callback object must be initialised and can be used by the
-# Diff::LCS#diff or Diff::LCS#sdiff methods.
-#
-# cbo = Diff::LCS::ContextDiffCallbacks.new
-# Diff::LCS.LCS(seq1, seq2, cbo)
-# cbo.finish
-#
-# Note that the call to #finish is absolutely necessary, or the last set of
-# changes will not be visible. Alternatively, can be used as:
-#
-# cbo = Diff::LCS::ContextDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) }
-#
-# The necessary #finish call will be made.
-#
-# === Simplified Array Format
-#
-# The simplified array format used in the example above can be obtained
-# with:
-#
-# require 'pp'
-# pp diffs.map { |e| e.map { |f| f.to_a } }
-#
-# source://diff-lcs//lib/diff/lcs/callbacks.rb#223
-class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#232
- def change(event); end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#224
- def discard_a(event); end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#228
- def discard_b(event); end
-end
-
-# This callback object implements the default set of callback events,
-# which only returns the event itself. Note that #finished_a and
-# #finished_b are not implemented -- I haven't yet figured out where they
-# would be useful.
-#
-# Note that this is intended to be called as is, e.g.,
-#
-# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks)
-#
-# source://diff-lcs//lib/diff/lcs/callbacks.rb#14
-class Diff::LCS::DefaultCallbacks
- class << self
- # Called when both the old and new values have changed.
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#32
- def change(event); end
-
- # Called when the old value is discarded in favour of the new value.
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#22
- def discard_a(event); end
-
- # Called when the new value is discarded in favour of the old value.
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#27
- def discard_b(event); end
-
- # Called when two items match.
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#17
- def match(event); end
-
- private
-
- def new(*_arg0); end
- end
-end
-
-# This will produce a compound array of simple diff change objects. Each
-# element in the #diffs array is a +hunk+ or +hunk+ array, where each
-# element in each +hunk+ array is a single Change object representing the
-# addition or removal of a single element from one of the two tested
-# sequences. The +hunk+ provides the full context for the changes.
-#
-# diffs = Diff::LCS.diff(seq1, seq2)
-# # This example shows a simplified array format.
-# # [ [ [ '-', 0, 'a' ] ], # 1
-# # [ [ '+', 2, 'd' ] ], # 2
-# # [ [ '-', 4, 'h' ], # 3
-# # [ '+', 4, 'f' ] ],
-# # [ [ '+', 6, 'k' ] ], # 4
-# # [ [ '-', 8, 'n' ], # 5
-# # [ '-', 9, 'p' ],
-# # [ '+', 9, 'r' ],
-# # [ '+', 10, 's' ],
-# # [ '+', 11, 't' ] ] ]
-#
-# There are five hunks here. The first hunk says that the +a+ at position 0
-# of the first sequence should be deleted ('-'). The second hunk
-# says that the +d+ at position 2 of the second sequence should be inserted
-# ('+'). The third hunk says that the +h+ at position 4 of the
-# first sequence should be removed and replaced with the +f+ from position 4
-# of the second sequence. The other two hunks are described similarly.
-#
-# === Use
-#
-# This callback object must be initialised and is used by the Diff::LCS#diff
-# method.
-#
-# cbo = Diff::LCS::DiffCallbacks.new
-# Diff::LCS.LCS(seq1, seq2, cbo)
-# cbo.finish
-#
-# Note that the call to #finish is absolutely necessary, or the last set of
-# changes will not be visible. Alternatively, can be used as:
-#
-# cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) }
-#
-# The necessary #finish call will be made.
-#
-# === Simplified Array Format
-#
-# The simplified array format used in the example above can be obtained
-# with:
-#
-# require 'pp'
-# pp diffs.map { |e| e.map { |f| f.to_a } }
-#
-# source://diff-lcs//lib/diff/lcs/callbacks.rb#106
-class Diff::LCS::DiffCallbacks
- # :yields self:
- #
- # @return [DiffCallbacks] a new instance of DiffCallbacks
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#110
- def initialize; end
-
- # Returns the difference set collected during the diff process.
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#108
- def diffs; end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#133
- def discard_a(event); end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#137
- def discard_b(event); end
-
- # Finalizes the diff process. If an unprocessed hunk still exists, then it
- # is appended to the diff list.
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#125
- def finish; end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#129
- def match(_event); end
-
- private
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#141
- def finish_hunk; end
-end
-
-# A Hunk is a group of Blocks which overlap because of the context surrounding
-# each block. (So if we're not using context, every hunk will contain one
-# block.) Used in the diff program (bin/ldiff).
-#
-# source://diff-lcs//lib/diff/lcs/hunk.rb#8
-class Diff::LCS::Hunk
- # Create a hunk using references to both the old and new data, as well as the
- # piece of data.
- #
- # @return [Hunk] a new instance of Hunk
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#16
- def initialize(data_old, data_new, piece, flag_context, file_length_difference); end
-
- # Returns the value of attribute blocks.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#63
- def blocks; end
-
- # Returns a diff string based on a format.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#116
- def diff(format, last = T.unsafe(nil)); end
-
- # Returns the value of attribute end_new.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#65
- def end_new; end
-
- # Returns the value of attribute end_old.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#65
- def end_old; end
-
- # Returns the value of attribute file_length_difference.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#66
- def file_length_difference; end
-
- # Change the "start" and "end" fields to note that context should be added
- # to this hunk.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#70
- def flag_context; end
-
- # source://diff-lcs//lib/diff/lcs/hunk.rb#72
- def flag_context=(context); end
-
- # Merges this hunk and the provided hunk together if they overlap. Returns
- # a truthy value so that if there is no overlap, you can know the merge
- # was skipped.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#98
- def merge(hunk); end
-
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#326
- def missing_last_newline?(data); end
-
- # Determines whether there is an overlap between this hunk and the
- # provided hunk. This will be true if the difference between the two hunks
- # start or end positions is within one position of each other.
- #
- # @return [Boolean]
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#110
- def overlaps?(hunk); end
-
- # Returns the value of attribute start_new.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#64
- def start_new; end
-
- # Returns the value of attribute start_old.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#64
- def start_old; end
-
- # Merges this hunk and the provided hunk together if they overlap. Returns
- # a truthy value so that if there is no overlap, you can know the merge
- # was skipped.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#98
- def unshift(hunk); end
-
- private
-
- # source://diff-lcs//lib/diff/lcs/hunk.rb#213
- def context_diff(last = T.unsafe(nil)); end
-
- # Generate a range of item numbers to print. Only print 1 number if the
- # range has only one item in it. Otherwise, it's 'start,end'
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#293
- def context_range(mode, op, last = T.unsafe(nil)); end
-
- # source://diff-lcs//lib/diff/lcs/hunk.rb#271
- def ed_diff(format, _last = T.unsafe(nil)); end
-
- # source://diff-lcs//lib/diff/lcs/hunk.rb#339
- def encode(literal, target_encoding = T.unsafe(nil)); end
-
- # source://diff-lcs//lib/diff/lcs/hunk.rb#343
- def encode_as(string, *args); end
-
- # Note that an old diff can't have any context. Therefore, we know that
- # there's only one block in the hunk.
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#135
- def old_diff(_last = T.unsafe(nil)); end
-
- # source://diff-lcs//lib/diff/lcs/hunk.rb#160
- def unified_diff(last = T.unsafe(nil)); end
-
- # Generate a range of item numbers to print for unified diff. Print number
- # where block starts, followed by number of lines in the block
- # (don't print number of lines if it's 1)
- #
- # source://diff-lcs//lib/diff/lcs/hunk.rb#311
- def unified_range(mode, last); end
-end
-
-# source://diff-lcs//lib/diff/lcs/hunk.rb#10
-Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash)
-
-# source://diff-lcs//lib/diff/lcs/hunk.rb#9
-Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash)
-
-# source://diff-lcs//lib/diff/lcs/internals.rb#29
-module Diff::LCS::Internals
- class << self
- # This method will analyze the provided patchset to provide a single-pass
- # normalization (conversion of the array form of Diff::LCS::Change objects to
- # the object form of same) and detection of whether the patchset represents
- # changes to be made.
- #
- # source://diff-lcs//lib/diff/lcs/internals.rb#102
- def analyze_patchset(patchset, depth = T.unsafe(nil)); end
-
- # Examine the patchset and the source to see in which direction the
- # patch should be applied.
- #
- # WARNING: By default, this examines the whole patch, so this could take
- # some time. This also works better with Diff::LCS::ContextChange or
- # Diff::LCS::Change as its source, as an array will cause the creation
- # of one of the above.
- #
- # source://diff-lcs//lib/diff/lcs/internals.rb#147
- def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end
-
- # Compute the longest common subsequence between the sequenced
- # Enumerables +a+ and +b+. The result is an array whose contents is such
- # that
- #
- # result = Diff::LCS::Internals.lcs(a, b)
- # result.each_with_index do |e, i|
- # assert_equal(a[i], b[e]) unless e.nil?
- # end
- #
- # source://diff-lcs//lib/diff/lcs/internals.rb#41
- def lcs(a, b); end
-
- private
-
- # If +vector+ maps the matching elements of another collection onto this
- # Enumerable, compute the inverse of +vector+ that maps this Enumerable
- # onto the collection. (Currently unused.)
- #
- # source://diff-lcs//lib/diff/lcs/internals.rb#286
- def inverse_vector(a, vector); end
-
- # Returns a hash mapping each element of an Enumerable to the set of
- # positions it occupies in the Enumerable, optionally restricted to the
- # elements specified in the range of indexes specified by +interval+.
- #
- # source://diff-lcs//lib/diff/lcs/internals.rb#298
- def position_hash(enum, interval); end
-
- # Find the place at which +value+ would normally be inserted into the
- # Enumerable. If that place is already occupied by +value+, do nothing
- # and return +nil+. If the place does not exist (i.e., it is off the end
- # of the Enumerable), add it to the end. Otherwise, replace the element
- # at that point with +value+. It is assumed that the Enumerable's values
- # are numeric.
- #
- # This operation preserves the sort order.
- #
- # source://diff-lcs//lib/diff/lcs/internals.rb#252
- def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end
- end
-end
-
-# This will produce a simple array of diff change objects. Each element in
-# the #diffs array is a single ContextChange. In the set of #diffs provided
-# by SDiffCallbacks, both old and new objects will be presented for both
-# changed and unchanged objects. +nil+ will be substituted
-# for a discarded object.
-#
-# The diffset produced by this callback, when provided to Diff::LCS#sdiff,
-# will compute and display the necessary components to show two sequences
-# and their minimized differences side by side, just like the Unix utility
-# +sdiff+.
-#
-# same same
-# before | after
-# old < -
-# - > new
-#
-# seq1 = %w(a b c e h j l m n p)
-# seq2 = %w(b c d e f j k l m r s t)
-#
-# diffs = Diff::LCS.sdiff(seq1, seq2)
-# # This example shows a simplified array format.
-# # [ [ "-", [ 0, "a"], [ 0, nil ] ],
-# # [ "=", [ 1, "b"], [ 0, "b" ] ],
-# # [ "=", [ 2, "c"], [ 1, "c" ] ],
-# # [ "+", [ 3, nil], [ 2, "d" ] ],
-# # [ "=", [ 3, "e"], [ 3, "e" ] ],
-# # [ "!", [ 4, "h"], [ 4, "f" ] ],
-# # [ "=", [ 5, "j"], [ 5, "j" ] ],
-# # [ "+", [ 6, nil], [ 6, "k" ] ],
-# # [ "=", [ 6, "l"], [ 7, "l" ] ],
-# # [ "=", [ 7, "m"], [ 8, "m" ] ],
-# # [ "!", [ 8, "n"], [ 9, "r" ] ],
-# # [ "!", [ 9, "p"], [ 10, "s" ] ],
-# # [ "+", [ 10, nil], [ 11, "t" ] ] ]
-#
-# The result of this operation is similar to that of
-# Diff::LCS::ContextDiffCallbacks. They may be compared as:
-#
-# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" }
-# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1)
-#
-# s == c # -> true
-#
-# === Use
-#
-# This callback object must be initialised and is used by the Diff::LCS#sdiff
-# method.
-#
-# cbo = Diff::LCS::SDiffCallbacks.new
-# Diff::LCS.LCS(seq1, seq2, cbo)
-#
-# As with the other initialisable callback objects,
-# Diff::LCS::SDiffCallbacks can be initialised with a block. As there is no
-# "fininishing" to be done, this has no effect on the state of the object.
-#
-# cbo = Diff::LCS::SDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) }
-#
-# === Simplified Array Format
-#
-# The simplified array format used in the example above can be obtained
-# with:
-#
-# require 'pp'
-# pp diffs.map { |e| e.to_a }
-#
-# source://diff-lcs//lib/diff/lcs/callbacks.rb#301
-class Diff::LCS::SDiffCallbacks
- # :yields self:
- #
- # @return [SDiffCallbacks] a new instance of SDiffCallbacks
- # @yield [_self]
- # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#305
- def initialize; end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#322
- def change(event); end
-
- # Returns the difference set collected during the diff process.
- #
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#303
- def diffs; end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#314
- def discard_a(event); end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#318
- def discard_b(event); end
-
- # source://diff-lcs//lib/diff/lcs/callbacks.rb#310
- def match(event); end
-end
-
-# An alias for DefaultCallbacks that is used in
-# Diff::LCS#traverse_sequences.
-#
-# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks)
-#
-# source://diff-lcs//lib/diff/lcs/callbacks.rb#44
-Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks
-
-# source://diff-lcs//lib/diff/lcs.rb#52
-Diff::LCS::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/erubi@1.12.0.rbi b/sorbet/rbi/gems/erubi@1.12.0.rbi
index 18643b50..c52738fa 100644
--- a/sorbet/rbi/gems/erubi@1.12.0.rbi
+++ b/sorbet/rbi/gems/erubi@1.12.0.rbi
@@ -7,8 +7,7 @@
# source://erubi//lib/erubi.rb#3
module Erubi
class << self
- # source://erubi//lib/erubi.rb#35
- def h(value); end
+ def h(_arg0); end
end
end
@@ -140,7 +139,7 @@ Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
# source://erubi//lib/erubi.rb#16
-Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), FalseClass)
+Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass)
# source://erubi//lib/erubi.rb#4
Erubi::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/io-console@0.6.0.rbi b/sorbet/rbi/gems/io-console@0.7.1.rbi
similarity index 100%
rename from sorbet/rbi/gems/io-console@0.6.0.rbi
rename to sorbet/rbi/gems/io-console@0.7.1.rbi
diff --git a/sorbet/rbi/gems/irb@1.6.4.rbi b/sorbet/rbi/gems/irb@1.6.4.rbi
deleted file mode 100644
index fb94d0d3..00000000
--- a/sorbet/rbi/gems/irb@1.6.4.rbi
+++ /dev/null
@@ -1,342 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `irb` gem.
-# Please instead update this file by running `bin/tapioca gem irb`.
-
-# An output formatter used internally by the lexer.
-#
-# source://irb//lib/irb/notifier.rb#11
-module IRB::Notifier
- private
-
- # Define a new Notifier output source, returning a new CompositeNotifier
- # with the given +prefix+ and +output_method+.
- #
- # The optional +prefix+ will be appended to all objects being inspected
- # during output, using the given +output_method+ as the output source. If
- # no +output_method+ is given, StdioOutputMethod will be used, and all
- # expressions will be sent directly to STDOUT without any additional
- # formatting.
- #
- # source://irb//lib/irb/notifier.rb#31
- def def_notifier(prefix = T.unsafe(nil), output_method = T.unsafe(nil)); end
-
- class << self
- # Define a new Notifier output source, returning a new CompositeNotifier
- # with the given +prefix+ and +output_method+.
- #
- # The optional +prefix+ will be appended to all objects being inspected
- # during output, using the given +output_method+ as the output source. If
- # no +output_method+ is given, StdioOutputMethod will be used, and all
- # expressions will be sent directly to STDOUT without any additional
- # formatting.
- #
- # source://irb//lib/irb/notifier.rb#31
- def def_notifier(prefix = T.unsafe(nil), output_method = T.unsafe(nil)); end
- end
-end
-
-# An abstract class, or superclass, for CompositeNotifier and
-# LeveledNotifier to inherit. It provides several wrapper methods for the
-# OutputMethod object used by the Notifier.
-#
-# source://irb//lib/irb/notifier.rb#39
-class IRB::Notifier::AbstractNotifier
- # Creates a new Notifier object
- #
- # @return [AbstractNotifier] a new instance of AbstractNotifier
- #
- # source://irb//lib/irb/notifier.rb#41
- def initialize(prefix, base_notifier); end
-
- # Execute the given block if notifications are enabled.
- #
- # @yield [@base_notifier]
- #
- # source://irb//lib/irb/notifier.rb#99
- def exec_if; end
-
- # A wrapper method used to determine whether notifications are enabled.
- #
- # Defaults to +true+.
- #
- # @return [Boolean]
- #
- # source://irb//lib/irb/notifier.rb#53
- def notify?; end
-
- # Same as #ppx, except it uses the #prefix given during object
- # initialization.
- # See OutputMethod#ppx for more detail.
- #
- # source://irb//lib/irb/notifier.rb#82
- def pp(*objs); end
-
- # Same as #pp, except it concatenates the given +prefix+ with the #prefix
- # given during object initialization.
- #
- # See OutputMethod#ppx for more detail.
- #
- # source://irb//lib/irb/notifier.rb#92
- def ppx(prefix, *objs); end
-
- # The +prefix+ for this Notifier, which is appended to all objects being
- # inspected during output.
- #
- # source://irb//lib/irb/notifier.rb#48
- def prefix; end
-
- # See OutputMethod#print for more detail.
- #
- # source://irb//lib/irb/notifier.rb#58
- def print(*opts); end
-
- # See OutputMethod#printf for more detail.
- #
- # source://irb//lib/irb/notifier.rb#68
- def printf(format, *opts); end
-
- # See OutputMethod#printn for more detail.
- #
- # source://irb//lib/irb/notifier.rb#63
- def printn(*opts); end
-
- # See OutputMethod#puts for more detail.
- #
- # source://irb//lib/irb/notifier.rb#73
- def puts(*objs); end
-end
-
-# A class that can be used to create a group of notifier objects with the
-# intent of representing a leveled notification system for irb.
-#
-# This class will allow you to generate other notifiers, and assign them
-# the appropriate level for output.
-#
-# The Notifier class provides a class-method Notifier.def_notifier to
-# create a new composite notifier. Using the first composite notifier
-# object you create, sibling notifiers can be initialized with
-# #def_notifier.
-#
-# source://irb//lib/irb/notifier.rb#114
-class IRB::Notifier::CompositeNotifier < ::IRB::Notifier::AbstractNotifier
- # Create a new composite notifier object with the given +prefix+, and
- # +base_notifier+ to use for output.
- #
- # @return [CompositeNotifier] a new instance of CompositeNotifier
- #
- # source://irb//lib/irb/notifier.rb#117
- def initialize(prefix, base_notifier); end
-
- # Creates a new LeveledNotifier in the composite #notifiers group.
- #
- # The given +prefix+ will be assigned to the notifier, and +level+ will
- # be used as the index of the #notifiers Array.
- #
- # This method returns the newly created instance.
- #
- # source://irb//lib/irb/notifier.rb#133
- def def_notifier(level, prefix = T.unsafe(nil)); end
-
- # Returns the leveled notifier for this object
- #
- # source://irb//lib/irb/notifier.rb#140
- def level; end
-
- # Sets the leveled notifier for this object.
- #
- # When the given +value+ is an instance of AbstractNotifier,
- # #level_notifier is set to the given object.
- #
- # When an Integer is given, #level_notifier is set to the notifier at the
- # index +value+ in the #notifiers Array.
- #
- # If no notifier exists at the index +value+ in the #notifiers Array, an
- # ErrUndefinedNotifier exception is raised.
- #
- # An ErrUnrecognizedLevel exception is raised if the given +value+ is not
- # found in the existing #notifiers Array, or an instance of
- # AbstractNotifier
- #
- # source://irb//lib/irb/notifier.rb#157
- def level=(value); end
-
- # Returns the leveled notifier for this object
- #
- # source://irb//lib/irb/notifier.rb#140
- def level_notifier; end
-
- # Sets the leveled notifier for this object.
- #
- # When the given +value+ is an instance of AbstractNotifier,
- # #level_notifier is set to the given object.
- #
- # When an Integer is given, #level_notifier is set to the notifier at the
- # index +value+ in the #notifiers Array.
- #
- # If no notifier exists at the index +value+ in the #notifiers Array, an
- # ErrUndefinedNotifier exception is raised.
- #
- # An ErrUnrecognizedLevel exception is raised if the given +value+ is not
- # found in the existing #notifiers Array, or an instance of
- # AbstractNotifier
- #
- # source://irb//lib/irb/notifier.rb#157
- def level_notifier=(value); end
-
- # List of notifiers in the group
- #
- # source://irb//lib/irb/notifier.rb#125
- def notifiers; end
-end
-
-# source://irb//lib/irb/notifier.rb#12
-class IRB::Notifier::ErrUndefinedNotifier < ::StandardError
- # @return [ErrUndefinedNotifier] a new instance of ErrUndefinedNotifier
- #
- # source://irb//lib/irb/notifier.rb#13
- def initialize(val); end
-end
-
-# source://irb//lib/irb/notifier.rb#17
-class IRB::Notifier::ErrUnrecognizedLevel < ::StandardError
- # @return [ErrUnrecognizedLevel] a new instance of ErrUnrecognizedLevel
- #
- # source://irb//lib/irb/notifier.rb#18
- def initialize(val); end
-end
-
-# A leveled notifier is comparable to the composite group from
-# CompositeNotifier#notifiers.
-#
-# source://irb//lib/irb/notifier.rb#175
-class IRB::Notifier::LeveledNotifier < ::IRB::Notifier::AbstractNotifier
- include ::Comparable
-
- # Create a new leveled notifier with the given +base+, and +prefix+ to
- # send to AbstractNotifier.new
- #
- # The given +level+ is used to compare other leveled notifiers in the
- # CompositeNotifier group to determine whether or not to output
- # notifications.
- #
- # @return [LeveledNotifier] a new instance of LeveledNotifier
- #
- # source://irb//lib/irb/notifier.rb#184
- def initialize(base, level, prefix); end
-
- # Compares the level of this notifier object with the given +other+
- # notifier.
- #
- # See the Comparable module for more information.
- #
- # source://irb//lib/irb/notifier.rb#197
- def <=>(other); end
-
- # The current level of this notifier object
- #
- # source://irb//lib/irb/notifier.rb#191
- def level; end
-
- # Whether to output messages to the output method, depending on the level
- # of this notifier object.
- #
- # @return [Boolean]
- #
- # source://irb//lib/irb/notifier.rb#203
- def notify?; end
-end
-
-# NoMsgNotifier is a LeveledNotifier that's used as the default notifier
-# when creating a new CompositeNotifier.
-#
-# This notifier is used as the +zero+ index, or level +0+, for
-# CompositeNotifier#notifiers, and will not output messages of any sort.
-#
-# source://irb//lib/irb/notifier.rb#213
-class IRB::Notifier::NoMsgNotifier < ::IRB::Notifier::LeveledNotifier
- # Creates a new notifier that should not be used to output messages.
- #
- # @return [NoMsgNotifier] a new instance of NoMsgNotifier
- #
- # source://irb//lib/irb/notifier.rb#215
- def initialize; end
-
- # Ensures notifications are ignored, see AbstractNotifier#notify? for
- # more information.
- #
- # @return [Boolean]
- #
- # source://irb//lib/irb/notifier.rb#223
- def notify?; end
-end
-
-# An abstract output class for IO in irb. This is mainly used internally by
-# IRB::Notifier. You can define your own output method to use with Irb.new,
-# or Context.new
-#
-# source://irb//lib/irb/output-method.rb#11
-class IRB::OutputMethod
- # Returns an array of the given +format+ and +opts+ to be used by
- # Kernel#sprintf, if there was a successful Regexp match in the given
- # +format+ from #printf
- #
- # %
- # [#0- +]
- # (\*|\*[1-9][0-9]*\$|[1-9][0-9]*)
- # .(\*|\*[1-9][0-9]*\$|[1-9][0-9]*|)?
- # #(hh|h|l|ll|L|q|j|z|t)
- # [diouxXeEfgGcsb%]
- #
- # source://irb//lib/irb/output-method.rb#48
- def parse_printf_format(format, opts); end
-
- # Prints the given +objs+ calling Object#inspect on each.
- #
- # See #puts for more detail.
- #
- # source://irb//lib/irb/output-method.rb#64
- def pp(*objs); end
-
- # Prints the given +objs+ calling Object#inspect on each and appending the
- # given +prefix+.
- #
- # See #puts for more detail.
- #
- # source://irb//lib/irb/output-method.rb#72
- def ppx(prefix, *objs); end
-
- # Open this method to implement your own output method, raises a
- # NotImplementedError if you don't define #print in your own class.
- #
- # @raise [NotImplementedError]
- #
- # source://irb//lib/irb/output-method.rb#20
- def print(*opts); end
-
- # Extends IO#printf to format the given +opts+ for Kernel#sprintf using
- # #parse_printf_format
- #
- # source://irb//lib/irb/output-method.rb#31
- def printf(format, *opts); end
-
- # Prints the given +opts+, with a newline delimiter.
- #
- # source://irb//lib/irb/output-method.rb#25
- def printn(*opts); end
-
- # Calls #print on each element in the given +objs+, followed by a newline
- # character.
- #
- # source://irb//lib/irb/output-method.rb#54
- def puts(*objs); end
-end
-
-# source://irb//lib/irb/output-method.rb#12
-class IRB::OutputMethod::NotImplementedError < ::StandardError
- # @return [NotImplementedError] a new instance of NotImplementedError
- #
- # source://irb//lib/irb/output-method.rb#13
- def initialize(val); end
-end
diff --git a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi b/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi
index 3dea314d..c17586ce 100644
--- a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi
+++ b/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi
@@ -7,79 +7,79 @@
# source://minitest-reporters//lib/minitest/reporters.rb#3
module Minitest
class << self
- # source://minitest/5.20.0/lib/minitest.rb#176
+ # source://minitest/5.21.2/lib/minitest.rb#176
def __run(reporter, options); end
- # source://minitest/5.20.0/lib/minitest.rb#97
+ # source://minitest/5.21.2/lib/minitest.rb#97
def after_run(&block); end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def allow_fork; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def allow_fork=(_arg0); end
- # source://minitest/5.20.0/lib/minitest.rb#69
+ # source://minitest/5.21.2/lib/minitest.rb#69
def autorun; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def backtrace_filter; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def backtrace_filter=(_arg0); end
- # source://minitest/5.20.0/lib/minitest.rb#18
+ # source://minitest/5.21.2/lib/minitest.rb#18
def cattr_accessor(name); end
- # source://minitest/5.20.0/lib/minitest.rb#1102
+ # source://minitest/5.21.2/lib/minitest.rb#1134
def clock_time; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def extensions; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def extensions=(_arg0); end
- # source://minitest/5.20.0/lib/minitest.rb#267
+ # source://minitest/5.21.2/lib/minitest.rb#271
def filter_backtrace(bt); end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def info_signal; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def info_signal=(_arg0); end
- # source://minitest/5.20.0/lib/minitest.rb#101
+ # source://minitest/5.21.2/lib/minitest.rb#101
def init_plugins(options); end
- # source://minitest/5.20.0/lib/minitest.rb#108
+ # source://minitest/5.21.2/lib/minitest.rb#108
def load_plugins; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def parallel_executor; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def parallel_executor=(_arg0); end
- # source://minitest/5.20.0/lib/minitest.rb#189
+ # source://minitest/5.21.2/lib/minitest.rb#189
def process_args(args = T.unsafe(nil)); end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def reporter; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def reporter=(_arg0); end
- # source://minitest/5.20.0/lib/minitest.rb#143
+ # source://minitest/5.21.2/lib/minitest.rb#143
def run(args = T.unsafe(nil)); end
- # source://minitest/5.20.0/lib/minitest.rb#1093
+ # source://minitest/5.21.2/lib/minitest.rb#1125
def run_one_method(klass, method_name); end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def seed; end
- # source://minitest/5.20.0/lib/minitest.rb#19
+ # source://minitest/5.21.2/lib/minitest.rb#19
def seed=(_arg0); end
end
end
diff --git a/sorbet/rbi/gems/minitest@5.20.0.rbi b/sorbet/rbi/gems/minitest@5.21.2.rbi
similarity index 78%
rename from sorbet/rbi/gems/minitest@5.20.0.rbi
rename to sorbet/rbi/gems/minitest@5.21.2.rbi
index 54a4012b..d6bbf6c2 100644
--- a/sorbet/rbi/gems/minitest@5.20.0.rbi
+++ b/sorbet/rbi/gems/minitest@5.21.2.rbi
@@ -43,7 +43,7 @@ module Minitest
# source://minitest//lib/minitest.rb#18
def cattr_accessor(name); end
- # source://minitest//lib/minitest.rb#1102
+ # source://minitest//lib/minitest.rb#1134
def clock_time; end
# source://minitest//lib/minitest.rb#19
@@ -52,7 +52,7 @@ module Minitest
# source://minitest//lib/minitest.rb#19
def extensions=(_arg0); end
- # source://minitest//lib/minitest.rb#267
+ # source://minitest//lib/minitest.rb#271
def filter_backtrace(bt); end
# source://minitest//lib/minitest.rb#19
@@ -101,7 +101,7 @@ module Minitest
# source://minitest//lib/minitest.rb#143
def run(args = T.unsafe(nil)); end
- # source://minitest//lib/minitest.rb#1093
+ # source://minitest//lib/minitest.rb#1125
def run_one_method(klass, method_name); end
# source://minitest//lib/minitest.rb#19
@@ -115,27 +115,24 @@ end
# Defines the API for Reporters. Subclass this and override whatever
# you want. Go nuts.
#
-# source://minitest//lib/minitest.rb#621
+# source://minitest//lib/minitest.rb#627
class Minitest::AbstractReporter
- include ::Mutex_m
-
- # source://mutex_m/0.1.2/mutex_m.rb#93
- def lock; end
-
- # source://mutex_m/0.1.2/mutex_m.rb#83
- def locked?; end
+ # @return [AbstractReporter] a new instance of AbstractReporter
+ #
+ # source://minitest//lib/minitest.rb#629
+ def initialize; end
# Did this run pass?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#655
+ # source://minitest//lib/minitest.rb#664
def passed?; end
# About to start running a test. This allows a reporter to show
# that it is starting or that we are in the middle of a test run.
#
- # source://minitest//lib/minitest.rb#634
+ # source://minitest//lib/minitest.rb#643
def prerecord(klass, name); end
# Output and record the result of the test. Call
@@ -143,48 +140,45 @@ class Minitest::AbstractReporter
# result character string. Stores the result of the run if the run
# did not pass.
#
- # source://minitest//lib/minitest.rb#643
+ # source://minitest//lib/minitest.rb#652
def record(result); end
# Outputs the summary of the run.
#
- # source://minitest//lib/minitest.rb#649
+ # source://minitest//lib/minitest.rb#658
def report; end
# Starts reporting on the run.
#
- # source://minitest//lib/minitest.rb#627
+ # source://minitest//lib/minitest.rb#636
def start; end
- # source://mutex_m/0.1.2/mutex_m.rb#78
+ # source://minitest//lib/minitest.rb#668
def synchronize(&block); end
-
- # source://mutex_m/0.1.2/mutex_m.rb#88
- def try_lock; end
-
- # source://mutex_m/0.1.2/mutex_m.rb#98
- def unlock; end
end
# Represents run failures.
#
-# source://minitest//lib/minitest.rb#938
+# source://minitest//lib/minitest.rb#951
class Minitest::Assertion < ::Exception
- # source://minitest//lib/minitest.rb#939
+ # source://minitest//lib/minitest.rb#954
def error; end
# Where was this run before an assertion was raised?
#
- # source://minitest//lib/minitest.rb#946
+ # source://minitest//lib/minitest.rb#961
def location; end
- # source://minitest//lib/minitest.rb#955
+ # source://minitest//lib/minitest.rb#968
def result_code; end
- # source://minitest//lib/minitest.rb#959
+ # source://minitest//lib/minitest.rb#972
def result_label; end
end
+# source://minitest//lib/minitest.rb#952
+Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp)
+
# Minitest Assertions. All assertion methods accept a +msg+ which is
# printed if the assertion fails.
#
@@ -199,6 +193,9 @@ module Minitest::Assertions
# source://minitest//lib/minitest/assertions.rb#188
def _synchronize; end
+ # source://minitest//lib/minitest/assertions.rb#201
+ def _where; end
+
# Fails unless +test+ is truthy.
#
# source://minitest//lib/minitest/assertions.rb#178
@@ -221,7 +218,7 @@ module Minitest::Assertions
#
# See also: Minitest::Assertions.diff
#
- # source://minitest//lib/minitest/assertions.rb#216
+ # source://minitest//lib/minitest/assertions.rb#221
def assert_equal(exp, act, msg = T.unsafe(nil)); end
# For comparing Floats. Fails unless +exp+ and +act+ are within +delta+
@@ -229,50 +226,50 @@ module Minitest::Assertions
#
# assert_in_delta Math::PI, (22.0 / 7.0), 0.01
#
- # source://minitest//lib/minitest/assertions.rb#240
+ # source://minitest//lib/minitest/assertions.rb#242
def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
# For comparing Floats. Fails unless +exp+ and +act+ have a relative
# error less than +epsilon+.
#
- # source://minitest//lib/minitest/assertions.rb#252
+ # source://minitest//lib/minitest/assertions.rb#254
def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails unless +collection+ includes +obj+.
#
- # source://minitest//lib/minitest/assertions.rb#259
+ # source://minitest//lib/minitest/assertions.rb#261
def assert_includes(collection, obj, msg = T.unsafe(nil)); end
# Fails unless +obj+ is an instance of +cls+.
#
- # source://minitest//lib/minitest/assertions.rb#270
+ # source://minitest//lib/minitest/assertions.rb#272
def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end
# Fails unless +obj+ is a kind of +cls+.
#
- # source://minitest//lib/minitest/assertions.rb#281
+ # source://minitest//lib/minitest/assertions.rb#283
def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end
# Fails unless +matcher+ =~ +obj+.
#
- # source://minitest//lib/minitest/assertions.rb#291
+ # source://minitest//lib/minitest/assertions.rb#293
def assert_match(matcher, obj, msg = T.unsafe(nil)); end
# Assert that the mock verifies correctly.
#
- # source://minitest//lib/minitest/mock.rb#248
+ # source://minitest//lib/minitest/mock.rb#250
def assert_mock(mock); end
# Fails unless +obj+ is nil
#
- # source://minitest//lib/minitest/assertions.rb#303
+ # source://minitest//lib/minitest/assertions.rb#305
def assert_nil(obj, msg = T.unsafe(nil)); end
# For testing with binary operators. Eg:
#
# assert_operator 5, :<=, 4
#
- # source://minitest//lib/minitest/assertions.rb#313
+ # source://minitest//lib/minitest/assertions.rb#315
def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails if stdout or stderr do not output the expected results.
@@ -286,12 +283,12 @@ module Minitest::Assertions
#
# See also: #assert_silent
#
- # source://minitest//lib/minitest/assertions.rb#331
+ # source://minitest//lib/minitest/assertions.rb#333
def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end
# Fails unless +path+ exists.
#
- # source://minitest//lib/minitest/assertions.rb#355
+ # source://minitest//lib/minitest/assertions.rb#357
def assert_path_exists(path, msg = T.unsafe(nil)); end
# For testing with pattern matching (only supported with Ruby 3.0 and later)
@@ -309,7 +306,7 @@ module Minitest::Assertions
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest/assertions.rb#374
+ # source://minitest//lib/minitest/assertions.rb#376
def assert_pattern; end
# For testing with predicates. Eg:
@@ -320,7 +317,7 @@ module Minitest::Assertions
#
# str.must_be :empty?
#
- # source://minitest//lib/minitest/assertions.rb#395
+ # source://minitest//lib/minitest/assertions.rb#397
def assert_predicate(o1, op, msg = T.unsafe(nil)); end
# Fails unless the block raises one of +exp+. Returns the
@@ -344,36 +341,37 @@ module Minitest::Assertions
#
# assert_equal 'This is really bad', error.message
#
- # source://minitest//lib/minitest/assertions.rb#422
+ # source://minitest//lib/minitest/assertions.rb#424
def assert_raises(*exp); end
# Fails unless +obj+ responds to +meth+.
+ # include_all defaults to false to match Object#respond_to?
#
- # source://minitest//lib/minitest/assertions.rb#453
- def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end
+ # source://minitest//lib/minitest/assertions.rb#456
+ def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
# Fails unless +exp+ and +act+ are #equal?
#
- # source://minitest//lib/minitest/assertions.rb#463
+ # source://minitest//lib/minitest/assertions.rb#466
def assert_same(exp, act, msg = T.unsafe(nil)); end
# +send_ary+ is a receiver, message and arguments.
#
# Fails unless the call returns a true value
#
- # source://minitest//lib/minitest/assertions.rb#476
+ # source://minitest//lib/minitest/assertions.rb#479
def assert_send(send_ary, m = T.unsafe(nil)); end
# Fails if the block outputs anything to stderr or stdout.
#
# See also: #assert_output
#
- # source://minitest//lib/minitest/assertions.rb#492
+ # source://minitest//lib/minitest/assertions.rb#493
def assert_silent; end
# Fails unless the block throws +sym+
#
- # source://minitest//lib/minitest/assertions.rb#501
+ # source://minitest//lib/minitest/assertions.rb#502
def assert_throws(sym, msg = T.unsafe(nil)); end
# Captures $stdout and $stderr into strings:
@@ -390,7 +388,7 @@ module Minitest::Assertions
# capture IO for subprocesses. Use #capture_subprocess_io for
# that.
#
- # source://minitest//lib/minitest/assertions.rb#542
+ # source://minitest//lib/minitest/assertions.rb#543
def capture_io; end
# Captures $stdout and $stderr into strings, using Tempfile to
@@ -407,7 +405,7 @@ module Minitest::Assertions
# NOTE: This method is approximately 10x slower than #capture_io so
# only use it when you need to test the output of a subprocess.
#
- # source://minitest//lib/minitest/assertions.rb#575
+ # source://minitest//lib/minitest/assertions.rb#576
def capture_subprocess_io; end
# Returns a diff between +exp+ and +act+. If there is no known
@@ -422,24 +420,24 @@ module Minitest::Assertions
# Returns details for exception +e+
#
- # source://minitest//lib/minitest/assertions.rb#607
+ # source://minitest//lib/minitest/assertions.rb#608
def exception_details(e, msg); end
# Fails after a given date (in the local time zone). This allows
# you to put time-bombs in your tests if you need to keep
# something around until a later date lest you forget about it.
#
- # source://minitest//lib/minitest/assertions.rb#623
+ # source://minitest//lib/minitest/assertions.rb#624
def fail_after(y, m, d, msg); end
# Fails with +msg+.
#
- # source://minitest//lib/minitest/assertions.rb#630
+ # source://minitest//lib/minitest/assertions.rb#631
def flunk(msg = T.unsafe(nil)); end
# Returns a proc that will output +msg+ along with the default message.
#
- # source://minitest//lib/minitest/assertions.rb#638
+ # source://minitest//lib/minitest/assertions.rb#639
def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end
# This returns a human-readable version of +obj+. By default
@@ -461,62 +459,62 @@ module Minitest::Assertions
# used for counting assertions
#
- # source://minitest//lib/minitest/assertions.rb#649
+ # source://minitest//lib/minitest/assertions.rb#650
def pass(_msg = T.unsafe(nil)); end
# Fails if +test+ is truthy.
#
- # source://minitest//lib/minitest/assertions.rb#656
+ # source://minitest//lib/minitest/assertions.rb#657
def refute(test, msg = T.unsafe(nil)); end
# Fails if +obj+ is empty.
#
- # source://minitest//lib/minitest/assertions.rb#664
+ # source://minitest//lib/minitest/assertions.rb#665
def refute_empty(obj, msg = T.unsafe(nil)); end
# Fails if exp == act.
#
# For floats use refute_in_delta.
#
- # source://minitest//lib/minitest/assertions.rb#675
+ # source://minitest//lib/minitest/assertions.rb#676
def refute_equal(exp, act, msg = T.unsafe(nil)); end
# For comparing Floats. Fails if +exp+ is within +delta+ of +act+.
#
# refute_in_delta Math::PI, (22.0 / 7.0)
#
- # source://minitest//lib/minitest/assertions.rb#687
+ # source://minitest//lib/minitest/assertions.rb#688
def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
# For comparing Floats. Fails if +exp+ and +act+ have a relative error
# less than +epsilon+.
#
- # source://minitest//lib/minitest/assertions.rb#699
+ # source://minitest//lib/minitest/assertions.rb#700
def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails if +collection+ includes +obj+.
#
- # source://minitest//lib/minitest/assertions.rb#706
+ # source://minitest//lib/minitest/assertions.rb#707
def refute_includes(collection, obj, msg = T.unsafe(nil)); end
# Fails if +obj+ is an instance of +cls+.
#
- # source://minitest//lib/minitest/assertions.rb#717
+ # source://minitest//lib/minitest/assertions.rb#718
def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end
# Fails if +obj+ is a kind of +cls+.
#
- # source://minitest//lib/minitest/assertions.rb#727
+ # source://minitest//lib/minitest/assertions.rb#728
def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end
# Fails if +matcher+ =~ +obj+.
#
- # source://minitest//lib/minitest/assertions.rb#735
+ # source://minitest//lib/minitest/assertions.rb#736
def refute_match(matcher, obj, msg = T.unsafe(nil)); end
# Fails if +obj+ is nil.
#
- # source://minitest//lib/minitest/assertions.rb#745
+ # source://minitest//lib/minitest/assertions.rb#746
def refute_nil(obj, msg = T.unsafe(nil)); end
# Fails if +o1+ is not +op+ +o2+. Eg:
@@ -524,12 +522,12 @@ module Minitest::Assertions
# refute_operator 1, :>, 2 #=> pass
# refute_operator 1, :<, 2 #=> fail
#
- # source://minitest//lib/minitest/assertions.rb#780
+ # source://minitest//lib/minitest/assertions.rb#781
def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails if +path+ exists.
#
- # source://minitest//lib/minitest/assertions.rb#789
+ # source://minitest//lib/minitest/assertions.rb#790
def refute_path_exists(path, msg = T.unsafe(nil)); end
# For testing with pattern matching (only supported with Ruby 3.0 and later)
@@ -545,7 +543,7 @@ module Minitest::Assertions
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest/assertions.rb#762
+ # source://minitest//lib/minitest/assertions.rb#763
def refute_pattern; end
# For testing with predicates.
@@ -556,17 +554,18 @@ module Minitest::Assertions
#
# str.wont_be :empty?
#
- # source://minitest//lib/minitest/assertions.rb#803
+ # source://minitest//lib/minitest/assertions.rb#804
def refute_predicate(o1, op, msg = T.unsafe(nil)); end
# Fails if +obj+ responds to the message +meth+.
+ # include_all defaults to false to match Object#respond_to?
#
- # source://minitest//lib/minitest/assertions.rb#811
- def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end
+ # source://minitest//lib/minitest/assertions.rb#813
+ def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
# Fails if +exp+ is the same (by object identity) as +act+.
#
- # source://minitest//lib/minitest/assertions.rb#820
+ # source://minitest//lib/minitest/assertions.rb#822
def refute_same(exp, act, msg = T.unsafe(nil)); end
# Skips the current run. If run in verbose-mode, the skipped run
@@ -575,22 +574,22 @@ module Minitest::Assertions
#
# @raise [Minitest::Skip]
#
- # source://minitest//lib/minitest/assertions.rb#833
- def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end
+ # source://minitest//lib/minitest/assertions.rb#835
+ def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end
# Skips the current run until a given date (in the local time
# zone). This allows you to put some fixes on hold until a later
# date, but still holds you accountable and prevents you from
# forgetting it.
#
- # source://minitest//lib/minitest/assertions.rb#845
+ # source://minitest//lib/minitest/assertions.rb#847
def skip_until(y, m, d, msg); end
# Was this testcase skipped? Meant for #teardown.
#
# @return [Boolean]
#
- # source://minitest//lib/minitest/assertions.rb#854
+ # source://minitest//lib/minitest/assertions.rb#856
def skipped?; end
# Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff.
@@ -619,7 +618,7 @@ module Minitest::Assertions
end
end
-# source://minitest//lib/minitest/assertions.rb#201
+# source://minitest//lib/minitest/assertions.rb#206
Minitest::Assertions::E = T.let(T.unsafe(nil), String)
# source://minitest//lib/minitest/assertions.rb#19
@@ -629,63 +628,91 @@ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object)
#
# See Minitest.backtrace_filter=.
#
-# source://minitest//lib/minitest.rb#1070
+# source://minitest//lib/minitest.rb#1096
class Minitest::BacktraceFilter
+ # @return [BacktraceFilter] a new instance of BacktraceFilter
+ #
+ # source://minitest//lib/minitest.rb#1102
+ def initialize(regexp = T.unsafe(nil)); end
+
# Filter +bt+ to something useful. Returns the whole thing if
# $DEBUG (ruby) or $MT_DEBUG (env).
#
- # source://minitest//lib/minitest.rb#1078
+ # source://minitest//lib/minitest.rb#1110
def filter(bt); end
+
+ # Returns the value of attribute regexp.
+ #
+ # source://minitest//lib/minitest.rb#1100
+ def regexp; end
+
+ # Sets the attribute regexp
+ #
+ # @param value the value to set the attribute regexp to.
+ #
+ # source://minitest//lib/minitest.rb#1100
+ def regexp=(_arg0); end
end
-# source://minitest//lib/minitest.rb#1072
+# source://minitest//lib/minitest.rb#1098
Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp)
# Dispatch to multiple reporters as one.
#
-# source://minitest//lib/minitest.rb#887
+# source://minitest//lib/minitest.rb#900
class Minitest::CompositeReporter < ::Minitest::AbstractReporter
# @return [CompositeReporter] a new instance of CompositeReporter
#
- # source://minitest//lib/minitest.rb#893
+ # source://minitest//lib/minitest.rb#906
def initialize(*reporters); end
# Add another reporter to the mix.
#
- # source://minitest//lib/minitest.rb#905
+ # source://minitest//lib/minitest.rb#918
def <<(reporter); end
- # source://minitest//lib/minitest.rb#898
+ # source://minitest//lib/minitest.rb#911
def io; end
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#909
+ # source://minitest//lib/minitest.rb#922
def passed?; end
- # source://minitest//lib/minitest.rb#917
+ # source://minitest//lib/minitest.rb#930
def prerecord(klass, name); end
- # source://minitest//lib/minitest.rb#924
+ # source://minitest//lib/minitest.rb#937
def record(result); end
- # source://minitest//lib/minitest.rb#930
+ # source://minitest//lib/minitest.rb#943
def report; end
# The list of reporters to dispatch to.
#
- # source://minitest//lib/minitest.rb#891
+ # source://minitest//lib/minitest.rb#904
def reporters; end
# The list of reporters to dispatch to.
#
- # source://minitest//lib/minitest.rb#891
+ # source://minitest//lib/minitest.rb#904
def reporters=(_arg0); end
- # source://minitest//lib/minitest.rb#913
+ # source://minitest//lib/minitest.rb#926
def start; end
end
+# Compresses backtraces.
+#
+# source://minitest//lib/minitest/compress.rb#5
+module Minitest::Compress
+ # Takes a backtrace (array of strings) and compresses repeating
+ # cycles in it to make it more readable.
+ #
+ # source://minitest//lib/minitest/compress.rb#11
+ def compress(orig); end
+end
+
# Provides a simple set of guards that you can use in your tests
# to skip execution if it is not applicable. These methods are
# mixed into Test as both instance and class methods so you
@@ -700,48 +727,48 @@ end
# # ... lots of test methods ...
# end
#
-# source://minitest//lib/minitest.rb#1014
+# source://minitest//lib/minitest.rb#1040
module Minitest::Guard
# Is this running on jruby?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1019
+ # source://minitest//lib/minitest.rb#1045
def jruby?(platform = T.unsafe(nil)); end
# Is this running on maglev?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1026
+ # source://minitest//lib/minitest.rb#1052
def maglev?(platform = T.unsafe(nil)); end
# Is this running on mri?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1036
+ # source://minitest//lib/minitest.rb#1062
def mri?(platform = T.unsafe(nil)); end
# Is this running on macOS?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1043
+ # source://minitest//lib/minitest.rb#1069
def osx?(platform = T.unsafe(nil)); end
# Is this running on rubinius?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1050
+ # source://minitest//lib/minitest.rb#1076
def rubinius?(platform = T.unsafe(nil)); end
# Is this running on windows?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#1060
+ # source://minitest//lib/minitest.rb#1086
def windows?(platform = T.unsafe(nil)); end
end
@@ -753,18 +780,18 @@ end
class Minitest::Mock
# @return [Mock] a new instance of Mock
#
- # source://minitest//lib/minitest/mock.rb#48
+ # source://minitest//lib/minitest/mock.rb#50
def initialize(delegator = T.unsafe(nil)); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def ===(*args, **kwargs, &b); end
- # source://minitest//lib/minitest/mock.rb#120
+ # source://minitest//lib/minitest/mock.rb#122
def __call(name, data); end
def __respond_to?(*_arg0); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def class(*args, **kwargs, &b); end
# Expect that method +name+ is called, optionally with +args+ (and
@@ -800,48 +827,48 @@ class Minitest::Mock
# @mock.ordinal_increment # => 'second'
# @mock.ordinal_increment # => raises MockExpectationError "No more expects available for :ordinal_increment"
#
- # source://minitest//lib/minitest/mock.rb#91
+ # source://minitest//lib/minitest/mock.rb#93
def expect(name, retval, args = T.unsafe(nil), **kwargs, &blk); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def inspect(*args, **kwargs, &b); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def instance_eval(*args, **kwargs, &b); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def instance_variables(*args, **kwargs, &b); end
- # source://minitest//lib/minitest/mock.rb#150
+ # source://minitest//lib/minitest/mock.rb#152
def method_missing(sym, *args, **kwargs, &block); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def object_id(*args, **kwargs, &b); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def public_send(*args, **kwargs, &b); end
# @return [Boolean]
#
- # source://minitest//lib/minitest/mock.rb#236
+ # source://minitest//lib/minitest/mock.rb#238
def respond_to?(sym, include_private = T.unsafe(nil)); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def send(*args, **kwargs, &b); end
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def to_s(*args, **kwargs, &b); end
# Verify that all methods were called as expected. Raises
# +MockExpectationError+ if the mock object was not called as
# expected.
#
- # source://minitest//lib/minitest/mock.rb#140
+ # source://minitest//lib/minitest/mock.rb#142
def verify; end
private
- # source://minitest//lib/minitest/mock.rb#31
+ # source://minitest//lib/minitest/mock.rb#33
def respond_to_missing?(*args, **kwargs, &b); end
end
@@ -904,36 +931,36 @@ end
# plugin, pull this out of the composite and replace it with your
# own.
#
-# source://minitest//lib/minitest.rb#686
+# source://minitest//lib/minitest.rb#699
class Minitest::ProgressReporter < ::Minitest::Reporter
- # source://minitest//lib/minitest.rb#687
+ # source://minitest//lib/minitest.rb#700
def prerecord(klass, name); end
- # source://minitest//lib/minitest.rb#694
+ # source://minitest//lib/minitest.rb#707
def record(result); end
end
# Shared code for anything that can get passed to a Reporter. See
# Minitest::Test & Minitest::Result.
#
-# source://minitest//lib/minitest.rb#517
+# source://minitest//lib/minitest.rb#521
module Minitest::Reportable
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest.rb#537
+ # source://minitest//lib/minitest.rb#543
def class_name; end
# Did this run error?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#558
+ # source://minitest//lib/minitest.rb#564
def error?; end
# The location identifier of this test. Depends on a method
# existing called class_name.
#
- # source://minitest//lib/minitest.rb#532
+ # source://minitest//lib/minitest.rb#538
def location; end
# Did this run pass?
@@ -943,47 +970,50 @@ module Minitest::Reportable
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#524
+ # source://minitest//lib/minitest.rb#528
def passed?; end
# Returns ".", "F", or "E" based on the result of the run.
#
- # source://minitest//lib/minitest.rb#544
+ # source://minitest//lib/minitest.rb#550
def result_code; end
# Was this run skipped?
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#551
+ # source://minitest//lib/minitest.rb#557
def skipped?; end
end
-# source://minitest//lib/minitest.rb#662
+# source://minitest//lib/minitest.rb#532
+Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String)
+
+# source://minitest//lib/minitest.rb#675
class Minitest::Reporter < ::Minitest::AbstractReporter
# @return [Reporter] a new instance of Reporter
#
- # source://minitest//lib/minitest.rb#671
+ # source://minitest//lib/minitest.rb#684
def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
# The IO used to report.
#
- # source://minitest//lib/minitest.rb#664
+ # source://minitest//lib/minitest.rb#677
def io; end
# The IO used to report.
#
- # source://minitest//lib/minitest.rb#664
+ # source://minitest//lib/minitest.rb#677
def io=(_arg0); end
# Command-line options for this run.
#
- # source://minitest//lib/minitest.rb#669
+ # source://minitest//lib/minitest.rb#682
def options; end
# Command-line options for this run.
#
- # source://minitest//lib/minitest.rb#669
+ # source://minitest//lib/minitest.rb#682
def options=(_arg0); end
end
@@ -993,80 +1023,80 @@ end
# blow up. By using Result.from(a_test) you can be reasonably sure
# that the test result can be marshalled.
#
-# source://minitest//lib/minitest.rb#570
+# source://minitest//lib/minitest.rb#576
class Minitest::Result < ::Minitest::Runnable
include ::Minitest::Reportable
- # source://minitest//lib/minitest.rb#604
+ # source://minitest//lib/minitest.rb#610
def class_name; end
# The class name of the test result.
#
- # source://minitest//lib/minitest.rb#579
+ # source://minitest//lib/minitest.rb#585
def klass; end
# The class name of the test result.
#
- # source://minitest//lib/minitest.rb#579
+ # source://minitest//lib/minitest.rb#585
def klass=(_arg0); end
# The location of the test method.
#
- # source://minitest//lib/minitest.rb#584
+ # source://minitest//lib/minitest.rb#590
def source_location; end
# The location of the test method.
#
- # source://minitest//lib/minitest.rb#584
+ # source://minitest//lib/minitest.rb#590
def source_location=(_arg0); end
- # source://minitest//lib/minitest.rb#608
+ # source://minitest//lib/minitest.rb#614
def to_s; end
class << self
# Create a new test result from a Runnable instance.
#
- # source://minitest//lib/minitest.rb#589
+ # source://minitest//lib/minitest.rb#595
def from(runnable); end
end
end
# re-open
#
-# source://minitest//lib/minitest.rb#280
+# source://minitest//lib/minitest.rb#284
class Minitest::Runnable
# @return [Runnable] a new instance of Runnable
#
- # source://minitest//lib/minitest.rb#448
+ # source://minitest//lib/minitest.rb#452
def initialize(name); end
# Number of assertions executed in this run.
#
- # source://minitest//lib/minitest.rb#284
+ # source://minitest//lib/minitest.rb#288
def assertions; end
# Number of assertions executed in this run.
#
- # source://minitest//lib/minitest.rb#284
+ # source://minitest//lib/minitest.rb#288
def assertions=(_arg0); end
- # source://minitest//lib/minitest.rb#444
+ # source://minitest//lib/minitest.rb#448
def failure; end
# An assertion raised during the run, if any.
#
- # source://minitest//lib/minitest.rb#289
+ # source://minitest//lib/minitest.rb#293
def failures; end
# An assertion raised during the run, if any.
#
- # source://minitest//lib/minitest.rb#289
+ # source://minitest//lib/minitest.rb#293
def failures=(_arg0); end
- # source://minitest//lib/minitest.rb#430
+ # source://minitest//lib/minitest.rb#434
def marshal_dump; end
- # source://minitest//lib/minitest.rb#440
+ # source://minitest//lib/minitest.rb#444
def marshal_load(ary); end
# Metadata you attach to the test results that get sent to the reporter.
@@ -1076,29 +1106,29 @@ class Minitest::Runnable
# NOTE: this data *must* be plain (read: marshal-able) data!
# Hashes! Arrays! Strings!
#
- # source://minitest//lib/minitest.rb#463
+ # source://minitest//lib/minitest.rb#467
def metadata; end
# Sets metadata, mainly used for +Result.from+.
#
- # source://minitest//lib/minitest.rb#470
+ # source://minitest//lib/minitest.rb#474
def metadata=(_arg0); end
# Returns true if metadata exists.
#
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#475
+ # source://minitest//lib/minitest.rb#479
def metadata?; end
# Name of the run.
#
- # source://minitest//lib/minitest.rb#307
+ # source://minitest//lib/minitest.rb#311
def name; end
# Set the name of the run.
#
- # source://minitest//lib/minitest.rb#314
+ # source://minitest//lib/minitest.rb#318
def name=(o); end
# Did this run pass?
@@ -1109,7 +1139,7 @@ class Minitest::Runnable
# @raise [NotImplementedError]
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#492
+ # source://minitest//lib/minitest.rb#496
def passed?; end
# Returns a single character string to print based on the result
@@ -1118,14 +1148,14 @@ class Minitest::Runnable
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest.rb#501
+ # source://minitest//lib/minitest.rb#505
def result_code; end
# Runs a single method. Needs to return self.
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest.rb#482
+ # source://minitest//lib/minitest.rb#486
def run; end
# Was this run skipped? See #passed? for more information.
@@ -1133,42 +1163,42 @@ class Minitest::Runnable
# @raise [NotImplementedError]
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#508
+ # source://minitest//lib/minitest.rb#512
def skipped?; end
# The time it took to run.
#
- # source://minitest//lib/minitest.rb#294
+ # source://minitest//lib/minitest.rb#298
def time; end
# The time it took to run.
#
- # source://minitest//lib/minitest.rb#294
+ # source://minitest//lib/minitest.rb#298
def time=(_arg0); end
- # source://minitest//lib/minitest.rb#296
+ # source://minitest//lib/minitest.rb#300
def time_it; end
class << self
- # source://minitest//lib/minitest.rb#1112
+ # source://minitest//lib/minitest.rb#1144
def inherited(klass); end
# Returns all instance methods matching the pattern +re+.
#
- # source://minitest//lib/minitest.rb#321
+ # source://minitest//lib/minitest.rb#325
def methods_matching(re); end
- # source://minitest//lib/minitest.rb#400
+ # source://minitest//lib/minitest.rb#404
def on_signal(name, action); end
- # source://minitest//lib/minitest.rb#325
+ # source://minitest//lib/minitest.rb#329
def reset; end
# Responsible for running all runnable methods in a given class,
# each in its own instance. Each instance is passed to the
# reporter to record.
#
- # source://minitest//lib/minitest.rb#336
+ # source://minitest//lib/minitest.rb#340
def run(reporter, options = T.unsafe(nil)); end
# Runs a single method and has the reporter record the result.
@@ -1176,7 +1206,7 @@ class Minitest::Runnable
# that subclasses can specialize the running of an individual
# test. See Minitest::ParallelTest::ClassMethods for an example.
#
- # source://minitest//lib/minitest.rb#372
+ # source://minitest//lib/minitest.rb#376
def run_one_method(klass, method_name, reporter); end
# Each subclass of Runnable is responsible for overriding this
@@ -1184,33 +1214,33 @@ class Minitest::Runnable
#
# @raise [NotImplementedError]
#
- # source://minitest//lib/minitest.rb#417
+ # source://minitest//lib/minitest.rb#421
def runnable_methods; end
# Returns all subclasses of Runnable.
#
- # source://minitest//lib/minitest.rb#424
+ # source://minitest//lib/minitest.rb#428
def runnables; end
# Defines the order to run tests (:random by default). Override
# this or use a convenience method to change it for your tests.
#
- # source://minitest//lib/minitest.rb#381
+ # source://minitest//lib/minitest.rb#385
def test_order; end
- # source://minitest//lib/minitest.rb#385
+ # source://minitest//lib/minitest.rb#389
def with_info_handler(reporter, &block); end
end
end
-# source://minitest//lib/minitest.rb#398
+# source://minitest//lib/minitest.rb#402
Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash)
# Assertion raised when skipping a run.
#
-# source://minitest//lib/minitest.rb#967
+# source://minitest//lib/minitest.rb#980
class Minitest::Skip < ::Minitest::Assertion
- # source://minitest//lib/minitest.rb#968
+ # source://minitest//lib/minitest.rb#981
def result_label; end
end
@@ -1234,113 +1264,113 @@ end
# end
# end
#
-# source://minitest//lib/minitest.rb#722
+# source://minitest//lib/minitest.rb#735
class Minitest::StatisticsReporter < ::Minitest::Reporter
# @return [StatisticsReporter] a new instance of StatisticsReporter
#
- # source://minitest//lib/minitest.rb#766
+ # source://minitest//lib/minitest.rb#779
def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
# Total number of assertions.
#
- # source://minitest//lib/minitest.rb#726
+ # source://minitest//lib/minitest.rb#739
def assertions; end
# Total number of assertions.
#
- # source://minitest//lib/minitest.rb#726
+ # source://minitest//lib/minitest.rb#739
def assertions=(_arg0); end
# Total number of test cases.
#
- # source://minitest//lib/minitest.rb#731
+ # source://minitest//lib/minitest.rb#744
def count; end
# Total number of test cases.
#
- # source://minitest//lib/minitest.rb#731
+ # source://minitest//lib/minitest.rb#744
def count=(_arg0); end
# Total number of tests that erred.
#
- # source://minitest//lib/minitest.rb#759
+ # source://minitest//lib/minitest.rb#772
def errors; end
# Total number of tests that erred.
#
- # source://minitest//lib/minitest.rb#759
+ # source://minitest//lib/minitest.rb#772
def errors=(_arg0); end
# Total number of tests that failed.
#
- # source://minitest//lib/minitest.rb#754
+ # source://minitest//lib/minitest.rb#767
def failures; end
# Total number of tests that failed.
#
- # source://minitest//lib/minitest.rb#754
+ # source://minitest//lib/minitest.rb#767
def failures=(_arg0); end
# @return [Boolean]
#
- # source://minitest//lib/minitest.rb#779
+ # source://minitest//lib/minitest.rb#792
def passed?; end
- # source://minitest//lib/minitest.rb#787
+ # source://minitest//lib/minitest.rb#800
def record(result); end
# Report on the tracked statistics.
#
- # source://minitest//lib/minitest.rb#797
+ # source://minitest//lib/minitest.rb#810
def report; end
# An +Array+ of test cases that failed or were skipped.
#
- # source://minitest//lib/minitest.rb#736
+ # source://minitest//lib/minitest.rb#749
def results; end
# An +Array+ of test cases that failed or were skipped.
#
- # source://minitest//lib/minitest.rb#736
+ # source://minitest//lib/minitest.rb#749
def results=(_arg0); end
# Total number of tests that where skipped.
#
- # source://minitest//lib/minitest.rb#764
+ # source://minitest//lib/minitest.rb#777
def skips; end
# Total number of tests that where skipped.
#
- # source://minitest//lib/minitest.rb#764
+ # source://minitest//lib/minitest.rb#777
def skips=(_arg0); end
- # source://minitest//lib/minitest.rb#783
+ # source://minitest//lib/minitest.rb#796
def start; end
# Time the test run started. If available, the monotonic clock is
# used and this is a +Float+, otherwise it's an instance of
# +Time+.
#
- # source://minitest//lib/minitest.rb#743
+ # source://minitest//lib/minitest.rb#756
def start_time; end
# Time the test run started. If available, the monotonic clock is
# used and this is a +Float+, otherwise it's an instance of
# +Time+.
#
- # source://minitest//lib/minitest.rb#743
+ # source://minitest//lib/minitest.rb#756
def start_time=(_arg0); end
# Test run time. If available, the monotonic clock is used and
# this is a +Float+, otherwise it's an instance of +Time+.
#
- # source://minitest//lib/minitest.rb#749
+ # source://minitest//lib/minitest.rb#762
def total_time; end
# Test run time. If available, the monotonic clock is used and
# this is a +Float+, otherwise it's an instance of +Time+.
#
- # source://minitest//lib/minitest.rb#749
+ # source://minitest//lib/minitest.rb#762
def total_time=(_arg0); end
end
@@ -1352,48 +1382,48 @@ end
# plugin, pull this out of the composite and replace it with your
# own.
#
-# source://minitest//lib/minitest.rb#817
+# source://minitest//lib/minitest.rb#830
class Minitest::SummaryReporter < ::Minitest::StatisticsReporter
- # source://minitest//lib/minitest.rb#852
+ # source://minitest//lib/minitest.rb#865
def aggregated_results(io); end
# Returns the value of attribute old_sync.
#
- # source://minitest//lib/minitest.rb#820
+ # source://minitest//lib/minitest.rb#833
def old_sync; end
# Sets the attribute old_sync
#
# @param value the value to set the attribute old_sync to.
#
- # source://minitest//lib/minitest.rb#820
+ # source://minitest//lib/minitest.rb#833
def old_sync=(_arg0); end
- # source://minitest//lib/minitest.rb#835
+ # source://minitest//lib/minitest.rb#848
def report; end
# :startdoc:
#
- # source://minitest//lib/minitest.rb#823
+ # source://minitest//lib/minitest.rb#836
def start; end
- # source://minitest//lib/minitest.rb#847
+ # source://minitest//lib/minitest.rb#860
def statistics; end
- # source://minitest//lib/minitest.rb#872
+ # source://minitest//lib/minitest.rb#885
def summary; end
# :stopdoc:
#
- # source://minitest//lib/minitest.rb#819
+ # source://minitest//lib/minitest.rb#832
def sync; end
# :stopdoc:
#
- # source://minitest//lib/minitest.rb#819
+ # source://minitest//lib/minitest.rb#832
def sync=(_arg0); end
- # source://minitest//lib/minitest.rb#868
+ # source://minitest//lib/minitest.rb#881
def to_s; end
end
@@ -1571,40 +1601,45 @@ Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array)
# Assertion wrapping an unexpected error that was raised during a run.
#
-# source://minitest//lib/minitest.rb#976
+# source://minitest//lib/minitest.rb#989
class Minitest::UnexpectedError < ::Minitest::Assertion
+ include ::Minitest::Compress
+
# @return [UnexpectedError] a new instance of UnexpectedError
#
- # source://minitest//lib/minitest.rb#980
+ # source://minitest//lib/minitest.rb#995
def initialize(error); end
- # source://minitest//lib/minitest.rb#985
+ # source://minitest//lib/minitest.rb#1008
def backtrace; end
# TODO: figure out how to use `cause` instead
#
- # source://minitest//lib/minitest.rb#978
+ # source://minitest//lib/minitest.rb#993
def error; end
# TODO: figure out how to use `cause` instead
#
- # source://minitest//lib/minitest.rb#978
+ # source://minitest//lib/minitest.rb#993
def error=(_arg0); end
- # source://minitest//lib/minitest.rb#989
+ # source://minitest//lib/minitest.rb#1014
def message; end
- # source://minitest//lib/minitest.rb#994
+ # source://minitest//lib/minitest.rb#1020
def result_label; end
end
+# source://minitest//lib/minitest.rb#1012
+Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp)
+
# source://minitest//lib/minitest.rb#12
Minitest::VERSION = T.let(T.unsafe(nil), String)
# source://minitest//lib/minitest/mock.rb#1
class MockExpectationError < ::StandardError; end
-# source://minitest//lib/minitest/mock.rb#256
+# source://minitest//lib/minitest/mock.rb#258
class Object < ::BasicObject
include ::Kernel
include ::PP::ObjectMixin
@@ -1628,6 +1663,6 @@ class Object < ::BasicObject
# NOTE: keyword args in callables are NOT checked for correctness
# against the existing method. Too many edge cases to be worth it.
#
- # source://minitest//lib/minitest/mock.rb#278
+ # source://minitest//lib/minitest/mock.rb#280
def stub(name, val_or_callable, *block_args, **block_kwargs, &block); end
end
diff --git a/sorbet/rbi/gems/parallel@1.23.0.rbi b/sorbet/rbi/gems/parallel@1.24.0.rbi
similarity index 95%
rename from sorbet/rbi/gems/parallel@1.23.0.rbi
rename to sorbet/rbi/gems/parallel@1.24.0.rbi
index c8b319a3..5dd73750 100644
--- a/sorbet/rbi/gems/parallel@1.23.0.rbi
+++ b/sorbet/rbi/gems/parallel@1.24.0.rbi
@@ -78,7 +78,14 @@ module Parallel
# source://parallel//lib/parallel.rb#642
def instrument_finish(item, index, result, options); end
- # source://parallel//lib/parallel.rb#647
+ # yield results in the order of the input items
+ # needs to use `options` to store state between executions
+ # needs to use `done` index since a nil result would also be valid
+ #
+ # source://parallel//lib/parallel.rb#651
+ def instrument_finish_in_order(item, index, result, options); end
+
+ # source://parallel//lib/parallel.rb#671
def instrument_start(item, index, options); end
# source://parallel//lib/parallel.rb#590
diff --git a/sorbet/rbi/gems/parser@3.2.2.3.rbi b/sorbet/rbi/gems/parser@3.2.2.4.rbi
similarity index 98%
rename from sorbet/rbi/gems/parser@3.2.2.3.rbi
rename to sorbet/rbi/gems/parser@3.2.2.4.rbi
index 680c9da4..7e0fb4c0 100644
--- a/sorbet/rbi/gems/parser@3.2.2.3.rbi
+++ b/sorbet/rbi/gems/parser@3.2.2.4.rbi
@@ -1298,184 +1298,184 @@ class Parser::Builders::Default
private
- # source://parser//lib/parser/builders/default.rb#1798
+ # source://parser//lib/parser/builders/default.rb#1808
def arg_name_collides?(this_name, that_name); end
- # source://parser//lib/parser/builders/default.rb#1994
+ # source://parser//lib/parser/builders/default.rb#2004
def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end
- # source://parser//lib/parser/builders/default.rb#1968
+ # source://parser//lib/parser/builders/default.rb#1978
def binary_op_map(left_e, op_t, right_e); end
- # source://parser//lib/parser/builders/default.rb#2096
+ # source://parser//lib/parser/builders/default.rb#2106
def block_map(receiver_l, begin_t, end_t); end
- # source://parser//lib/parser/builders/default.rb#1773
+ # source://parser//lib/parser/builders/default.rb#1783
def check_assignment_to_numparam(name, loc); end
# source://parser//lib/parser/builders/default.rb#1675
def check_condition(cond); end
- # source://parser//lib/parser/builders/default.rb#1744
+ # source://parser//lib/parser/builders/default.rb#1754
def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end
- # source://parser//lib/parser/builders/default.rb#1719
+ # source://parser//lib/parser/builders/default.rb#1729
def check_duplicate_args(args, map = T.unsafe(nil)); end
- # source://parser//lib/parser/builders/default.rb#1831
+ # source://parser//lib/parser/builders/default.rb#1841
def check_duplicate_pattern_key(name, loc); end
- # source://parser//lib/parser/builders/default.rb#1821
+ # source://parser//lib/parser/builders/default.rb#1831
def check_duplicate_pattern_variable(name, loc); end
- # source://parser//lib/parser/builders/default.rb#1813
+ # source://parser//lib/parser/builders/default.rb#1823
def check_lvar_name(name, loc); end
- # source://parser//lib/parser/builders/default.rb#1788
+ # source://parser//lib/parser/builders/default.rb#1798
def check_reserved_for_numparam(name, loc); end
- # source://parser//lib/parser/builders/default.rb#2253
+ # source://parser//lib/parser/builders/default.rb#2263
def collapse_string_parts?(parts); end
- # source://parser//lib/parser/builders/default.rb#1919
+ # source://parser//lib/parser/builders/default.rb#1929
def collection_map(begin_t, parts, end_t); end
- # source://parser//lib/parser/builders/default.rb#2123
+ # source://parser//lib/parser/builders/default.rb#2133
def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end
- # source://parser//lib/parser/builders/default.rb#1954
+ # source://parser//lib/parser/builders/default.rb#1964
def constant_map(scope, colon2_t, name_t); end
- # source://parser//lib/parser/builders/default.rb#2027
+ # source://parser//lib/parser/builders/default.rb#2037
def definition_map(keyword_t, operator_t, name_t, end_t); end
- # source://parser//lib/parser/builders/default.rb#1860
+ # source://parser//lib/parser/builders/default.rb#1870
def delimited_string_map(string_t); end
- # source://parser//lib/parser/builders/default.rb#2275
+ # source://parser//lib/parser/builders/default.rb#2285
def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end
- # source://parser//lib/parser/builders/default.rb#2167
+ # source://parser//lib/parser/builders/default.rb#2177
def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end
- # source://parser//lib/parser/builders/default.rb#2033
+ # source://parser//lib/parser/builders/default.rb#2043
def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end
- # source://parser//lib/parser/builders/default.rb#1915
+ # source://parser//lib/parser/builders/default.rb#1925
def expr_map(loc); end
- # source://parser//lib/parser/builders/default.rb#2148
+ # source://parser//lib/parser/builders/default.rb#2158
def for_map(keyword_t, in_t, begin_t, end_t); end
- # source://parser//lib/parser/builders/default.rb#2195
+ # source://parser//lib/parser/builders/default.rb#2205
def guard_map(keyword_t, guard_body_e); end
- # source://parser//lib/parser/builders/default.rb#2085
+ # source://parser//lib/parser/builders/default.rb#2095
def index_map(receiver_e, lbrack_t, rbrack_t); end
- # source://parser//lib/parser/builders/default.rb#1851
+ # source://parser//lib/parser/builders/default.rb#1861
def join_exprs(left_expr, right_expr); end
- # source://parser//lib/parser/builders/default.rb#2101
+ # source://parser//lib/parser/builders/default.rb#2111
def keyword_map(keyword_t, begin_t, args, end_t); end
- # source://parser//lib/parser/builders/default.rb#2118
+ # source://parser//lib/parser/builders/default.rb#2128
def keyword_mod_map(pre_e, keyword_t, post_e); end
- # source://parser//lib/parser/builders/default.rb#2004
+ # source://parser//lib/parser/builders/default.rb#2014
def kwarg_map(name_t, value_e = T.unsafe(nil)); end
- # source://parser//lib/parser/builders/default.rb#2306
+ # source://parser//lib/parser/builders/default.rb#2316
def kwargs?(node); end
- # source://parser//lib/parser/builders/default.rb#2270
+ # source://parser//lib/parser/builders/default.rb#2280
def loc(token); end
- # source://parser//lib/parser/builders/default.rb#2017
+ # source://parser//lib/parser/builders/default.rb#2027
def module_definition_map(keyword_t, name_e, operator_t, end_t); end
- # source://parser//lib/parser/builders/default.rb#1843
+ # source://parser//lib/parser/builders/default.rb#1853
def n(type, children, source_map); end
- # source://parser//lib/parser/builders/default.rb#1847
+ # source://parser//lib/parser/builders/default.rb#1857
def n0(type, source_map); end
# source://parser//lib/parser/builders/default.rb#288
def numeric(kind, token); end
- # source://parser//lib/parser/builders/default.rb#1885
+ # source://parser//lib/parser/builders/default.rb#1895
def pair_keyword_map(key_t, value_e); end
- # source://parser//lib/parser/builders/default.rb#1900
+ # source://parser//lib/parser/builders/default.rb#1910
def pair_quoted_map(begin_t, end_t, value_e); end
- # source://parser//lib/parser/builders/default.rb#1871
+ # source://parser//lib/parser/builders/default.rb#1881
def prefix_string_map(symbol); end
- # source://parser//lib/parser/builders/default.rb#1982
+ # source://parser//lib/parser/builders/default.rb#1992
def range_map(start_e, op_t, end_e); end
- # source://parser//lib/parser/builders/default.rb#1949
+ # source://parser//lib/parser/builders/default.rb#1959
def regexp_map(begin_t, end_t, options_e); end
- # source://parser//lib/parser/builders/default.rb#2154
+ # source://parser//lib/parser/builders/default.rb#2164
def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end
- # source://parser//lib/parser/builders/default.rb#2296
+ # source://parser//lib/parser/builders/default.rb#2306
def rewrite_hash_args_to_kwargs(args); end
- # source://parser//lib/parser/builders/default.rb#2067
+ # source://parser//lib/parser/builders/default.rb#2077
def send_binary_op_map(lhs_e, selector_t, rhs_e); end
- # source://parser//lib/parser/builders/default.rb#2090
+ # source://parser//lib/parser/builders/default.rb#2100
def send_index_map(receiver_e, lbrack_t, rbrack_t); end
- # source://parser//lib/parser/builders/default.rb#2041
+ # source://parser//lib/parser/builders/default.rb#2051
def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end
- # source://parser//lib/parser/builders/default.rb#2073
+ # source://parser//lib/parser/builders/default.rb#2083
def send_unary_op_map(selector_t, arg_e); end
- # source://parser//lib/parser/builders/default.rb#2226
+ # source://parser//lib/parser/builders/default.rb#2236
def static_regexp(parts, options); end
- # source://parser//lib/parser/builders/default.rb#2246
+ # source://parser//lib/parser/builders/default.rb#2256
def static_regexp_node(node); end
- # source://parser//lib/parser/builders/default.rb#2209
+ # source://parser//lib/parser/builders/default.rb#2219
def static_string(nodes); end
- # source://parser//lib/parser/builders/default.rb#1935
+ # source://parser//lib/parser/builders/default.rb#1945
def string_map(begin_t, parts, end_t); end
- # source://parser//lib/parser/builders/default.rb#2262
+ # source://parser//lib/parser/builders/default.rb#2272
def string_value(token); end
- # source://parser//lib/parser/builders/default.rb#2143
+ # source://parser//lib/parser/builders/default.rb#2153
def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end
- # source://parser//lib/parser/builders/default.rb#1856
+ # source://parser//lib/parser/builders/default.rb#1866
def token_map(token); end
- # source://parser//lib/parser/builders/default.rb#1972
+ # source://parser//lib/parser/builders/default.rb#1982
def unary_op_map(op_t, arg_e = T.unsafe(nil)); end
- # source://parser//lib/parser/builders/default.rb#1880
+ # source://parser//lib/parser/builders/default.rb#1890
def unquoted_map(token); end
- # source://parser//lib/parser/builders/default.rb#2284
+ # source://parser//lib/parser/builders/default.rb#2294
def validate_definee(definee); end
- # source://parser//lib/parser/builders/default.rb#1758
+ # source://parser//lib/parser/builders/default.rb#1768
def validate_no_forward_arg_after_restarg(args); end
- # source://parser//lib/parser/builders/default.rb#2258
+ # source://parser//lib/parser/builders/default.rb#2268
def value(token); end
- # source://parser//lib/parser/builders/default.rb#2061
+ # source://parser//lib/parser/builders/default.rb#2071
def var_send_map(variable_e); end
- # source://parser//lib/parser/builders/default.rb#1964
+ # source://parser//lib/parser/builders/default.rb#1974
def variable_map(name_t); end
class << self
@@ -5452,7 +5452,7 @@ class Parser::Source::Comment::Associator
# source://parser//lib/parser/source/comment/associator.rb#115
def associate_by_identity; end
- # source://parser//lib/parser/source/comment/associator.rb#103
+ # source://parser//lib/parser/source/comment/associator.rb#104
def associate_locations; end
# source://parser//lib/parser/source/comment/associator.rb#46
diff --git a/sorbet/rbi/gems/prettier_print@1.2.1.rbi b/sorbet/rbi/gems/prettier_print@1.2.1.rbi
deleted file mode 100644
index 4e885250..00000000
--- a/sorbet/rbi/gems/prettier_print@1.2.1.rbi
+++ /dev/null
@@ -1,951 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `prettier_print` gem.
-# Please instead update this file by running `bin/tapioca gem prettier_print`.
-
-# This class implements a pretty printing algorithm. It finds line breaks and
-# nice indentations for grouped structure.
-#
-# By default, the class assumes that primitive elements are strings and each
-# byte in the strings is a single column in width. But it can be used for other
-# situations by giving suitable arguments for some methods:
-#
-# * newline object and space generation block for PrettierPrint.new
-# * optional width argument for PrettierPrint#text
-# * PrettierPrint#breakable
-#
-# There are several candidate uses:
-# * text formatting using proportional fonts
-# * multibyte characters which has columns different to number of bytes
-# * non-string formatting
-#
-# == Usage
-#
-# To use this module, you will need to generate a tree of print nodes that
-# represent indentation and newline behavior before it gets sent to the printer.
-# Each node has different semantics, depending on the desired output.
-#
-# The most basic node is a Text node. This represents plain text content that
-# cannot be broken up even if it doesn't fit on one line. You would create one
-# of those with the text method, as in:
-#
-# PrettierPrint.format { |q| q.text('my content') }
-#
-# No matter what the desired output width is, the output for the snippet above
-# will always be the same.
-#
-# If you want to allow the printer to break up the content on the space
-# character when there isn't enough width for the full string on the same line,
-# you can use the Breakable and Group nodes. For example:
-#
-# PrettierPrint.format do |q|
-# q.group do
-# q.text("my")
-# q.breakable
-# q.text("content")
-# end
-# end
-#
-# Now, if everything fits on one line (depending on the maximum width specified)
-# then it will be the same output as the first example. If, however, there is
-# not enough room on the line, then you will get two lines of output, one for
-# the first string and one for the second.
-#
-# There are other nodes for the print tree as well, described in the
-# documentation below. They control alignment, indentation, conditional
-# formatting, and more.
-#
-# == References
-# Christian Lindig, Strictly Pretty, March 2000
-# https://lindig.github.io/papers/strictly-pretty-2000.pdf
-#
-# Philip Wadler, A prettier printer, March 1998
-# https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf
-#
-# source://prettier_print//lib/prettier_print.rb#62
-class PrettierPrint
- # Creates a buffer for pretty printing.
- #
- # +output+ is an output target. If it is not specified, '' is assumed. It
- # should have a << method which accepts the first argument +obj+ of
- # PrettierPrint#text, the first argument +separator+ of PrettierPrint#breakable,
- # the first argument +newline+ of PrettierPrint.new, and the result of a given
- # block for PrettierPrint.new.
- #
- # +maxwidth+ specifies maximum line length. If it is not specified, 80 is
- # assumed. However actual outputs may overflow +maxwidth+ if long
- # non-breakable texts are provided.
- #
- # +newline+ is used for line breaks. "\n" is used if it is not specified.
- #
- # The block is used to generate spaces. ->(n) { ' ' * n } is used if it is not
- # given.
- #
- # @return [PrettierPrint] a new instance of PrettierPrint
- #
- # source://prettier_print//lib/prettier_print.rb#441
- def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end
-
- # This inserts a BreakParent node into the print tree which forces the
- # surrounding and all parent group nodes to break.
- #
- # source://prettier_print//lib/prettier_print.rb#814
- def break_parent; end
-
- # This says "you can break a line here if necessary", and a +width+\-column
- # text +separator+ is inserted if a line is not broken at the point.
- #
- # If +separator+ is not specified, ' ' is used.
- #
- # If +width+ is not specified, +separator.length+ is used. You will have to
- # specify this when +separator+ is a multibyte character, for example.
- #
- # By default, if the surrounding group is broken and a newline is inserted,
- # the printer will indent the subsequent line up to the current level of
- # indentation. You can disable this behavior with the +indent+ argument if
- # that's not desired (rare).
- #
- # By default, when you insert a Breakable into the print tree, it only breaks
- # the surrounding group when the group's contents cannot fit onto the
- # remaining space of the current line. You can force it to break the
- # surrounding group instead if you always want the newline with the +force+
- # argument.
- #
- # There are a few circumstances where you'll want to force the newline into
- # the output but no insert a break parent (because you don't want to
- # necessarily force the groups to break unless they need to). In this case you
- # can pass `force: :skip_break_parent` to this method and it will not insert
- # a break parent.`
- #
- # source://prettier_print//lib/prettier_print.rb#802
- def breakable(separator = T.unsafe(nil), width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end
-
- # Another very common breakable call you receive while formatting is an
- # empty string in flat mode and a newline in break mode. Similar to
- # breakable_space, this is here for avoid unnecessary calculation.
- #
- # source://prettier_print//lib/prettier_print.rb#646
- def breakable_empty; end
-
- # The final of the very common breakable calls you receive while formatting
- # is the normal breakable space but with the addition of the break_parent.
- #
- # source://prettier_print//lib/prettier_print.rb#652
- def breakable_force; end
-
- # This is the same shortcut as breakable_force, except that it doesn't indent
- # the next line. This is necessary if you're trying to preserve some custom
- # formatting like a multi-line string.
- #
- # source://prettier_print//lib/prettier_print.rb#660
- def breakable_return; end
-
- # The vast majority of breakable calls you receive while formatting are a
- # space in flat mode and a newline in break mode. Since this is so common,
- # we have a method here to skip past unnecessary calculation.
- #
- # source://prettier_print//lib/prettier_print.rb#639
- def breakable_space; end
-
- # This is an output buffer that wraps the output object and provides
- # additional functionality depending on its type.
- #
- # This defaults to Buffer::StringBuffer.new("".dup)
- #
- # source://prettier_print//lib/prettier_print.rb#400
- def buffer; end
-
- # A convenience method which is same as follows:
- #
- # text(",")
- # breakable
- #
- # source://prettier_print//lib/prettier_print.rb#669
- def comma_breakable; end
-
- # Returns the group most recently added to the stack.
- #
- # Contrived example:
- # out = ""
- # => ""
- # q = PrettierPrint.new(out)
- # => #
- # q.group {
- # q.text q.current_group.inspect
- # q.text q.newline
- # q.group(q.current_group.depth + 1) {
- # q.text q.current_group.inspect
- # q.text q.newline
- # q.group(q.current_group.depth + 1) {
- # q.text q.current_group.inspect
- # q.text q.newline
- # q.group(q.current_group.depth + 1) {
- # q.text q.current_group.inspect
- # q.text q.newline
- # }
- # }
- # }
- # }
- # => 284
- # puts out
- # #
- # #
- # #
- # #
- #
- # source://prettier_print//lib/prettier_print.rb#484
- def current_group; end
-
- # This is similar to #breakable except the decision to break or not is
- # determined individually.
- #
- # Two #fill_breakable under a group may cause 4 results:
- # (break,break), (break,non-break), (non-break,break), (non-break,non-break).
- # This is different to #breakable because two #breakable under a group
- # may cause 2 results: (break,break), (non-break,non-break).
- #
- # The text +separator+ is inserted if a line is not broken at this point.
- #
- # If +separator+ is not specified, ' ' is used.
- #
- # If +width+ is not specified, +separator.length+ is used. You will have to
- # specify this when +separator+ is a multibyte character, for example.
- #
- # source://prettier_print//lib/prettier_print.rb#688
- def fill_breakable(separator = T.unsafe(nil), width = T.unsafe(nil)); end
-
- # Flushes all of the generated print tree onto the output buffer, then clears
- # the generated tree from memory.
- #
- # source://prettier_print//lib/prettier_print.rb#490
- def flush(base_indentation = T.unsafe(nil)); end
-
- # An object that responds to call that takes one argument, of an Integer, and
- # returns the corresponding number of spaces.
- #
- # By default this is: ->(n) { ' ' * n }
- #
- # source://prettier_print//lib/prettier_print.rb#416
- def genspace; end
-
- # Groups line break hints added in the block. The line break hints are all to
- # be used or not.
- #
- # If +indent+ is specified, the method call is regarded as nested by
- # nest(indent) { ... }.
- #
- # If +open_object+ is specified, text(open_object, open_width) is
- # called before grouping. If +close_object+ is specified,
- # text(close_object, close_width) is called after grouping.
- #
- # source://prettier_print//lib/prettier_print.rb#845
- def group(indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end
-
- # The stack of groups that are being printed.
- #
- # source://prettier_print//lib/prettier_print.rb#419
- def groups; end
-
- # Inserts an IfBreak node with the contents of the block being added to its
- # list of nodes that should be printed if the surrounding node breaks. If it
- # doesn't, then you can specify the contents to be printed with the #if_flat
- # method used on the return object from this method. For example,
- #
- # q.if_break { q.text('do') }.if_flat { q.text('{') }
- #
- # In the example above, if the surrounding group is broken it will print 'do'
- # and if it is not it will print '{'.
- #
- # source://prettier_print//lib/prettier_print.rb#917
- def if_break; end
-
- # This is similar to if_break in that it also inserts an IfBreak node into the
- # print tree, however it's starting from the flat contents, and cannot be used
- # to build the break contents.
- #
- # source://prettier_print//lib/prettier_print.rb#936
- def if_flat; end
-
- # Very similar to the #nest method, this indents the nested content by one
- # level by inserting an Indent node into the print tree. The contents of the
- # node are determined by the block.
- #
- # source://prettier_print//lib/prettier_print.rb#956
- def indent; end
-
- # This method calculates the position of the text relative to the current
- # indentation level when the doc has been printed. It's useful for
- # determining how to align text to doc nodes that are already built into the
- # tree.
- #
- # source://prettier_print//lib/prettier_print.rb#696
- def last_position(node); end
-
- # Inserts a LineSuffix node into the print tree. The contents of the node are
- # determined by the block.
- #
- # source://prettier_print//lib/prettier_print.rb#967
- def line_suffix(priority: T.unsafe(nil)); end
-
- # The maximum width of a line, before it is separated in to a newline
- #
- # This defaults to 80, and should be an Integer
- #
- # source://prettier_print//lib/prettier_print.rb#405
- def maxwidth; end
-
- # Increases left margin after newline with +indent+ for line breaks added in
- # the block.
- #
- # source://prettier_print//lib/prettier_print.rb#977
- def nest(indent); end
-
- # The value that is appended to +output+ to add a new line.
- #
- # This defaults to "\n", and should be String
- #
- # source://prettier_print//lib/prettier_print.rb#410
- def newline; end
-
- # The output object. It represents the final destination of the contents of
- # the print tree. It should respond to <<.
- #
- # This defaults to "".dup
- #
- # source://prettier_print//lib/prettier_print.rb#394
- def output; end
-
- # This method will remove any breakables from the list of contents so that
- # no newlines are present in the output. If a newline is being forced into
- # the output, the replace value will be used.
- #
- # source://prettier_print//lib/prettier_print.rb#721
- def remove_breaks(node, replace = T.unsafe(nil)); end
-
- # Adds a separated list.
- # The list is separated by comma with breakable space, by default.
- #
- # #seplist iterates the +list+ using +iter_method+.
- # It yields each object to the block given for #seplist.
- # The procedure +separator_proc+ is called between each yields.
- #
- # If the iteration is zero times, +separator_proc+ is not called at all.
- #
- # If +separator_proc+ is nil or not given,
- # +lambda { comma_breakable }+ is used.
- # If +iter_method+ is not given, :each is used.
- #
- # For example, following 3 code fragments has similar effect.
- #
- # q.seplist([1,2,3]) {|v| xxx v }
- #
- # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v }
- #
- # xxx 1
- # q.comma_breakable
- # xxx 2
- # q.comma_breakable
- # xxx 3
- #
- # source://prettier_print//lib/prettier_print.rb#760
- def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end
-
- # The current array of contents that calls to methods that generate print tree
- # nodes will append to.
- #
- # source://prettier_print//lib/prettier_print.rb#423
- def target; end
-
- # This adds +object+ as a text of +width+ columns in width.
- #
- # If +width+ is not specified, object.length is used.
- #
- # source://prettier_print//lib/prettier_print.rb#989
- def text(object = T.unsafe(nil), width = T.unsafe(nil)); end
-
- # This inserts a Trim node into the print tree which, when printed, will clear
- # all whitespace at the end of the output buffer. This is useful for the rare
- # case where you need to delete printed indentation and force the next node
- # to start at the beginning of the line.
- #
- # source://prettier_print//lib/prettier_print.rb#828
- def trim; end
-
- # A convenience method used by a lot of the print tree node builders that
- # temporarily changes the target that the builders will append to.
- #
- # source://prettier_print//lib/prettier_print.rb#1007
- def with_target(target); end
-
- private
-
- # This method returns a boolean as to whether or not the remaining commands
- # fit onto the remaining space on the current line. If we finish printing
- # all of the commands or if we hit a newline, then we return true. Otherwise
- # if we continue printing past the remaining space, we return false.
- #
- # @return [Boolean]
- #
- # source://prettier_print//lib/prettier_print.rb#1019
- def fits?(next_commands, rest_commands, remaining); end
-
- # source://prettier_print//lib/prettier_print.rb#1091
- def remove_breaks_with(doc, replace); end
-
- # Resets the group stack and target array so that this pretty printer object
- # can continue to be used before calling flush again if desired.
- #
- # source://prettier_print//lib/prettier_print.rb#1085
- def reset; end
-
- class << self
- # This is a convenience method which is same as follows:
- #
- # begin
- # q = PrettierPrint.new(output, maxwidth, newline, &genspace)
- # ...
- # q.flush
- # output
- # end
- #
- # @yield [q]
- #
- # source://prettier_print//lib/prettier_print.rb#377
- def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil), indentation = T.unsafe(nil)); end
-
- # This is similar to PrettierPrint::format but the result has no breaks.
- #
- # +maxwidth+, +newline+ and +genspace+ are ignored.
- #
- # The invocation of +breakable+ in the block doesn't break a line and is
- # treated as just an invocation of +text+.
- #
- # @yield [q]
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#156
- def singleline_format(output = T.unsafe(nil), _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil), _genspace = T.unsafe(nil)); end
- end
-end
-
-# A node in the print tree that represents aligning nested nodes to a certain
-# prefix width or string.
-#
-# source://prettier_print//lib/prettier_print.rb#65
-class PrettierPrint::Align
- # @return [Align] a new instance of Align
- #
- # source://prettier_print//lib/prettier_print.rb#68
- def initialize(indent:, contents: T.unsafe(nil)); end
-
- # Returns the value of attribute contents.
- #
- # source://prettier_print//lib/prettier_print.rb#66
- def contents; end
-
- # Returns the value of attribute indent.
- #
- # source://prettier_print//lib/prettier_print.rb#66
- def indent; end
-
- # source://prettier_print//lib/prettier_print.rb#73
- def pretty_print(q); end
-end
-
-# source://prettier_print//lib/prettier_print.rb#126
-PrettierPrint::BREAKABLE_EMPTY = T.let(T.unsafe(nil), PrettierPrint::Breakable)
-
-# source://prettier_print//lib/prettier_print.rb#127
-PrettierPrint::BREAKABLE_FORCE = T.let(T.unsafe(nil), PrettierPrint::Breakable)
-
-# source://prettier_print//lib/prettier_print.rb#128
-PrettierPrint::BREAKABLE_RETURN = T.let(T.unsafe(nil), PrettierPrint::Breakable)
-
-# Below here are the most common combination of options that are created when
-# creating new breakables. They are here to cut down on some allocations.
-#
-# source://prettier_print//lib/prettier_print.rb#125
-PrettierPrint::BREAKABLE_SPACE = T.let(T.unsafe(nil), PrettierPrint::Breakable)
-
-# Since there's really no difference in these instances, just using the same
-# one saves on some allocations.
-#
-# source://prettier_print//lib/prettier_print.rb#141
-PrettierPrint::BREAK_PARENT = T.let(T.unsafe(nil), PrettierPrint::BreakParent)
-
-# A node in the print tree that forces the surrounding group to print out in
-# the "break" mode as opposed to the "flat" mode. Useful for when you need to
-# force a newline into a group.
-#
-# source://prettier_print//lib/prettier_print.rb#133
-class PrettierPrint::BreakParent
- # source://prettier_print//lib/prettier_print.rb#134
- def pretty_print(q); end
-end
-
-# A node in the print tree that represents a place in the buffer that the
-# content can be broken onto multiple lines.
-#
-# source://prettier_print//lib/prettier_print.rb#82
-class PrettierPrint::Breakable
- # @return [Breakable] a new instance of Breakable
- #
- # source://prettier_print//lib/prettier_print.rb#85
- def initialize(separator = T.unsafe(nil), width = T.unsafe(nil), force: T.unsafe(nil), indent: T.unsafe(nil)); end
-
- # @return [Boolean]
- #
- # source://prettier_print//lib/prettier_print.rb#97
- def force?; end
-
- # @return [Boolean]
- #
- # source://prettier_print//lib/prettier_print.rb#101
- def indent?; end
-
- # source://prettier_print//lib/prettier_print.rb#105
- def pretty_print(q); end
-
- # Returns the value of attribute separator.
- #
- # source://prettier_print//lib/prettier_print.rb#83
- def separator; end
-
- # Returns the value of attribute width.
- #
- # source://prettier_print//lib/prettier_print.rb#83
- def width; end
-end
-
-# When building up the contents in the output buffer, it's convenient to be
-# able to trim trailing whitespace before newlines. If the output object is a
-# string or array or strings, then we can do this with some gsub calls. If
-# not, then this effectively just wraps the output object and forwards on
-# calls to <<.
-#
-# source://prettier_print//lib/prettier_print.rb#277
-module PrettierPrint::Buffer
- class << self
- # This is a switch for building the correct output buffer wrapper class for
- # the given output object.
- #
- # source://prettier_print//lib/prettier_print.rb#336
- def for(output); end
- end
-end
-
-# This is an output buffer that wraps an array output object. It provides a
-# trim! method that trims off trailing whitespace from the last element in
-# the array if it's an unfrozen string using the same method as the
-# StringBuffer.
-#
-# source://prettier_print//lib/prettier_print.rb#303
-class PrettierPrint::Buffer::ArrayBuffer
- # @return [ArrayBuffer] a new instance of ArrayBuffer
- #
- # source://prettier_print//lib/prettier_print.rb#306
- def initialize(output = T.unsafe(nil)); end
-
- # source://prettier_print//lib/prettier_print.rb#310
- def <<(object); end
-
- # Returns the value of attribute output.
- #
- # source://prettier_print//lib/prettier_print.rb#304
- def output; end
-
- # source://prettier_print//lib/prettier_print.rb#314
- def trim!; end
-end
-
-# This is an output buffer that wraps a string output object. It provides a
-# trim! method that trims off trailing whitespace from the string using
-# gsub!.
-#
-# source://prettier_print//lib/prettier_print.rb#281
-class PrettierPrint::Buffer::StringBuffer
- # @return [StringBuffer] a new instance of StringBuffer
- #
- # source://prettier_print//lib/prettier_print.rb#284
- def initialize(output = T.unsafe(nil)); end
-
- # source://prettier_print//lib/prettier_print.rb#288
- def <<(object); end
-
- # Returns the value of attribute output.
- #
- # source://prettier_print//lib/prettier_print.rb#282
- def output; end
-
- # source://prettier_print//lib/prettier_print.rb#292
- def trim!; end
-end
-
-# When generating spaces after a newline for indentation, by default we
-# generate one space per character needed for indentation. You can change this
-# behavior (for instance to use tabs) by passing a different genspace
-# procedure.
-#
-# source://prettier_print//lib/prettier_print.rb#350
-PrettierPrint::DEFAULT_GENSPACE = T.let(T.unsafe(nil), Proc)
-
-# The default indentation for printing is zero, assuming that the code starts
-# at the top level. That can be changed if desired to start from a different
-# indentation level.
-#
-# source://prettier_print//lib/prettier_print.rb#366
-PrettierPrint::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer)
-
-# When printing, you can optionally specify the value that should be used
-# whenever a group needs to be broken onto multiple lines. In this case the
-# default is \n.
-#
-# source://prettier_print//lib/prettier_print.rb#344
-PrettierPrint::DEFAULT_NEWLINE = T.let(T.unsafe(nil), String)
-
-# A node in the print tree that represents a group of items which the printer
-# should try to fit onto one line. This is the basic command to tell the
-# printer when to break. Groups are usually nested, and the printer will try
-# to fit everything on one line, but if it doesn't fit it will break the
-# outermost group first and try again. It will continue breaking groups until
-# everything fits (or there are no more groups to break).
-#
-# source://prettier_print//lib/prettier_print.rb#149
-class PrettierPrint::Group
- # @return [Group] a new instance of Group
- #
- # source://prettier_print//lib/prettier_print.rb#152
- def initialize(depth, contents: T.unsafe(nil)); end
-
- # source://prettier_print//lib/prettier_print.rb#158
- def break; end
-
- # @return [Boolean]
- #
- # source://prettier_print//lib/prettier_print.rb#162
- def break?; end
-
- # Returns the value of attribute contents.
- #
- # source://prettier_print//lib/prettier_print.rb#150
- def contents; end
-
- # Returns the value of attribute depth.
- #
- # source://prettier_print//lib/prettier_print.rb#150
- def depth; end
-
- # source://prettier_print//lib/prettier_print.rb#166
- def pretty_print(q); end
-end
-
-# A node in the print tree that represents printing one thing if the
-# surrounding group node is broken and another thing if the surrounding group
-# node is flat.
-#
-# source://prettier_print//lib/prettier_print.rb#176
-class PrettierPrint::IfBreak
- # @return [IfBreak] a new instance of IfBreak
- #
- # source://prettier_print//lib/prettier_print.rb#179
- def initialize(break_contents: T.unsafe(nil), flat_contents: T.unsafe(nil)); end
-
- # Returns the value of attribute break_contents.
- #
- # source://prettier_print//lib/prettier_print.rb#177
- def break_contents; end
-
- # Returns the value of attribute flat_contents.
- #
- # source://prettier_print//lib/prettier_print.rb#177
- def flat_contents; end
-
- # source://prettier_print//lib/prettier_print.rb#184
- def pretty_print(q); end
-end
-
-# A small DSL-like object used for specifying the alternative contents to be
-# printed if the surrounding group doesn't break for an IfBreak node.
-#
-# source://prettier_print//lib/prettier_print.rb#874
-class PrettierPrint::IfBreakBuilder
- # @return [IfBreakBuilder] a new instance of IfBreakBuilder
- #
- # source://prettier_print//lib/prettier_print.rb#877
- def initialize(q, flat_contents); end
-
- # Returns the value of attribute flat_contents.
- #
- # source://prettier_print//lib/prettier_print.rb#875
- def flat_contents; end
-
- # source://prettier_print//lib/prettier_print.rb#882
- def if_flat; end
-
- # Returns the value of attribute q.
- #
- # source://prettier_print//lib/prettier_print.rb#875
- def q; end
-end
-
-# When we already know that groups are broken, we don't actually need to track
-# the flat versions of the contents. So this builder version is effectively a
-# no-op, but we need it to maintain the same API. The only thing this can
-# impact is that if there's a forced break in the flat contents, then we need
-# to propagate that break up the whole tree.
-#
-# source://prettier_print//lib/prettier_print.rb#892
-class PrettierPrint::IfFlatIgnore
- # @return [IfFlatIgnore] a new instance of IfFlatIgnore
- #
- # source://prettier_print//lib/prettier_print.rb#895
- def initialize(q); end
-
- # source://prettier_print//lib/prettier_print.rb#899
- def if_flat; end
-
- # Returns the value of attribute q.
- #
- # source://prettier_print//lib/prettier_print.rb#893
- def q; end
-end
-
-# A node in the print tree that is a variant of the Align node that indents
-# its contents by one level.
-#
-# source://prettier_print//lib/prettier_print.rb#200
-class PrettierPrint::Indent
- # @return [Indent] a new instance of Indent
- #
- # source://prettier_print//lib/prettier_print.rb#203
- def initialize(contents: T.unsafe(nil)); end
-
- # Returns the value of attribute contents.
- #
- # source://prettier_print//lib/prettier_print.rb#201
- def contents; end
-
- # source://prettier_print//lib/prettier_print.rb#207
- def pretty_print(q); end
-end
-
-# A node in the print tree that has its own special buffer for implementing
-# content that should flush before any newline.
-#
-# Useful for implementating trailing content, as it's not always practical to
-# constantly check where the line ends to avoid accidentally printing some
-# content after a line suffix node.
-#
-# source://prettier_print//lib/prettier_print.rb#220
-class PrettierPrint::LineSuffix
- # @return [LineSuffix] a new instance of LineSuffix
- #
- # source://prettier_print//lib/prettier_print.rb#225
- def initialize(priority: T.unsafe(nil), contents: T.unsafe(nil)); end
-
- # Returns the value of attribute contents.
- #
- # source://prettier_print//lib/prettier_print.rb#223
- def contents; end
-
- # source://prettier_print//lib/prettier_print.rb#230
- def pretty_print(q); end
-
- # Returns the value of attribute priority.
- #
- # source://prettier_print//lib/prettier_print.rb#223
- def priority; end
-end
-
-# source://prettier_print//lib/prettier_print.rb#221
-PrettierPrint::LineSuffix::DEFAULT_PRIORITY = T.let(T.unsafe(nil), Integer)
-
-# There are two modes in printing, break and flat. When we're in break mode,
-# any lines will use their newline, any if-breaks will use their break
-# contents, etc.
-#
-# source://prettier_print//lib/prettier_print.rb#356
-PrettierPrint::MODE_BREAK = T.let(T.unsafe(nil), Integer)
-
-# This is another print mode much like MODE_BREAK. When we're in flat mode, we
-# attempt to print everything on one line until we either hit a broken group,
-# a forced line, or the maximum width.
-#
-# source://prettier_print//lib/prettier_print.rb#361
-PrettierPrint::MODE_FLAT = T.let(T.unsafe(nil), Integer)
-
-# PrettierPrint::SingleLine is used by PrettierPrint.singleline_format
-#
-# It is passed to be similar to a PrettierPrint object itself, by responding to
-# all of the same print tree node builder methods, as well as the #flush
-# method.
-#
-# The significant difference here is that there are no line breaks in the
-# output. If an IfBreak node is used, only the flat contents are printed.
-# LineSuffix nodes are printed at the end of the buffer when #flush is called.
-#
-# source://prettier_print//lib/prettier_print/single_line.rb#13
-class PrettierPrint::SingleLine
- # Create a PrettierPrint::SingleLine object
- #
- # Arguments:
- # * +output+ - String (or similar) to store rendered text. Needs to respond
- # to '<<'.
- # * +maxwidth+ - Argument position expected to be here for compatibility.
- # This argument is a noop.
- # * +newline+ - Argument position expected to be here for compatibility.
- # This argument is a noop.
- #
- # @return [SingleLine] a new instance of SingleLine
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#34
- def initialize(output, _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil)); end
-
- # Here for compatibility, does nothing.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#64
- def break_parent; end
-
- # Appends +separator+ to the text to be output. By default +separator+ is
- # ' '
- #
- # The +width+, +indent+, and +force+ arguments are here for compatibility.
- # They are all noop arguments.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#54
- def breakable(separator = T.unsafe(nil), _width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end
-
- # Appends +separator+ to the output buffer. +width+ is a noop here for
- # compatibility.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#69
- def fill_breakable(separator = T.unsafe(nil), _width = T.unsafe(nil)); end
-
- # Flushes the line suffixes onto the output buffer.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#41
- def flush; end
-
- # Opens a block for grouping objects to be pretty printed.
- #
- # Arguments:
- # * +indent+ - noop argument. Present for compatibility.
- # * +open_obj+ - text appended before the &block. Default is ''
- # * +close_obj+ - text appended after the &block. Default is ''
- # * +open_width+ - noop argument. Present for compatibility.
- # * +close_width+ - noop argument. Present for compatibility.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#90
- def group(_indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), _open_width = T.unsafe(nil), _close_width = T.unsafe(nil)); end
-
- # Effectively unnecessary, but here for compatibility.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#113
- def if_break; end
-
- # Also effectively unnecessary, but here for compatibility.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#118
- def if_flat; end
-
- # A noop that immediately yields.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#122
- def indent; end
-
- # Changes the target output buffer to the line suffix output buffer which
- # will get flushed at the end of printing.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#128
- def line_suffix; end
-
- # A buffer output that wraps any calls to line_suffix that will be flushed
- # at the end of printing.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#23
- def line_suffixes; end
-
- # Takes +indent+ arg, but does nothing with it.
- #
- # Yields to a block.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#137
- def nest(_indent); end
-
- # The output object. It stores rendered text and should respond to <<.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#15
- def output; end
-
- # The current array of contents that the print tree builder methods should
- # append to.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#19
- def target; end
-
- # Add +object+ to the text to be output.
- #
- # +width+ argument is here for compatibility. It is a noop argument.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#144
- def text(object = T.unsafe(nil), _width = T.unsafe(nil)); end
-
- # Immediately trims the output buffer.
- #
- # source://prettier_print//lib/prettier_print/single_line.rb#74
- def trim; end
-end
-
-# A class that wraps the ability to call #if_flat. The contents of the
-# #if_flat block are executed immediately, so effectively this class and the
-# #if_break method that triggers it are unnecessary, but they're here to
-# maintain compatibility.
-#
-# source://prettier_print//lib/prettier_print/single_line.rb#106
-class PrettierPrint::SingleLine::IfBreakBuilder
- # source://prettier_print//lib/prettier_print/single_line.rb#107
- def if_flat; end
-end
-
-# Since all of the instances here are the same, we can reuse the same one to
-# cut down on allocations.
-#
-# source://prettier_print//lib/prettier_print.rb#270
-PrettierPrint::TRIM = T.let(T.unsafe(nil), PrettierPrint::Trim)
-
-# A node in the print tree that represents plain content that cannot be broken
-# up (by default this assumes strings, but it can really be anything).
-#
-# source://prettier_print//lib/prettier_print.rb#239
-class PrettierPrint::Text
- # @return [Text] a new instance of Text
- #
- # source://prettier_print//lib/prettier_print.rb#242
- def initialize; end
-
- # source://prettier_print//lib/prettier_print.rb#247
- def add(object: T.unsafe(nil), width: T.unsafe(nil)); end
-
- # Returns the value of attribute objects.
- #
- # source://prettier_print//lib/prettier_print.rb#240
- def objects; end
-
- # source://prettier_print//lib/prettier_print.rb#252
- def pretty_print(q); end
-
- # Returns the value of attribute width.
- #
- # source://prettier_print//lib/prettier_print.rb#240
- def width; end
-end
-
-# A node in the print tree that represents trimming all of the indentation of
-# the current line, in the rare case that you need to ignore the indentation
-# that you've already created. This node should be placed after a Breakable.
-#
-# source://prettier_print//lib/prettier_print.rb#262
-class PrettierPrint::Trim
- # source://prettier_print//lib/prettier_print.rb#263
- def pretty_print(q); end
-end
diff --git a/sorbet/rbi/gems/prism@0.19.0.rbi b/sorbet/rbi/gems/prism@0.19.0.rbi
new file mode 100644
index 00000000..901807f8
--- /dev/null
+++ b/sorbet/rbi/gems/prism@0.19.0.rbi
@@ -0,0 +1,29883 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `prism` gem.
+# Please instead update this file by running `bin/tapioca gem prism`.
+
+# =begin
+# This file is generated by the templates/template.rb script and should not be
+# modified manually. See templates/rbi/prism.rbi.erb
+# if you are looking to modify the template
+# =end
+
+# The Prism Ruby parser.
+#
+# "Parsing Ruby is suddenly manageable!"
+# - You, hopefully
+#
+# source://prism//lib/prism.rb#8
+module Prism
+ class << self
+ # Mirror the Prism.dump API by using the serialization API.
+ def dump(*_arg0); end
+
+ # Mirror the Prism.dump_file API by using the serialization API.
+ def dump_file(*_arg0); end
+
+ # Mirror the Prism.lex API by using the serialization API.
+ def lex(*_arg0); end
+
+ # :call-seq:
+ # Prism::lex_compat(source, **options) -> ParseResult
+ #
+ # Returns a parse result whose value is an array of tokens that closely
+ # resembles the return value of Ripper::lex. The main difference is that the
+ # `:on_sp` token is not emitted.
+ #
+ # For supported options, see Prism::parse.
+ #
+ # source://prism//lib/prism.rb#46
+ def lex_compat(source, **options); end
+
+ # Mirror the Prism.lex_file API by using the serialization API.
+ def lex_file(*_arg0); end
+
+ # :call-seq:
+ # Prism::lex_ripper(source) -> Array
+ #
+ # This lexes with the Ripper lex. It drops any space events but otherwise
+ # returns the same tokens. Raises SyntaxError if the syntax in source is
+ # invalid.
+ #
+ # source://prism//lib/prism.rb#56
+ def lex_ripper(source); end
+
+ # :call-seq:
+ # Prism::load(source, serialized) -> ParseResult
+ #
+ # Load the serialized AST using the source as a reference into a tree.
+ #
+ # source://prism//lib/prism.rb#64
+ def load(source, serialized); end
+
+ # Mirror the Prism.parse API by using the serialization API.
+ def parse(*_arg0); end
+
+ # Mirror the Prism.parse_comments API by using the serialization API.
+ def parse_comments(*_arg0); end
+
+ # :call-seq:
+ # Prism::parse_failure?(source, **options) -> bool
+ #
+ # Returns true if the source parses with errors.
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism.rb#72
+ def parse_failure?(source, **options); end
+
+ # Mirror the Prism.parse_file API by using the serialization API. This uses
+ # native strings instead of Ruby strings because it allows us to use mmap when
+ # it is available.
+ def parse_file(*_arg0); end
+
+ # Mirror the Prism.parse_file_comments API by using the serialization
+ # API. This uses native strings instead of Ruby strings because it allows us
+ # to use mmap when it is available.
+ def parse_file_comments(*_arg0); end
+
+ # :call-seq:
+ # Prism::parse_file_failure?(filepath, **options) -> bool
+ #
+ # Returns true if the file at filepath parses with errors.
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism.rb#80
+ def parse_file_failure?(filepath, **options); end
+
+ # Mirror the Prism.parse_file_success? API by using the serialization API.
+ #
+ # @return [Boolean]
+ def parse_file_success?(*_arg0); end
+
+ # Mirror the Prism.parse_lex API by using the serialization API.
+ def parse_lex(*_arg0); end
+
+ # Mirror the Prism.parse_lex_file API by using the serialization API.
+ def parse_lex_file(*_arg0); end
+
+ # Mirror the Prism.parse_success? API by using the serialization API.
+ #
+ # @return [Boolean]
+ def parse_success?(*_arg0); end
+ end
+end
+
+# Represents the use of the `alias` keyword to alias a global variable.
+#
+# alias $foo $bar
+# ^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#52
+class Prism::AliasGlobalVariableNode < ::Prism::Node
+ # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void
+ #
+ # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode
+ #
+ # source://prism//lib/prism/node.rb#63
+ sig do
+ params(
+ new_name: Prism::Node,
+ old_name: Prism::Node,
+ keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(new_name, old_name, keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#71
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#76
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#86
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#81
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> AliasGlobalVariableNode
+ #
+ # source://prism//lib/prism/node.rb#91
+ sig { params(params: T.untyped).returns(Prism::AliasGlobalVariableNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#76
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#104
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#114
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#109
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#60
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # attr_reader new_name: Node
+ #
+ # source://prism//lib/prism/node.rb#54
+ sig { returns(Prism::Node) }
+ def new_name; end
+
+ # attr_reader old_name: Node
+ #
+ # source://prism//lib/prism/node.rb#57
+ sig { returns(Prism::Node) }
+ def old_name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#138
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#148
+ def type; end
+ end
+end
+
+# Represents the use of the `alias` keyword to alias a method.
+#
+# alias foo bar
+# ^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#157
+class Prism::AliasMethodNode < ::Prism::Node
+ # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void
+ #
+ # @return [AliasMethodNode] a new instance of AliasMethodNode
+ #
+ # source://prism//lib/prism/node.rb#168
+ sig do
+ params(
+ new_name: Prism::Node,
+ old_name: Prism::Node,
+ keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(new_name, old_name, keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#176
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#181
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#191
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#186
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> AliasMethodNode
+ #
+ # source://prism//lib/prism/node.rb#196
+ sig { params(params: T.untyped).returns(Prism::AliasMethodNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#181
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#209
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#219
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#214
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#165
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # attr_reader new_name: Node
+ #
+ # source://prism//lib/prism/node.rb#159
+ sig { returns(Prism::Node) }
+ def new_name; end
+
+ # attr_reader old_name: Node
+ #
+ # source://prism//lib/prism/node.rb#162
+ sig { returns(Prism::Node) }
+ def old_name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#243
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#253
+ def type; end
+ end
+end
+
+# Represents an alternation pattern in pattern matching.
+#
+# foo => bar | baz
+# ^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#262
+class Prism::AlternationPatternNode < ::Prism::Node
+ # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [AlternationPatternNode] a new instance of AlternationPatternNode
+ #
+ # source://prism//lib/prism/node.rb#273
+ sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(left, right, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#281
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#286
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#296
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#291
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> AlternationPatternNode
+ #
+ # source://prism//lib/prism/node.rb#301
+ sig { params(params: T.untyped).returns(Prism::AlternationPatternNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#286
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#314
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#324
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader left: Node
+ #
+ # source://prism//lib/prism/node.rb#264
+ sig { returns(Prism::Node) }
+ def left; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#319
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#270
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader right: Node
+ #
+ # source://prism//lib/prism/node.rb#267
+ sig { returns(Prism::Node) }
+ def right; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#348
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#358
+ def type; end
+ end
+end
+
+# Represents the use of the `&&` operator or the `and` keyword.
+#
+# left and right
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#367
+class Prism::AndNode < ::Prism::Node
+ # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [AndNode] a new instance of AndNode
+ #
+ # source://prism//lib/prism/node.rb#378
+ sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(left, right, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#386
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#391
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#401
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#396
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> AndNode
+ #
+ # source://prism//lib/prism/node.rb#406
+ sig { params(params: T.untyped).returns(Prism::AndNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#391
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#419
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#429
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader left: Node
+ #
+ # source://prism//lib/prism/node.rb#369
+ sig { returns(Prism::Node) }
+ def left; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#424
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#375
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader right: Node
+ #
+ # source://prism//lib/prism/node.rb#372
+ sig { returns(Prism::Node) }
+ def right; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#453
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#463
+ def type; end
+ end
+end
+
+# Represents a set of arguments to a method or a keyword.
+#
+# return foo, bar, baz
+# ^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#472
+class Prism::ArgumentsNode < ::Prism::Node
+ # def initialize: (flags: Integer, arguments: Array[Node], location: Location) -> void
+ #
+ # @return [ArgumentsNode] a new instance of ArgumentsNode
+ #
+ # source://prism//lib/prism/node.rb#480
+ sig { params(flags: Integer, arguments: T::Array[Prism::Node], location: Prism::Location).void }
+ def initialize(flags, arguments, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#487
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#477
+ sig { returns(T::Array[Prism::Node]) }
+ def arguments; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#492
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#502
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#497
+ def compact_child_nodes; end
+
+ # def contains_keyword_splat?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#524
+ sig { returns(T::Boolean) }
+ def contains_keyword_splat?; end
+
+ # def copy: (**params) -> ArgumentsNode
+ #
+ # source://prism//lib/prism/node.rb#507
+ sig { params(params: T.untyped).returns(Prism::ArgumentsNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#492
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#519
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#529
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#551
+ def type; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#474
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#561
+ def type; end
+ end
+end
+
+# Flags for arguments nodes.
+#
+# source://prism//lib/prism/node.rb#17277
+module Prism::ArgumentsNodeFlags; end
+
+# if arguments contain keyword splat
+#
+# source://prism//lib/prism/node.rb#17279
+Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer)
+
+# Represents an array literal. This can be a regular array using brackets or
+# a special array using % like %w or %i.
+#
+# [1, 2, 3]
+# ^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#571
+class Prism::ArrayNode < ::Prism::Node
+ # def initialize: (flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
+ #
+ # @return [ArrayNode] a new instance of ArrayNode
+ #
+ # source://prism//lib/prism/node.rb#585
+ sig do
+ params(
+ flags: Integer,
+ elements: T::Array[Prism::Node],
+ opening_loc: T.nilable(Prism::Location),
+ closing_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, elements, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#594
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#599
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#643
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#582
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#609
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#604
+ def compact_child_nodes; end
+
+ # def contains_splat?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#633
+ sig { returns(T::Boolean) }
+ def contains_splat?; end
+
+ # def copy: (**params) -> ArrayNode
+ #
+ # source://prism//lib/prism/node.rb#614
+ sig { params(params: T.untyped).returns(Prism::ArrayNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#599
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#628
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader elements: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#576
+ sig { returns(T::Array[Prism::Node]) }
+ def elements; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#648
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#638
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#579
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#672
+ def type; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#573
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#682
+ def type; end
+ end
+end
+
+# Flags for array nodes.
+#
+# source://prism//lib/prism/node.rb#17283
+module Prism::ArrayNodeFlags; end
+
+# if array contains splat nodes
+#
+# source://prism//lib/prism/node.rb#17285
+Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer)
+
+# Represents an array pattern in pattern matching.
+#
+# foo in 1, 2
+# ^^^^^^^^^^^
+#
+# foo in [1, 2]
+# ^^^^^^^^^^^^^
+#
+# foo in *1
+# ^^^^^^^^^
+#
+# foo in Bar[]
+# ^^^^^^^^^^^^
+#
+# foo in Bar[1, 2, 3]
+# ^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#703
+class Prism::ArrayPatternNode < ::Prism::Node
+ # def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
+ #
+ # @return [ArrayPatternNode] a new instance of ArrayPatternNode
+ #
+ # source://prism//lib/prism/node.rb#723
+ sig do
+ params(
+ constant: T.nilable(Prism::Node),
+ requireds: T::Array[Prism::Node],
+ rest: T.nilable(Prism::Node),
+ posts: T::Array[Prism::Node],
+ opening_loc: T.nilable(Prism::Location),
+ closing_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#734
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#739
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#785
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#720
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#754
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#744
+ def compact_child_nodes; end
+
+ # attr_reader constant: Node?
+ #
+ # source://prism//lib/prism/node.rb#705
+ sig { returns(T.nilable(Prism::Node)) }
+ def constant; end
+
+ # def copy: (**params) -> ArrayPatternNode
+ #
+ # source://prism//lib/prism/node.rb#759
+ sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#739
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#775
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#790
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#780
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#717
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # attr_reader posts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#714
+ sig { returns(T::Array[Prism::Node]) }
+ def posts; end
+
+ # attr_reader requireds: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#708
+ sig { returns(T::Array[Prism::Node]) }
+ def requireds; end
+
+ # attr_reader rest: Node?
+ #
+ # source://prism//lib/prism/node.rb#711
+ sig { returns(T.nilable(Prism::Node)) }
+ def rest; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#825
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#835
+ def type; end
+ end
+end
+
+# Represents a hash key/value pair.
+#
+# { a => b }
+# ^^^^^^
+#
+# source://prism//lib/prism/node.rb#844
+class Prism::AssocNode < ::Prism::Node
+ # def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void
+ #
+ # @return [AssocNode] a new instance of AssocNode
+ #
+ # source://prism//lib/prism/node.rb#855
+ sig do
+ params(
+ key: Prism::Node,
+ value: T.nilable(Prism::Node),
+ operator_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(key, value, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#863
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#868
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#881
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#873
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> AssocNode
+ #
+ # source://prism//lib/prism/node.rb#886
+ sig { params(params: T.untyped).returns(Prism::AssocNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#868
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#899
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#909
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader key: Node
+ #
+ # source://prism//lib/prism/node.rb#846
+ sig { returns(Prism::Node) }
+ def key; end
+
+ # def operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#904
+ sig { returns(T.nilable(String)) }
+ def operator; end
+
+ # attr_reader operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#852
+ sig { returns(T.nilable(Prism::Location)) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#937
+ def type; end
+
+ # attr_reader value: Node?
+ #
+ # source://prism//lib/prism/node.rb#849
+ sig { returns(T.nilable(Prism::Node)) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#947
+ def type; end
+ end
+end
+
+# Represents a splat in a hash literal.
+#
+# { **foo }
+# ^^^^^
+#
+# source://prism//lib/prism/node.rb#956
+class Prism::AssocSplatNode < ::Prism::Node
+ # def initialize: (value: Node?, operator_loc: Location, location: Location) -> void
+ #
+ # @return [AssocSplatNode] a new instance of AssocSplatNode
+ #
+ # source://prism//lib/prism/node.rb#964
+ sig { params(value: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(value, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#971
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#976
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#988
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#981
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> AssocSplatNode
+ #
+ # source://prism//lib/prism/node.rb#993
+ sig { params(params: T.untyped).returns(Prism::AssocSplatNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#976
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1005
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1015
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#1010
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#961
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1041
+ def type; end
+
+ # attr_reader value: Node?
+ #
+ # source://prism//lib/prism/node.rb#958
+ sig { returns(T.nilable(Prism::Node)) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1051
+ def type; end
+ end
+end
+
+Prism::BACKEND = T.let(T.unsafe(nil), Symbol)
+
+# Represents reading a reference to a field in the previous match.
+#
+# $'
+# ^^
+#
+# source://prism//lib/prism/node.rb#1060
+class Prism::BackReferenceReadNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode
+ #
+ # source://prism//lib/prism/node.rb#1065
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#1071
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1076
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#1086
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1081
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> BackReferenceReadNode
+ #
+ # source://prism//lib/prism/node.rb#1091
+ sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1076
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1102
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1107
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#1062
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1127
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1137
+ def type; end
+ end
+end
+
+# A class that knows how to walk down the tree. None of the individual visit
+# methods are implemented on this visitor, so it forces the consumer to
+# implement each one that they need. For a default implementation that
+# continues walking the tree, see the Visitor class.
+#
+# source://prism//lib/prism/visitor.rb#13
+class Prism::BasicVisitor
+ # Calls `accept` on the given node if it is not `nil`, which in turn should
+ # call back into this visitor by calling the appropriate `visit_*` method.
+ #
+ # source://prism//lib/prism/visitor.rb#16
+ sig { params(node: T.nilable(Prism::Node)).void }
+ def visit(node); end
+
+ # Visits each node in `nodes` by calling `accept` on each one.
+ #
+ # source://prism//lib/prism/visitor.rb#21
+ sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void }
+ def visit_all(nodes); end
+
+ # Visits the child nodes of `node` by calling `accept` on each one.
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::Node).void }
+ def visit_child_nodes(node); end
+end
+
+# Represents a begin statement.
+#
+# begin
+# foo
+# end
+# ^^^^^
+#
+# source://prism//lib/prism/node.rb#1148
+class Prism::BeginNode < ::Prism::Node
+ # def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void
+ #
+ # @return [BeginNode] a new instance of BeginNode
+ #
+ # source://prism//lib/prism/node.rb#1168
+ sig do
+ params(
+ begin_keyword_loc: T.nilable(Prism::Location),
+ statements: T.nilable(Prism::StatementsNode),
+ rescue_clause: T.nilable(Prism::RescueNode),
+ else_clause: T.nilable(Prism::ElseNode),
+ ensure_clause: T.nilable(Prism::EnsureNode),
+ end_keyword_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#1179
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def begin_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#1229
+ sig { returns(T.nilable(String)) }
+ def begin_keyword; end
+
+ # attr_reader begin_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#1150
+ sig { returns(T.nilable(Prism::Location)) }
+ def begin_keyword_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1188
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#1203
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1193
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> BeginNode
+ #
+ # source://prism//lib/prism/node.rb#1208
+ sig { params(params: T.untyped).returns(Prism::BeginNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1188
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1224
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader else_clause: ElseNode?
+ #
+ # source://prism//lib/prism/node.rb#1159
+ sig { returns(T.nilable(Prism::ElseNode)) }
+ def else_clause; end
+
+ # def end_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#1234
+ sig { returns(T.nilable(String)) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#1165
+ sig { returns(T.nilable(Prism::Location)) }
+ def end_keyword_loc; end
+
+ # attr_reader ensure_clause: EnsureNode?
+ #
+ # source://prism//lib/prism/node.rb#1162
+ sig { returns(T.nilable(Prism::EnsureNode)) }
+ def ensure_clause; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1239
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader rescue_clause: RescueNode?
+ #
+ # source://prism//lib/prism/node.rb#1156
+ sig { returns(T.nilable(Prism::RescueNode)) }
+ def rescue_clause; end
+
+ # source://prism//lib/prism/node.rb#1183
+ def set_newline_flag(newline_marked); end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#1153
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1284
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1294
+ def type; end
+ end
+end
+
+# Represents block method arguments.
+#
+# bar(&args)
+# ^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#1303
+class Prism::BlockArgumentNode < ::Prism::Node
+ # def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void
+ #
+ # @return [BlockArgumentNode] a new instance of BlockArgumentNode
+ #
+ # source://prism//lib/prism/node.rb#1311
+ sig { params(expression: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(expression, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#1318
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1323
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#1335
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1328
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> BlockArgumentNode
+ #
+ # source://prism//lib/prism/node.rb#1340
+ sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1323
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1352
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader expression: Node?
+ #
+ # source://prism//lib/prism/node.rb#1305
+ sig { returns(T.nilable(Prism::Node)) }
+ def expression; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1362
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#1357
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#1308
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1388
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1398
+ def type; end
+ end
+end
+
+# Represents a block local variable.
+#
+# a { |; b| }
+# ^
+#
+# source://prism//lib/prism/node.rb#1407
+class Prism::BlockLocalVariableNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode
+ #
+ # source://prism//lib/prism/node.rb#1412
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#1418
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1423
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#1433
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1428
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> BlockLocalVariableNode
+ #
+ # source://prism//lib/prism/node.rb#1438
+ sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1423
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1449
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1454
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#1409
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1474
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1484
+ def type; end
+ end
+end
+
+# Represents a block of ruby code.
+#
+# [1, 2, 3].each { |i| puts x }
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#1493
+class Prism::BlockNode < ::Prism::Node
+ # def initialize: (locals: Array[Symbol], locals_body_index: Integer, parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void
+ #
+ # @return [BlockNode] a new instance of BlockNode
+ #
+ # source://prism//lib/prism/node.rb#1513
+ sig do
+ params(
+ locals: T::Array[Symbol],
+ locals_body_index: Integer,
+ parameters: T.nilable(Prism::Node),
+ body: T.nilable(Prism::Node),
+ opening_loc: Prism::Location,
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(locals, locals_body_index, parameters, body, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#1524
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader body: Node?
+ #
+ # source://prism//lib/prism/node.rb#1504
+ sig { returns(T.nilable(Prism::Node)) }
+ def body; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1529
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#1573
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#1510
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#1542
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1534
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> BlockNode
+ #
+ # source://prism//lib/prism/node.rb#1547
+ sig { params(params: T.untyped).returns(Prism::BlockNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1529
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1563
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1578
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader locals: Array[Symbol]
+ #
+ # source://prism//lib/prism/node.rb#1495
+ sig { returns(T::Array[Symbol]) }
+ def locals; end
+
+ # attr_reader locals_body_index: Integer
+ #
+ # source://prism//lib/prism/node.rb#1498
+ sig { returns(Integer) }
+ def locals_body_index; end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#1568
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#1507
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader parameters: Node?
+ #
+ # source://prism//lib/prism/node.rb#1501
+ sig { returns(T.nilable(Prism::Node)) }
+ def parameters; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1613
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1623
+ def type; end
+ end
+end
+
+# Represents a block parameter to a method, block, or lambda definition.
+#
+# def a(&b)
+# ^^
+# end
+#
+# source://prism//lib/prism/node.rb#1633
+class Prism::BlockParameterNode < ::Prism::Node
+ # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void
+ #
+ # @return [BlockParameterNode] a new instance of BlockParameterNode
+ #
+ # source://prism//lib/prism/node.rb#1644
+ sig do
+ params(
+ name: T.nilable(Symbol),
+ name_loc: T.nilable(Prism::Location),
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#1652
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1657
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#1667
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1662
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> BlockParameterNode
+ #
+ # source://prism//lib/prism/node.rb#1672
+ sig { params(params: T.untyped).returns(Prism::BlockParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1657
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1685
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1695
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol?
+ #
+ # source://prism//lib/prism/node.rb#1635
+ sig { returns(T.nilable(Symbol)) }
+ def name; end
+
+ # attr_reader name_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#1638
+ sig { returns(T.nilable(Prism::Location)) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#1690
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#1641
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1721
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1731
+ def type; end
+ end
+end
+
+# Represents a block's parameters declaration.
+#
+# -> (a, b = 1; local) { }
+# ^^^^^^^^^^^^^^^^^
+#
+# foo do |a, b = 1; local|
+# ^^^^^^^^^^^^^^^^^
+# end
+#
+# source://prism//lib/prism/node.rb#1744
+class Prism::BlockParametersNode < ::Prism::Node
+ # def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
+ #
+ # @return [BlockParametersNode] a new instance of BlockParametersNode
+ #
+ # source://prism//lib/prism/node.rb#1758
+ sig do
+ params(
+ parameters: T.nilable(Prism::ParametersNode),
+ locals: T::Array[Prism::Node],
+ opening_loc: T.nilable(Prism::Location),
+ closing_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(parameters, locals, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#1767
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1772
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#1814
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#1755
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#1785
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1777
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> BlockParametersNode
+ #
+ # source://prism//lib/prism/node.rb#1790
+ sig { params(params: T.untyped).returns(Prism::BlockParametersNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1772
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1804
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1819
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader locals: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1749
+ sig { returns(T::Array[Prism::Node]) }
+ def locals; end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#1809
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#1752
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # attr_reader parameters: ParametersNode?
+ #
+ # source://prism//lib/prism/node.rb#1746
+ sig { returns(T.nilable(Prism::ParametersNode)) }
+ def parameters; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1847
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1857
+ def type; end
+ end
+end
+
+# Represents the use of the `break` keyword.
+#
+# break foo
+# ^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#1866
+class Prism::BreakNode < ::Prism::Node
+ # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void
+ #
+ # @return [BreakNode] a new instance of BreakNode
+ #
+ # source://prism//lib/prism/node.rb#1874
+ sig do
+ params(
+ arguments: T.nilable(Prism::ArgumentsNode),
+ keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(arguments, keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#1881
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#1868
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1886
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#1898
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#1891
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> BreakNode
+ #
+ # source://prism//lib/prism/node.rb#1903
+ sig { params(params: T.untyped).returns(Prism::BreakNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#1886
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#1915
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#1925
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#1920
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#1871
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1951
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#1961
+ def type; end
+ end
+end
+
+# Represents the use of the `&&=` operator on a call.
+#
+# foo.bar &&= value
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#1970
+class Prism::CallAndWriteNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [CallAndWriteNode] a new instance of CallAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#1996
+ sig do
+ params(
+ flags: Integer,
+ receiver: T.nilable(Prism::Node),
+ call_operator_loc: T.nilable(Prism::Location),
+ message_loc: T.nilable(Prism::Location),
+ read_name: Symbol,
+ write_name: Symbol,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#2009
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2065
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # def call_operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2070
+ sig { returns(T.nilable(String)) }
+ def call_operator; end
+
+ # attr_reader call_operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#1978
+ sig { returns(T.nilable(Prism::Location)) }
+ def call_operator_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2014
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#2027
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#2019
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> CallAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#2032
+ sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2014
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#2050
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#2085
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def message: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2075
+ sig { returns(T.nilable(String)) }
+ def message; end
+
+ # attr_reader message_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#1981
+ sig { returns(T.nilable(Prism::Location)) }
+ def message_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#2080
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#1990
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader read_name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#1984
+ sig { returns(Symbol) }
+ def read_name; end
+
+ # attr_reader receiver: Node?
+ #
+ # source://prism//lib/prism/node.rb#1975
+ sig { returns(T.nilable(Prism::Node)) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2055
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2119
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#1993
+ sig { returns(Prism::Node) }
+ def value; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2060
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ # attr_reader write_name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#1987
+ sig { returns(Symbol) }
+ def write_name; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#1972
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2129
+ def type; end
+ end
+end
+
+# Represents a method call, in all of the various forms that can take.
+#
+# foo
+# ^^^
+#
+# foo()
+# ^^^^^
+#
+# +foo
+# ^^^^
+#
+# foo + bar
+# ^^^^^^^^^
+#
+# foo.bar
+# ^^^^^^^
+#
+# foo&.bar
+# ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#2153
+class Prism::CallNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location) -> void
+ #
+ # @return [CallNode] a new instance of CallNode
+ #
+ # source://prism//lib/prism/node.rb#2182
+ sig do
+ params(
+ flags: Integer,
+ receiver: T.nilable(Prism::Node),
+ call_operator_loc: T.nilable(Prism::Location),
+ name: Symbol,
+ message_loc: T.nilable(Prism::Location),
+ opening_loc: T.nilable(Prism::Location),
+ arguments: T.nilable(Prism::ArgumentsNode),
+ closing_loc: T.nilable(Prism::Location),
+ block: T.nilable(Prism::Node),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#2196
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#2173
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2254
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # attr_reader block: Node?
+ #
+ # source://prism//lib/prism/node.rb#2179
+ sig { returns(T.nilable(Prism::Node)) }
+ def block; end
+
+ # def call_operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2259
+ sig { returns(T.nilable(String)) }
+ def call_operator; end
+
+ # attr_reader call_operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#2161
+ sig { returns(T.nilable(Prism::Location)) }
+ def call_operator_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2201
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2274
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#2176
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#2215
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#2206
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> CallNode
+ #
+ # source://prism//lib/prism/node.rb#2220
+ sig { params(params: T.untyped).returns(Prism::CallNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2201
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#2239
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#2279
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def message: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2264
+ sig { returns(T.nilable(String)) }
+ def message; end
+
+ # attr_reader message_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#2167
+ sig { returns(T.nilable(Prism::Location)) }
+ def message_loc; end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#2164
+ sig { returns(Symbol) }
+ def name; end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2269
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#2170
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # attr_reader receiver: Node?
+ #
+ # source://prism//lib/prism/node.rb#2158
+ sig { returns(T.nilable(Prism::Node)) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2244
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2323
+ def type; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2249
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#2155
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2333
+ def type; end
+ end
+end
+
+# Flags for call nodes.
+#
+# source://prism//lib/prism/node.rb#17289
+module Prism::CallNodeFlags; end
+
+# a call that is an attribute write, so the value being written should be returned
+#
+# source://prism//lib/prism/node.rb#17297
+Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer)
+
+# &. operator
+#
+# source://prism//lib/prism/node.rb#17291
+Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer)
+
+# a call that could have been a local variable
+#
+# source://prism//lib/prism/node.rb#17294
+Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer)
+
+# Represents the use of an assignment operator on a call.
+#
+# foo.bar += baz
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#2342
+class Prism::CallOperatorWriteNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#2371
+ sig do
+ params(
+ flags: Integer,
+ receiver: T.nilable(Prism::Node),
+ call_operator_loc: T.nilable(Prism::Location),
+ message_loc: T.nilable(Prism::Location),
+ read_name: Symbol,
+ write_name: Symbol,
+ operator: Symbol,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#2385
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2442
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # def call_operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2447
+ sig { returns(T.nilable(String)) }
+ def call_operator; end
+
+ # attr_reader call_operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#2350
+ sig { returns(T.nilable(Prism::Location)) }
+ def call_operator_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2390
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#2403
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#2395
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> CallOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#2408
+ sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2390
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#2427
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#2457
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def message: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2452
+ sig { returns(T.nilable(String)) }
+ def message; end
+
+ # attr_reader message_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#2353
+ sig { returns(T.nilable(Prism::Location)) }
+ def message_loc; end
+
+ # attr_reader operator: Symbol
+ #
+ # source://prism//lib/prism/node.rb#2362
+ sig { returns(Symbol) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#2365
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader read_name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#2356
+ sig { returns(Symbol) }
+ def read_name; end
+
+ # attr_reader receiver: Node?
+ #
+ # source://prism//lib/prism/node.rb#2347
+ sig { returns(T.nilable(Prism::Node)) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2432
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2492
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#2368
+ sig { returns(Prism::Node) }
+ def value; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2437
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ # attr_reader write_name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#2359
+ sig { returns(Symbol) }
+ def write_name; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#2344
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2502
+ def type; end
+ end
+end
+
+# Represents the use of the `||=` operator on a call.
+#
+# foo.bar ||= value
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#2511
+class Prism::CallOrWriteNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [CallOrWriteNode] a new instance of CallOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#2537
+ sig do
+ params(
+ flags: Integer,
+ receiver: T.nilable(Prism::Node),
+ call_operator_loc: T.nilable(Prism::Location),
+ message_loc: T.nilable(Prism::Location),
+ read_name: Symbol,
+ write_name: Symbol,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#2550
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2606
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # def call_operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2611
+ sig { returns(T.nilable(String)) }
+ def call_operator; end
+
+ # attr_reader call_operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#2519
+ sig { returns(T.nilable(Prism::Location)) }
+ def call_operator_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2555
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#2568
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#2560
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> CallOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#2573
+ sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2555
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#2591
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#2626
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def message: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#2616
+ sig { returns(T.nilable(String)) }
+ def message; end
+
+ # attr_reader message_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#2522
+ sig { returns(T.nilable(Prism::Location)) }
+ def message_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#2621
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#2531
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader read_name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#2525
+ sig { returns(Symbol) }
+ def read_name; end
+
+ # attr_reader receiver: Node?
+ #
+ # source://prism//lib/prism/node.rb#2516
+ sig { returns(T.nilable(Prism::Node)) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2596
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2660
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#2534
+ sig { returns(Prism::Node) }
+ def value; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2601
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ # attr_reader write_name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#2528
+ sig { returns(Symbol) }
+ def write_name; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#2513
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2670
+ def type; end
+ end
+end
+
+# Represents assigning to a method call.
+#
+# foo.bar, = 1
+# ^^^^^^^
+#
+# begin
+# rescue => foo.bar
+# ^^^^^^^
+# end
+#
+# for foo.bar in baz do end
+# ^^^^^^^
+#
+# source://prism//lib/prism/node.rb#2687
+class Prism::CallTargetNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location) -> void
+ #
+ # @return [CallTargetNode] a new instance of CallTargetNode
+ #
+ # source://prism//lib/prism/node.rb#2704
+ sig do
+ params(
+ flags: Integer,
+ receiver: Prism::Node,
+ call_operator_loc: Prism::Location,
+ name: Symbol,
+ message_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, call_operator_loc, name, message_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#2714
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2764
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # def call_operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#2769
+ sig { returns(String) }
+ def call_operator; end
+
+ # attr_reader call_operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#2695
+ sig { returns(Prism::Location) }
+ def call_operator_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2719
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#2729
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#2724
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> CallTargetNode
+ #
+ # source://prism//lib/prism/node.rb#2734
+ sig { params(params: T.untyped).returns(Prism::CallTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2719
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#2749
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#2779
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def message: () -> String
+ #
+ # source://prism//lib/prism/node.rb#2774
+ sig { returns(String) }
+ def message; end
+
+ # attr_reader message_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#2701
+ sig { returns(Prism::Location) }
+ def message_loc; end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#2698
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader receiver: Node
+ #
+ # source://prism//lib/prism/node.rb#2692
+ sig { returns(Prism::Node) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2754
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2805
+ def type; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#2759
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#2689
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2815
+ def type; end
+ end
+end
+
+# Represents assigning to a local variable in pattern matching.
+#
+# foo => [bar => baz]
+# ^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#2824
+class Prism::CapturePatternNode < ::Prism::Node
+ # def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [CapturePatternNode] a new instance of CapturePatternNode
+ #
+ # source://prism//lib/prism/node.rb#2835
+ sig do
+ params(
+ value: Prism::Node,
+ target: Prism::Node,
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(value, target, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#2843
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2848
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#2858
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#2853
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> CapturePatternNode
+ #
+ # source://prism//lib/prism/node.rb#2863
+ sig { params(params: T.untyped).returns(Prism::CapturePatternNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2848
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#2876
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#2886
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#2881
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#2832
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader target: Node
+ #
+ # source://prism//lib/prism/node.rb#2829
+ sig { returns(Prism::Node) }
+ def target; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2910
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#2826
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#2920
+ def type; end
+ end
+end
+
+# Represents the use of a case statement for pattern matching.
+#
+# case true
+# in false
+# end
+# ^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#2931
+class Prism::CaseMatchNode < ::Prism::Node
+ # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void
+ #
+ # @return [CaseMatchNode] a new instance of CaseMatchNode
+ #
+ # source://prism//lib/prism/node.rb#2948
+ sig do
+ params(
+ predicate: T.nilable(Prism::Node),
+ conditions: T::Array[Prism::Node],
+ consequent: T.nilable(Prism::ElseNode),
+ case_keyword_loc: Prism::Location,
+ end_keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#2958
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def case_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#3002
+ sig { returns(String) }
+ def case_keyword; end
+
+ # attr_reader case_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#2942
+ sig { returns(Prism::Location) }
+ def case_keyword_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2963
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#2977
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#2968
+ def compact_child_nodes; end
+
+ # attr_reader conditions: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#2936
+ sig { returns(T::Array[Prism::Node]) }
+ def conditions; end
+
+ # attr_reader consequent: ElseNode?
+ #
+ # source://prism//lib/prism/node.rb#2939
+ sig { returns(T.nilable(Prism::ElseNode)) }
+ def consequent; end
+
+ # def copy: (**params) -> CaseMatchNode
+ #
+ # source://prism//lib/prism/node.rb#2982
+ sig { params(params: T.untyped).returns(Prism::CaseMatchNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#2963
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#2997
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def end_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#3007
+ sig { returns(String) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#2945
+ sig { returns(Prism::Location) }
+ def end_keyword_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3012
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader predicate: Node?
+ #
+ # source://prism//lib/prism/node.rb#2933
+ sig { returns(T.nilable(Prism::Node)) }
+ def predicate; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3046
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3056
+ def type; end
+ end
+end
+
+# Represents the use of a case statement.
+#
+# case true
+# when false
+# end
+# ^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#3067
+class Prism::CaseNode < ::Prism::Node
+ # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void
+ #
+ # @return [CaseNode] a new instance of CaseNode
+ #
+ # source://prism//lib/prism/node.rb#3084
+ sig do
+ params(
+ predicate: T.nilable(Prism::Node),
+ conditions: T::Array[Prism::Node],
+ consequent: T.nilable(Prism::ElseNode),
+ case_keyword_loc: Prism::Location,
+ end_keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3094
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def case_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#3138
+ sig { returns(String) }
+ def case_keyword; end
+
+ # attr_reader case_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3078
+ sig { returns(Prism::Location) }
+ def case_keyword_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3099
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#3113
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3104
+ def compact_child_nodes; end
+
+ # attr_reader conditions: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3072
+ sig { returns(T::Array[Prism::Node]) }
+ def conditions; end
+
+ # attr_reader consequent: ElseNode?
+ #
+ # source://prism//lib/prism/node.rb#3075
+ sig { returns(T.nilable(Prism::ElseNode)) }
+ def consequent; end
+
+ # def copy: (**params) -> CaseNode
+ #
+ # source://prism//lib/prism/node.rb#3118
+ sig { params(params: T.untyped).returns(Prism::CaseNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3099
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#3133
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def end_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#3143
+ sig { returns(String) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3081
+ sig { returns(Prism::Location) }
+ def end_keyword_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3148
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader predicate: Node?
+ #
+ # source://prism//lib/prism/node.rb#3069
+ sig { returns(T.nilable(Prism::Node)) }
+ def predicate; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3182
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3192
+ def type; end
+ end
+end
+
+# Represents a class declaration involving the `class` keyword.
+#
+# class Foo end
+# ^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#3201
+class Prism::ClassNode < ::Prism::Node
+ # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void
+ #
+ # @return [ClassNode] a new instance of ClassNode
+ #
+ # source://prism//lib/prism/node.rb#3227
+ sig do
+ params(
+ locals: T::Array[Symbol],
+ class_keyword_loc: Prism::Location,
+ constant_path: Prism::Node,
+ inheritance_operator_loc: T.nilable(Prism::Location),
+ superclass: T.nilable(Prism::Node),
+ body: T.nilable(Prism::Node),
+ end_keyword_loc: Prism::Location,
+ name: Symbol,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3240
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader body: Node?
+ #
+ # source://prism//lib/prism/node.rb#3218
+ sig { returns(T.nilable(Prism::Node)) }
+ def body; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3245
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def class_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#3287
+ sig { returns(String) }
+ def class_keyword; end
+
+ # attr_reader class_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3206
+ sig { returns(Prism::Location) }
+ def class_keyword_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#3259
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3250
+ def compact_child_nodes; end
+
+ # attr_reader constant_path: Node
+ #
+ # source://prism//lib/prism/node.rb#3209
+ sig { returns(Prism::Node) }
+ def constant_path; end
+
+ # def copy: (**params) -> ClassNode
+ #
+ # source://prism//lib/prism/node.rb#3264
+ sig { params(params: T.untyped).returns(Prism::ClassNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3245
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#3282
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def end_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#3297
+ sig { returns(String) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3221
+ sig { returns(Prism::Location) }
+ def end_keyword_loc; end
+
+ # def inheritance_operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#3292
+ sig { returns(T.nilable(String)) }
+ def inheritance_operator; end
+
+ # attr_reader inheritance_operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#3212
+ sig { returns(T.nilable(Prism::Location)) }
+ def inheritance_operator_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3302
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader locals: Array[Symbol]
+ #
+ # source://prism//lib/prism/node.rb#3203
+ sig { returns(T::Array[Symbol]) }
+ def locals; end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3224
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader superclass: Node?
+ #
+ # source://prism//lib/prism/node.rb#3215
+ sig { returns(T.nilable(Prism::Node)) }
+ def superclass; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3340
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3350
+ def type; end
+ end
+end
+
+# Represents the use of the `&&=` operator for assignment to a class variable.
+#
+# @@target &&= value
+# ^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#3359
+class Prism::ClassVariableAndWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3373
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3382
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3387
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#3397
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3392
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ClassVariableAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3402
+ sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3387
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#3416
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3426
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3361
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3364
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#3421
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3367
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3450
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#3370
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3460
+ def type; end
+ end
+end
+
+# Represents assigning to a class variable using an operator that isn't `=`.
+#
+# @@target += value
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#3469
+class Prism::ClassVariableOperatorWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
+ #
+ # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3486
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ operator: Symbol,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, operator, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3496
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3501
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#3511
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3506
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ClassVariableOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3516
+ sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3501
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#3531
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3536
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3471
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3474
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # attr_reader operator: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3483
+ sig { returns(Symbol) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3477
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3561
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#3480
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3571
+ def type; end
+ end
+end
+
+# Represents the use of the `||=` operator for assignment to a class variable.
+#
+# @@target ||= value
+# ^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#3580
+class Prism::ClassVariableOrWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3594
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3603
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3608
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#3618
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3613
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ClassVariableOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3623
+ sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3608
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#3637
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3647
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3582
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3585
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#3642
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3588
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3671
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#3591
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3681
+ def type; end
+ end
+end
+
+# Represents referencing a class variable.
+#
+# @@foo
+# ^^^^^
+#
+# source://prism//lib/prism/node.rb#3690
+class Prism::ClassVariableReadNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode
+ #
+ # source://prism//lib/prism/node.rb#3695
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3701
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3706
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#3716
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3711
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ClassVariableReadNode
+ #
+ # source://prism//lib/prism/node.rb#3721
+ sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3706
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#3732
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3737
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3692
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3757
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3767
+ def type; end
+ end
+end
+
+# Represents writing to a class variable in a context that doesn't have an explicit value.
+#
+# @@foo, @@bar = baz
+# ^^^^^ ^^^^^
+#
+# source://prism//lib/prism/node.rb#3776
+class Prism::ClassVariableTargetNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode
+ #
+ # source://prism//lib/prism/node.rb#3781
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3787
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3792
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#3802
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3797
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ClassVariableTargetNode
+ #
+ # source://prism//lib/prism/node.rb#3807
+ sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3792
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#3818
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3823
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3778
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3843
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3853
+ def type; end
+ end
+end
+
+# Represents writing to a class variable.
+#
+# @@foo = 1
+# ^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#3862
+class Prism::ClassVariableWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void
+ #
+ # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3876
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ value: Prism::Node,
+ operator_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, value, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3885
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3890
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#3900
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#3895
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ClassVariableWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3905
+ sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#3890
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#3919
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#3929
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3864
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3867
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#3924
+ sig { returns(T.nilable(String)) }
+ def operator; end
+
+ # attr_reader operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#3873
+ sig { returns(T.nilable(Prism::Location)) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3953
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#3870
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#3963
+ def type; end
+ end
+end
+
+# This represents a comment that was encountered during parsing. It is the
+# base class for all comment types.
+#
+# source://prism//lib/prism/parse_result.rb#228
+class Prism::Comment
+ # Create a new comment object with the given location.
+ #
+ # @return [Comment] a new instance of Comment
+ #
+ # source://prism//lib/prism/parse_result.rb#233
+ def initialize(location); end
+
+ # Implement the hash pattern matching interface for Comment.
+ #
+ # source://prism//lib/prism/parse_result.rb#238
+ def deconstruct_keys(keys); end
+
+ # The location of this comment in the source.
+ #
+ # source://prism//lib/prism/parse_result.rb#230
+ sig { returns(Prism::Location) }
+ def location; end
+
+ sig { returns(T::Boolean) }
+ def trailing?; end
+end
+
+# A compiler is a visitor that returns the value of each node as it visits.
+# This is as opposed to a visitor which will only walk the tree. This can be
+# useful when you are trying to compile a tree into a different format.
+#
+# For example, to build a representation of the tree as s-expressions, you
+# could write:
+#
+# class SExpressions < Prism::Compiler
+# def visit_arguments_node(node) = [:arguments, super]
+# def visit_call_node(node) = [:call, super]
+# def visit_integer_node(node) = [:integer]
+# def visit_program_node(node) = [:program, super]
+# end
+#
+# Prism.parse("1 + 2").value.accept(SExpressions.new)
+# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]]
+#
+# source://prism//lib/prism/compiler.rb#26
+class Prism::Compiler
+ # Visit an individual node.
+ #
+ # source://prism//lib/prism/compiler.rb#28
+ def visit(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a AliasGlobalVariableNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_alias_global_variable_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a AliasMethodNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_alias_method_node(node); end
+
+ # Visit a list of nodes.
+ #
+ # source://prism//lib/prism/compiler.rb#33
+ def visit_all(nodes); end
+
+ # Visit the child nodes of the given node.
+ # Compile a AlternationPatternNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_alternation_pattern_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a AndNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_and_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ArgumentsNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_arguments_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ArrayNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_array_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ArrayPatternNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_array_pattern_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a AssocNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_assoc_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a AssocSplatNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_assoc_splat_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a BackReferenceReadNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_back_reference_read_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a BeginNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_begin_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a BlockArgumentNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_block_argument_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a BlockLocalVariableNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_block_local_variable_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a BlockNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_block_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a BlockParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_block_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a BlockParametersNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_block_parameters_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a BreakNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_break_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a CallAndWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_call_and_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a CallNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_call_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a CallOperatorWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_call_operator_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a CallOrWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_call_or_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a CallTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_call_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a CapturePatternNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_capture_pattern_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a CaseMatchNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_case_match_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a CaseNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_case_node(node); end
+
+ # Visit the child nodes of the given node.
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_child_nodes(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ClassNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_class_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ClassVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_class_variable_and_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ClassVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_class_variable_operator_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ClassVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_class_variable_or_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ClassVariableReadNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_class_variable_read_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ClassVariableTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_class_variable_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ClassVariableWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_class_variable_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantAndWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_and_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantOperatorWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_operator_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantOrWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_or_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantPathAndWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_path_and_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantPathNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_path_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantPathOperatorWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_path_operator_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantPathOrWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_path_or_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantPathTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_path_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantPathWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_path_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantReadNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_read_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ConstantWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_constant_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a DefNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_def_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a DefinedNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_defined_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ElseNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_else_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a EmbeddedStatementsNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_embedded_statements_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a EmbeddedVariableNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_embedded_variable_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a EnsureNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_ensure_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a FalseNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_false_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a FindPatternNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_find_pattern_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a FlipFlopNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_flip_flop_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a FloatNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_float_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ForNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_for_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ForwardingArgumentsNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_forwarding_arguments_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ForwardingParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_forwarding_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ForwardingSuperNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_forwarding_super_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a GlobalVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_global_variable_and_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a GlobalVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_global_variable_operator_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a GlobalVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_global_variable_or_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a GlobalVariableReadNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_global_variable_read_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a GlobalVariableTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_global_variable_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a GlobalVariableWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_global_variable_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a HashNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_hash_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a HashPatternNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_hash_pattern_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a IfNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_if_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ImaginaryNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_imaginary_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ImplicitNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_implicit_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ImplicitRestNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_implicit_rest_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_in_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a IndexAndWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_index_and_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a IndexOperatorWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_index_operator_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a IndexOrWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_index_or_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a IndexTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_index_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InstanceVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_instance_variable_and_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InstanceVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_instance_variable_operator_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InstanceVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_instance_variable_or_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InstanceVariableReadNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_instance_variable_read_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InstanceVariableTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_instance_variable_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InstanceVariableWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_instance_variable_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a IntegerNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_integer_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InterpolatedMatchLastLineNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_interpolated_match_last_line_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InterpolatedRegularExpressionNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_interpolated_regular_expression_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InterpolatedStringNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_interpolated_string_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InterpolatedSymbolNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_interpolated_symbol_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a InterpolatedXStringNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_interpolated_x_string_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a KeywordHashNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_keyword_hash_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a KeywordRestParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_keyword_rest_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a LambdaNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_lambda_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a LocalVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_local_variable_and_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a LocalVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_local_variable_operator_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a LocalVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_local_variable_or_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a LocalVariableReadNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_local_variable_read_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a LocalVariableTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_local_variable_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a LocalVariableWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_local_variable_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a MatchLastLineNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_match_last_line_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a MatchPredicateNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_match_predicate_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a MatchRequiredNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_match_required_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a MatchWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_match_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a MissingNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_missing_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ModuleNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_module_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a MultiTargetNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_multi_target_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a MultiWriteNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_multi_write_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a NextNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_next_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a NilNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_nil_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a NoKeywordsParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_no_keywords_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a NumberedParametersNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_numbered_parameters_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a NumberedReferenceReadNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_numbered_reference_read_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a OptionalKeywordParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_optional_keyword_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a OptionalParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_optional_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a OrNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_or_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ParametersNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_parameters_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ParenthesesNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_parentheses_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a PinnedExpressionNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_pinned_expression_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a PinnedVariableNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_pinned_variable_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a PostExecutionNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_post_execution_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a PreExecutionNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_pre_execution_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ProgramNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_program_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RangeNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_range_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RationalNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_rational_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RedoNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_redo_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RegularExpressionNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_regular_expression_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RequiredKeywordParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_required_keyword_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RequiredParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_required_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RescueModifierNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_rescue_modifier_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RescueNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_rescue_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RestParameterNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_rest_parameter_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a RetryNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_retry_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a ReturnNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_return_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a SelfNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_self_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a SingletonClassNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_singleton_class_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a SourceEncodingNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_source_encoding_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a SourceFileNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_source_file_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a SourceLineNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_source_line_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a SplatNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_splat_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a StatementsNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_statements_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a StringNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_string_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a SuperNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_super_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a SymbolNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_symbol_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a TrueNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_true_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a UndefNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_undef_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a UnlessNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_unless_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a UntilNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_until_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a WhenNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_when_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a WhileNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_while_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a XStringNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_x_string_node(node); end
+
+ # Visit the child nodes of the given node.
+ # Compile a YieldNode node
+ #
+ # source://prism//lib/prism/compiler.rb#38
+ def visit_yield_node(node); end
+end
+
+# Represents the use of the `&&=` operator for assignment to a constant.
+#
+# Target &&= value
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#3972
+class Prism::ConstantAndWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#3986
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#3995
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4000
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4010
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4005
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4015
+ sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4000
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4029
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4039
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#3974
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3977
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#4034
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#3980
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4063
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#3983
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4073
+ def type; end
+ end
+end
+
+# Represents assigning to a constant using an operator that isn't `=`.
+#
+# Target += value
+# ^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#4082
+class Prism::ConstantOperatorWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
+ #
+ # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4099
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ operator: Symbol,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, operator, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4109
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4114
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4124
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4119
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4129
+ sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4114
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4144
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4149
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#4084
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4087
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # attr_reader operator: Symbol
+ #
+ # source://prism//lib/prism/node.rb#4096
+ sig { returns(Symbol) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4090
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4174
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#4093
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4184
+ def type; end
+ end
+end
+
+# Represents the use of the `||=` operator for assignment to a constant.
+#
+# Target ||= value
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#4193
+class Prism::ConstantOrWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4207
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4216
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4221
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4231
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4226
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4236
+ sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4221
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4250
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4260
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#4195
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4198
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#4255
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4201
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4284
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#4204
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4294
+ def type; end
+ end
+end
+
+# Represents the use of the `&&=` operator for assignment to a constant path.
+#
+# Parent::Child &&= value
+# ^^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#4303
+class Prism::ConstantPathAndWriteNode < ::Prism::Node
+ # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4314
+ sig do
+ params(
+ target: Prism::ConstantPathNode,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(target, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4322
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4327
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4337
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4332
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantPathAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4342
+ sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4327
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4355
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4365
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#4360
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4308
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader target: ConstantPathNode
+ #
+ # source://prism//lib/prism/node.rb#4305
+ sig { returns(Prism::ConstantPathNode) }
+ def target; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4389
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#4311
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4399
+ def type; end
+ end
+end
+
+# Represents accessing a constant through a path of `::` operators.
+#
+# Foo::Bar
+# ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#4408
+class Prism::ConstantPathNode < ::Prism::Node
+ # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void
+ #
+ # @return [ConstantPathNode] a new instance of ConstantPathNode
+ #
+ # source://prism//lib/prism/node.rb#4419
+ sig do
+ params(
+ parent: T.nilable(Prism::Node),
+ child: Prism::Node,
+ delimiter_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(parent, child, delimiter_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4427
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader child: Node
+ #
+ # source://prism//lib/prism/node.rb#4413
+ sig { returns(Prism::Node) }
+ def child; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4432
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4445
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4437
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantPathNode
+ #
+ # source://prism//lib/prism/node.rb#4450
+ sig { params(params: T.untyped).returns(Prism::ConstantPathNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4432
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4463
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def delimiter: () -> String
+ #
+ # source://prism//lib/prism/node.rb#4468
+ sig { returns(String) }
+ def delimiter; end
+
+ # attr_reader delimiter_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4416
+ sig { returns(Prism::Location) }
+ def delimiter_loc; end
+
+ # Returns the full name of this constant path. For example: "Foo::Bar"
+ #
+ # source://prism//lib/prism/node_ext.rb#129
+ def full_name; end
+
+ # Returns the list of parts for the full name of this constant path.
+ # For example: [:Foo, :Bar]
+ #
+ # source://prism//lib/prism/node_ext.rb#112
+ def full_name_parts; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4473
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader parent: Node?
+ #
+ # source://prism//lib/prism/node.rb#4410
+ sig { returns(T.nilable(Prism::Node)) }
+ def parent; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4501
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4511
+ def type; end
+ end
+end
+
+# An error class raised when dynamic parts are found while computing a
+# constant path's full name. For example:
+# Foo::Bar::Baz -> does not raise because all parts of the constant path are
+# simple constants
+# var::Bar::Baz -> raises because the first part of the constant path is a
+# local variable
+#
+# source://prism//lib/prism/node_ext.rb#108
+class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end
+
+# Represents assigning to a constant path using an operator that isn't `=`.
+#
+# Parent::Child += value
+# ^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#4520
+class Prism::ConstantPathOperatorWriteNode < ::Prism::Node
+ # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
+ #
+ # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4534
+ sig do
+ params(
+ target: Prism::ConstantPathNode,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ operator: Symbol,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(target, operator_loc, value, operator, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4543
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4548
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4558
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4553
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantPathOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4563
+ sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4548
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4577
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4582
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader operator: Symbol
+ #
+ # source://prism//lib/prism/node.rb#4531
+ sig { returns(Symbol) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4525
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader target: ConstantPathNode
+ #
+ # source://prism//lib/prism/node.rb#4522
+ sig { returns(Prism::ConstantPathNode) }
+ def target; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4607
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#4528
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4617
+ def type; end
+ end
+end
+
+# Represents the use of the `||=` operator for assignment to a constant path.
+#
+# Parent::Child ||= value
+# ^^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#4626
+class Prism::ConstantPathOrWriteNode < ::Prism::Node
+ # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4637
+ sig do
+ params(
+ target: Prism::ConstantPathNode,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(target, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4645
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4650
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4660
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4655
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantPathOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4665
+ sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4650
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4678
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4688
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#4683
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4631
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader target: ConstantPathNode
+ #
+ # source://prism//lib/prism/node.rb#4628
+ sig { returns(Prism::ConstantPathNode) }
+ def target; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4712
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#4634
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4722
+ def type; end
+ end
+end
+
+# Represents writing to a constant path in a context that doesn't have an explicit value.
+#
+# Foo::Foo, Bar::Bar = baz
+# ^^^^^^^^ ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#4731
+class Prism::ConstantPathTargetNode < ::Prism::Node
+ # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void
+ #
+ # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode
+ #
+ # source://prism//lib/prism/node.rb#4742
+ sig do
+ params(
+ parent: T.nilable(Prism::Node),
+ child: Prism::Node,
+ delimiter_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(parent, child, delimiter_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4750
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader child: Node
+ #
+ # source://prism//lib/prism/node.rb#4736
+ sig { returns(Prism::Node) }
+ def child; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4755
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4768
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4760
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantPathTargetNode
+ #
+ # source://prism//lib/prism/node.rb#4773
+ sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4755
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4786
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def delimiter: () -> String
+ #
+ # source://prism//lib/prism/node.rb#4791
+ sig { returns(String) }
+ def delimiter; end
+
+ # attr_reader delimiter_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4739
+ sig { returns(Prism::Location) }
+ def delimiter_loc; end
+
+ # Returns the full name of this constant path. For example: "Foo::Bar"
+ #
+ # source://prism//lib/prism/node_ext.rb#142
+ def full_name; end
+
+ # Returns the list of parts for the full name of this constant path.
+ # For example: [:Foo, :Bar]
+ #
+ # source://prism//lib/prism/node_ext.rb#137
+ def full_name_parts; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4796
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader parent: Node?
+ #
+ # source://prism//lib/prism/node.rb#4733
+ sig { returns(T.nilable(Prism::Node)) }
+ def parent; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4824
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4834
+ def type; end
+ end
+end
+
+# Represents writing to a constant path.
+#
+# ::Foo = 1
+# ^^^^^^^^^
+#
+# Foo::Bar = 1
+# ^^^^^^^^^^^^
+#
+# ::Foo::Bar = 1
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#4849
+class Prism::ConstantPathWriteNode < ::Prism::Node
+ # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4860
+ sig do
+ params(
+ target: Prism::ConstantPathNode,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(target, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4868
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4873
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4883
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4878
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantPathWriteNode
+ #
+ # source://prism//lib/prism/node.rb#4888
+ sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4873
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4901
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#4911
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#4906
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#4854
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader target: ConstantPathNode
+ #
+ # source://prism//lib/prism/node.rb#4851
+ sig { returns(Prism::ConstantPathNode) }
+ def target; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4935
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#4857
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#4945
+ def type; end
+ end
+end
+
+# Represents referencing a constant.
+#
+# Foo
+# ^^^
+#
+# source://prism//lib/prism/node.rb#4954
+class Prism::ConstantReadNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [ConstantReadNode] a new instance of ConstantReadNode
+ #
+ # source://prism//lib/prism/node.rb#4959
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#4965
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4970
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#4980
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#4975
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantReadNode
+ #
+ # source://prism//lib/prism/node.rb#4985
+ sig { params(params: T.untyped).returns(Prism::ConstantReadNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#4970
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#4996
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # Returns the full name of this constant. For example: "Foo"
+ #
+ # source://prism//lib/prism/node_ext.rb#96
+ def full_name; end
+
+ # Returns the list of parts for the full name of this constant.
+ # For example: [:Foo]
+ #
+ # source://prism//lib/prism/node_ext.rb#91
+ def full_name_parts; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5001
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#4956
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5021
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5031
+ def type; end
+ end
+end
+
+# Represents writing to a constant in a context that doesn't have an explicit value.
+#
+# Foo, Bar = baz
+# ^^^ ^^^
+#
+# source://prism//lib/prism/node.rb#5040
+class Prism::ConstantTargetNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [ConstantTargetNode] a new instance of ConstantTargetNode
+ #
+ # source://prism//lib/prism/node.rb#5045
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#5051
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5056
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#5066
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#5061
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantTargetNode
+ #
+ # source://prism//lib/prism/node.rb#5071
+ sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5056
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#5082
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5087
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#5042
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5107
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5117
+ def type; end
+ end
+end
+
+# Represents writing to a constant.
+#
+# Foo = 1
+# ^^^^^^^
+#
+# source://prism//lib/prism/node.rb#5126
+class Prism::ConstantWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [ConstantWriteNode] a new instance of ConstantWriteNode
+ #
+ # source://prism//lib/prism/node.rb#5140
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ value: Prism::Node,
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, value, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#5149
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5154
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#5164
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#5159
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ConstantWriteNode
+ #
+ # source://prism//lib/prism/node.rb#5169
+ sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5154
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#5183
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5193
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#5128
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5131
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5188
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5137
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5217
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#5134
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5227
+ def type; end
+ end
+end
+
+class Prism::DATAComment < Prism::Comment; end
+
+# The DSL module provides a set of methods that can be used to create prism
+# nodes in a more concise manner. For example, instead of writing:
+#
+# source = Prism::Source.new("[1]")
+#
+# Prism::ArrayNode.new(
+# [
+# Prism::IntegerNode.new(
+# Prism::IntegerBaseFlags::DECIMAL,
+# Prism::Location.new(source, 1, 1),
+# )
+# ],
+# Prism::Location.new(source, 0, 1),
+# Prism::Location.new(source, 2, 1)
+# )
+#
+# you could instead write:
+#
+# source = Prism::Source.new("[1]")
+#
+# ArrayNode(
+# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1))),
+# Location(source, 0, 1),
+# Location(source, 2, 1)
+# )
+#
+# This is mostly helpful in the context of writing tests, but can also be used
+# to generate trees programmatically.
+#
+# source://prism//lib/prism/dsl.rb#37
+module Prism::DSL
+ private
+
+ # Create a new AliasGlobalVariableNode node
+ #
+ # source://prism//lib/prism/dsl.rb#46
+ def AliasGlobalVariableNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new AliasMethodNode node
+ #
+ # source://prism//lib/prism/dsl.rb#51
+ def AliasMethodNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new AlternationPatternNode node
+ #
+ # source://prism//lib/prism/dsl.rb#56
+ def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new AndNode node
+ #
+ # source://prism//lib/prism/dsl.rb#61
+ def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new ArgumentsNode node
+ #
+ # source://prism//lib/prism/dsl.rb#66
+ def ArgumentsNode(flags, arguments, location = T.unsafe(nil)); end
+
+ # Create a new ArrayNode node
+ #
+ # source://prism//lib/prism/dsl.rb#71
+ def ArrayNode(flags, elements, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new ArrayPatternNode node
+ #
+ # source://prism//lib/prism/dsl.rb#76
+ def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new AssocNode node
+ #
+ # source://prism//lib/prism/dsl.rb#81
+ def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new AssocSplatNode node
+ #
+ # source://prism//lib/prism/dsl.rb#86
+ def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new BackReferenceReadNode node
+ #
+ # source://prism//lib/prism/dsl.rb#91
+ def BackReferenceReadNode(name, location = T.unsafe(nil)); end
+
+ # Create a new BeginNode node
+ #
+ # source://prism//lib/prism/dsl.rb#96
+ def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new BlockArgumentNode node
+ #
+ # source://prism//lib/prism/dsl.rb#101
+ def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new BlockLocalVariableNode node
+ #
+ # source://prism//lib/prism/dsl.rb#106
+ def BlockLocalVariableNode(name, location = T.unsafe(nil)); end
+
+ # Create a new BlockNode node
+ #
+ # source://prism//lib/prism/dsl.rb#111
+ def BlockNode(locals, locals_body_index, parameters, body, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new BlockParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#116
+ def BlockParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new BlockParametersNode node
+ #
+ # source://prism//lib/prism/dsl.rb#121
+ def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new BreakNode node
+ #
+ # source://prism//lib/prism/dsl.rb#126
+ def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new CallAndWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#131
+ def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new CallNode node
+ #
+ # source://prism//lib/prism/dsl.rb#136
+ def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location = T.unsafe(nil)); end
+
+ # Create a new CallOperatorWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#141
+ def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new CallOrWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#146
+ def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new CallTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#151
+ def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, location = T.unsafe(nil)); end
+
+ # Create a new CapturePatternNode node
+ #
+ # source://prism//lib/prism/dsl.rb#156
+ def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new CaseMatchNode node
+ #
+ # source://prism//lib/prism/dsl.rb#161
+ def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new CaseNode node
+ #
+ # source://prism//lib/prism/dsl.rb#166
+ def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new ClassNode node
+ #
+ # source://prism//lib/prism/dsl.rb#171
+ def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location = T.unsafe(nil)); end
+
+ # Create a new ClassVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#176
+ def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new ClassVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#181
+ def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end
+
+ # Create a new ClassVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#186
+ def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new ClassVariableReadNode node
+ #
+ # source://prism//lib/prism/dsl.rb#191
+ def ClassVariableReadNode(name, location = T.unsafe(nil)); end
+
+ # Create a new ClassVariableTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#196
+ def ClassVariableTargetNode(name, location = T.unsafe(nil)); end
+
+ # Create a new ClassVariableWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#201
+ def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new ConstantAndWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#206
+ def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new ConstantOperatorWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#211
+ def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end
+
+ # Create a new ConstantOrWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#216
+ def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new ConstantPathAndWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#221
+ def ConstantPathAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new ConstantPathNode node
+ #
+ # source://prism//lib/prism/dsl.rb#226
+ def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end
+
+ # Create a new ConstantPathOperatorWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#231
+ def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end
+
+ # Create a new ConstantPathOrWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#236
+ def ConstantPathOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new ConstantPathTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#241
+ def ConstantPathTargetNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end
+
+ # Create a new ConstantPathWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#246
+ def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new ConstantReadNode node
+ #
+ # source://prism//lib/prism/dsl.rb#251
+ def ConstantReadNode(name, location = T.unsafe(nil)); end
+
+ # Create a new ConstantTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#256
+ def ConstantTargetNode(name, location = T.unsafe(nil)); end
+
+ # Create a new ConstantWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#261
+ def ConstantWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new DefNode node
+ #
+ # source://prism//lib/prism/dsl.rb#266
+ def DefNode(name, name_loc, receiver, parameters, body, locals, locals_body_index, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new DefinedNode node
+ #
+ # source://prism//lib/prism/dsl.rb#271
+ def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new ElseNode node
+ #
+ # source://prism//lib/prism/dsl.rb#276
+ def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new EmbeddedStatementsNode node
+ #
+ # source://prism//lib/prism/dsl.rb#281
+ def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new EmbeddedVariableNode node
+ #
+ # source://prism//lib/prism/dsl.rb#286
+ def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end
+
+ # Create a new EnsureNode node
+ #
+ # source://prism//lib/prism/dsl.rb#291
+ def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new FalseNode node
+ #
+ # source://prism//lib/prism/dsl.rb#296
+ def FalseNode(location = T.unsafe(nil)); end
+
+ # Create a new FindPatternNode node
+ #
+ # source://prism//lib/prism/dsl.rb#301
+ def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new FlipFlopNode node
+ #
+ # source://prism//lib/prism/dsl.rb#306
+ def FlipFlopNode(flags, left, right, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new FloatNode node
+ #
+ # source://prism//lib/prism/dsl.rb#311
+ def FloatNode(location = T.unsafe(nil)); end
+
+ # Create a new ForNode node
+ #
+ # source://prism//lib/prism/dsl.rb#316
+ def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new ForwardingArgumentsNode node
+ #
+ # source://prism//lib/prism/dsl.rb#321
+ def ForwardingArgumentsNode(location = T.unsafe(nil)); end
+
+ # Create a new ForwardingParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#326
+ def ForwardingParameterNode(location = T.unsafe(nil)); end
+
+ # Create a new ForwardingSuperNode node
+ #
+ # source://prism//lib/prism/dsl.rb#331
+ def ForwardingSuperNode(block, location = T.unsafe(nil)); end
+
+ # Create a new GlobalVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#336
+ def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new GlobalVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#341
+ def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end
+
+ # Create a new GlobalVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#346
+ def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new GlobalVariableReadNode node
+ #
+ # source://prism//lib/prism/dsl.rb#351
+ def GlobalVariableReadNode(name, location = T.unsafe(nil)); end
+
+ # Create a new GlobalVariableTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#356
+ def GlobalVariableTargetNode(name, location = T.unsafe(nil)); end
+
+ # Create a new GlobalVariableWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#361
+ def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new HashNode node
+ #
+ # source://prism//lib/prism/dsl.rb#366
+ def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new HashPatternNode node
+ #
+ # source://prism//lib/prism/dsl.rb#371
+ def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new IfNode node
+ #
+ # source://prism//lib/prism/dsl.rb#376
+ def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new ImaginaryNode node
+ #
+ # source://prism//lib/prism/dsl.rb#381
+ def ImaginaryNode(numeric, location = T.unsafe(nil)); end
+
+ # Create a new ImplicitNode node
+ #
+ # source://prism//lib/prism/dsl.rb#386
+ def ImplicitNode(value, location = T.unsafe(nil)); end
+
+ # Create a new ImplicitRestNode node
+ #
+ # source://prism//lib/prism/dsl.rb#391
+ def ImplicitRestNode(location = T.unsafe(nil)); end
+
+ # Create a new InNode node
+ #
+ # source://prism//lib/prism/dsl.rb#396
+ def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end
+
+ # Create a new IndexAndWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#401
+ def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new IndexOperatorWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#406
+ def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new IndexOrWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#411
+ def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new IndexTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#416
+ def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, location = T.unsafe(nil)); end
+
+ # Create a new InstanceVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#421
+ def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new InstanceVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#426
+ def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end
+
+ # Create a new InstanceVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#431
+ def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new InstanceVariableReadNode node
+ #
+ # source://prism//lib/prism/dsl.rb#436
+ def InstanceVariableReadNode(name, location = T.unsafe(nil)); end
+
+ # Create a new InstanceVariableTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#441
+ def InstanceVariableTargetNode(name, location = T.unsafe(nil)); end
+
+ # Create a new InstanceVariableWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#446
+ def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new IntegerNode node
+ #
+ # source://prism//lib/prism/dsl.rb#451
+ def IntegerNode(flags, location = T.unsafe(nil)); end
+
+ # Create a new InterpolatedMatchLastLineNode node
+ #
+ # source://prism//lib/prism/dsl.rb#456
+ def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new InterpolatedRegularExpressionNode node
+ #
+ # source://prism//lib/prism/dsl.rb#461
+ def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new InterpolatedStringNode node
+ #
+ # source://prism//lib/prism/dsl.rb#466
+ def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new InterpolatedSymbolNode node
+ #
+ # source://prism//lib/prism/dsl.rb#471
+ def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new InterpolatedXStringNode node
+ #
+ # source://prism//lib/prism/dsl.rb#476
+ def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new KeywordHashNode node
+ #
+ # source://prism//lib/prism/dsl.rb#481
+ def KeywordHashNode(flags, elements, location = T.unsafe(nil)); end
+
+ # Create a new KeywordRestParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#486
+ def KeywordRestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new LambdaNode node
+ #
+ # source://prism//lib/prism/dsl.rb#491
+ def LambdaNode(locals, locals_body_index, operator_loc, opening_loc, closing_loc, parameters, body, location = T.unsafe(nil)); end
+
+ # Create a new LocalVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#496
+ def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end
+
+ # Create a new LocalVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#501
+ def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = T.unsafe(nil)); end
+
+ # Create a new LocalVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#506
+ def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end
+
+ # Create a new LocalVariableReadNode node
+ #
+ # source://prism//lib/prism/dsl.rb#511
+ def LocalVariableReadNode(name, depth, location = T.unsafe(nil)); end
+
+ # Create a new LocalVariableTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#516
+ def LocalVariableTargetNode(name, depth, location = T.unsafe(nil)); end
+
+ # Create a new LocalVariableWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#521
+ def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new Location object
+ #
+ # source://prism//lib/prism/dsl.rb#41
+ def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end
+
+ # Create a new MatchLastLineNode node
+ #
+ # source://prism//lib/prism/dsl.rb#526
+ def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end
+
+ # Create a new MatchPredicateNode node
+ #
+ # source://prism//lib/prism/dsl.rb#531
+ def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new MatchRequiredNode node
+ #
+ # source://prism//lib/prism/dsl.rb#536
+ def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new MatchWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#541
+ def MatchWriteNode(call, targets, location = T.unsafe(nil)); end
+
+ # Create a new MissingNode node
+ #
+ # source://prism//lib/prism/dsl.rb#546
+ def MissingNode(location = T.unsafe(nil)); end
+
+ # Create a new ModuleNode node
+ #
+ # source://prism//lib/prism/dsl.rb#551
+ def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = T.unsafe(nil)); end
+
+ # Create a new MultiTargetNode node
+ #
+ # source://prism//lib/prism/dsl.rb#556
+ def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, location = T.unsafe(nil)); end
+
+ # Create a new MultiWriteNode node
+ #
+ # source://prism//lib/prism/dsl.rb#561
+ def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new NextNode node
+ #
+ # source://prism//lib/prism/dsl.rb#566
+ def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new NilNode node
+ #
+ # source://prism//lib/prism/dsl.rb#571
+ def NilNode(location = T.unsafe(nil)); end
+
+ # Create a new NoKeywordsParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#576
+ def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new NumberedParametersNode node
+ #
+ # source://prism//lib/prism/dsl.rb#581
+ def NumberedParametersNode(maximum, location = T.unsafe(nil)); end
+
+ # Create a new NumberedReferenceReadNode node
+ #
+ # source://prism//lib/prism/dsl.rb#586
+ def NumberedReferenceReadNode(number, location = T.unsafe(nil)); end
+
+ # Create a new OptionalKeywordParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#591
+ def OptionalKeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new OptionalParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#596
+ def OptionalParameterNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end
+
+ # Create a new OrNode node
+ #
+ # source://prism//lib/prism/dsl.rb#601
+ def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new ParametersNode node
+ #
+ # source://prism//lib/prism/dsl.rb#606
+ def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = T.unsafe(nil)); end
+
+ # Create a new ParenthesesNode node
+ #
+ # source://prism//lib/prism/dsl.rb#611
+ def ParenthesesNode(body, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new PinnedExpressionNode node
+ #
+ # source://prism//lib/prism/dsl.rb#616
+ def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = T.unsafe(nil)); end
+
+ # Create a new PinnedVariableNode node
+ #
+ # source://prism//lib/prism/dsl.rb#621
+ def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new PostExecutionNode node
+ #
+ # source://prism//lib/prism/dsl.rb#626
+ def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new PreExecutionNode node
+ #
+ # source://prism//lib/prism/dsl.rb#631
+ def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end
+
+ # Create a new ProgramNode node
+ #
+ # source://prism//lib/prism/dsl.rb#636
+ def ProgramNode(locals, statements, location = T.unsafe(nil)); end
+
+ # Create a new RangeNode node
+ #
+ # source://prism//lib/prism/dsl.rb#641
+ def RangeNode(flags, left, right, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new RationalNode node
+ #
+ # source://prism//lib/prism/dsl.rb#646
+ def RationalNode(numeric, location = T.unsafe(nil)); end
+
+ # Create a new RedoNode node
+ #
+ # source://prism//lib/prism/dsl.rb#651
+ def RedoNode(location = T.unsafe(nil)); end
+
+ # Create a new RegularExpressionNode node
+ #
+ # source://prism//lib/prism/dsl.rb#656
+ def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end
+
+ # Create a new RequiredKeywordParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#661
+ def RequiredKeywordParameterNode(name, name_loc, location = T.unsafe(nil)); end
+
+ # Create a new RequiredParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#666
+ def RequiredParameterNode(name, location = T.unsafe(nil)); end
+
+ # Create a new RescueModifierNode node
+ #
+ # source://prism//lib/prism/dsl.rb#671
+ def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end
+
+ # Create a new RescueNode node
+ #
+ # source://prism//lib/prism/dsl.rb#676
+ def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = T.unsafe(nil)); end
+
+ # Create a new RestParameterNode node
+ #
+ # source://prism//lib/prism/dsl.rb#681
+ def RestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end
+
+ # Create a new RetryNode node
+ #
+ # source://prism//lib/prism/dsl.rb#686
+ def RetryNode(location = T.unsafe(nil)); end
+
+ # Create a new ReturnNode node
+ #
+ # source://prism//lib/prism/dsl.rb#691
+ def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end
+
+ # Create a new SelfNode node
+ #
+ # source://prism//lib/prism/dsl.rb#696
+ def SelfNode(location = T.unsafe(nil)); end
+
+ # Create a new SingletonClassNode node
+ #
+ # source://prism//lib/prism/dsl.rb#701
+ def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new SourceEncodingNode node
+ #
+ # source://prism//lib/prism/dsl.rb#706
+ def SourceEncodingNode(location = T.unsafe(nil)); end
+
+ # Create a new SourceFileNode node
+ #
+ # source://prism//lib/prism/dsl.rb#711
+ def SourceFileNode(filepath, location = T.unsafe(nil)); end
+
+ # Create a new SourceLineNode node
+ #
+ # source://prism//lib/prism/dsl.rb#716
+ def SourceLineNode(location = T.unsafe(nil)); end
+
+ # Create a new SplatNode node
+ #
+ # source://prism//lib/prism/dsl.rb#721
+ def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end
+
+ # Create a new StatementsNode node
+ #
+ # source://prism//lib/prism/dsl.rb#726
+ def StatementsNode(body, location = T.unsafe(nil)); end
+
+ # Create a new StringNode node
+ #
+ # source://prism//lib/prism/dsl.rb#731
+ def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end
+
+ # Create a new SuperNode node
+ #
+ # source://prism//lib/prism/dsl.rb#736
+ def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = T.unsafe(nil)); end
+
+ # Create a new SymbolNode node
+ #
+ # source://prism//lib/prism/dsl.rb#741
+ def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, location = T.unsafe(nil)); end
+
+ # Create a new TrueNode node
+ #
+ # source://prism//lib/prism/dsl.rb#746
+ def TrueNode(location = T.unsafe(nil)); end
+
+ # Create a new UndefNode node
+ #
+ # source://prism//lib/prism/dsl.rb#751
+ def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new UnlessNode node
+ #
+ # source://prism//lib/prism/dsl.rb#756
+ def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end
+
+ # Create a new UntilNode node
+ #
+ # source://prism//lib/prism/dsl.rb#761
+ def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, location = T.unsafe(nil)); end
+
+ # Create a new WhenNode node
+ #
+ # source://prism//lib/prism/dsl.rb#766
+ def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end
+
+ # Create a new WhileNode node
+ #
+ # source://prism//lib/prism/dsl.rb#771
+ def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, location = T.unsafe(nil)); end
+
+ # Create a new XStringNode node
+ #
+ # source://prism//lib/prism/dsl.rb#776
+ def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end
+
+ # Create a new YieldNode node
+ #
+ # source://prism//lib/prism/dsl.rb#781
+ def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, location = T.unsafe(nil)); end
+end
+
+# This module is used for testing and debugging and is not meant to be used by
+# consumers of this library.
+#
+# source://prism//lib/prism/debug.rb#6
+module Prism::Debug
+ class << self
+ # :call-seq:
+ # Debug::cruby_locals(source) -> Array
+ #
+ # For the given source, compiles with CRuby and returns a list of all of the
+ # sets of local variables that were encountered.
+ #
+ # source://prism//lib/prism/debug.rb#54
+ def cruby_locals(source); end
+
+ def inspect_node(_arg0); end
+ def memsize(_arg0); end
+ def named_captures(_arg0); end
+
+ # :call-seq:
+ # Debug::newlines(source) -> Array
+ #
+ # For the given source string, return the byte offsets of every newline in
+ # the source.
+ #
+ # source://prism//lib/prism/debug.rb#196
+ def newlines(source); end
+
+ # :call-seq:
+ # Debug::prism_locals(source) -> Array
+ #
+ # For the given source, parses with prism and returns a list of all of the
+ # sets of local variables that were encountered.
+ #
+ # source://prism//lib/prism/debug.rb#98
+ def prism_locals(source); end
+
+ def profile_file(_arg0); end
+ end
+end
+
+# Used to hold the place of a local that will be in the local table but
+# cannot be accessed directly from the source code. For example, the
+# iteration variable in a for loop or the positional parameter on a method
+# definition that is destructured.
+#
+# source://prism//lib/prism/debug.rb#90
+Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object)
+
+# A wrapper around a RubyVM::InstructionSequence that provides a more
+# convenient interface for accessing parts of the iseq.
+#
+# source://prism//lib/prism/debug.rb#9
+class Prism::Debug::ISeq
+ # @return [ISeq] a new instance of ISeq
+ #
+ # source://prism//lib/prism/debug.rb#12
+ def initialize(parts); end
+
+ # source://prism//lib/prism/debug.rb#28
+ def each_child; end
+
+ # source://prism//lib/prism/debug.rb#24
+ def instructions; end
+
+ # source://prism//lib/prism/debug.rb#20
+ def local_table; end
+
+ # source://prism//lib/prism/debug.rb#10
+ def parts; end
+
+ # source://prism//lib/prism/debug.rb#16
+ def type; end
+end
+
+# Represents a method definition.
+#
+# def method
+# end
+# ^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#5237
+class Prism::DefNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], locals_body_index: Integer, def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void
+ #
+ # @return [DefNode] a new instance of DefNode
+ #
+ # source://prism//lib/prism/node.rb#5278
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ receiver: T.nilable(Prism::Node),
+ parameters: T.nilable(Prism::ParametersNode),
+ body: T.nilable(Prism::Node),
+ locals: T::Array[Symbol],
+ locals_body_index: Integer,
+ def_keyword_loc: Prism::Location,
+ operator_loc: T.nilable(Prism::Location),
+ lparen_loc: T.nilable(Prism::Location),
+ rparen_loc: T.nilable(Prism::Location),
+ equal_loc: T.nilable(Prism::Location),
+ end_keyword_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, receiver, parameters, body, locals, locals_body_index, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#5296
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader body: Node?
+ #
+ # source://prism//lib/prism/node.rb#5251
+ sig { returns(T.nilable(Prism::Node)) }
+ def body; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5301
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#5315
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#5306
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> DefNode
+ #
+ # source://prism//lib/prism/node.rb#5320
+ sig { params(params: T.untyped).returns(Prism::DefNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5301
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#5343
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def def_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5348
+ sig { returns(String) }
+ def def_keyword; end
+
+ # attr_reader def_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5260
+ sig { returns(Prism::Location) }
+ def def_keyword_loc; end
+
+ # def end_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#5373
+ sig { returns(T.nilable(String)) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#5275
+ sig { returns(T.nilable(Prism::Location)) }
+ def end_keyword_loc; end
+
+ # def equal: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#5368
+ sig { returns(T.nilable(String)) }
+ def equal; end
+
+ # attr_reader equal_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#5272
+ sig { returns(T.nilable(Prism::Location)) }
+ def equal_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5378
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader locals: Array[Symbol]
+ #
+ # source://prism//lib/prism/node.rb#5254
+ sig { returns(T::Array[Symbol]) }
+ def locals; end
+
+ # attr_reader locals_body_index: Integer
+ #
+ # source://prism//lib/prism/node.rb#5257
+ sig { returns(Integer) }
+ def locals_body_index; end
+
+ # def lparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#5358
+ sig { returns(T.nilable(String)) }
+ def lparen; end
+
+ # attr_reader lparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#5266
+ sig { returns(T.nilable(Prism::Location)) }
+ def lparen_loc; end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#5239
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5242
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#5353
+ sig { returns(T.nilable(String)) }
+ def operator; end
+
+ # attr_reader operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#5263
+ sig { returns(T.nilable(Prism::Location)) }
+ def operator_loc; end
+
+ # attr_reader parameters: ParametersNode?
+ #
+ # source://prism//lib/prism/node.rb#5248
+ sig { returns(T.nilable(Prism::ParametersNode)) }
+ def parameters; end
+
+ # attr_reader receiver: Node?
+ #
+ # source://prism//lib/prism/node.rb#5245
+ sig { returns(T.nilable(Prism::Node)) }
+ def receiver; end
+
+ # def rparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#5363
+ sig { returns(T.nilable(String)) }
+ def rparen; end
+
+ # attr_reader rparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#5269
+ sig { returns(T.nilable(Prism::Location)) }
+ def rparen_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5425
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5435
+ def type; end
+ end
+end
+
+# Represents the use of the `defined?` keyword.
+#
+# defined?(a)
+# ^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#5444
+class Prism::DefinedNode < ::Prism::Node
+ # def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void
+ #
+ # @return [DefinedNode] a new instance of DefinedNode
+ #
+ # source://prism//lib/prism/node.rb#5458
+ sig do
+ params(
+ lparen_loc: T.nilable(Prism::Location),
+ value: Prism::Node,
+ rparen_loc: T.nilable(Prism::Location),
+ keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(lparen_loc, value, rparen_loc, keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#5467
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5472
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#5482
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#5477
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> DefinedNode
+ #
+ # source://prism//lib/prism/node.rb#5487
+ sig { params(params: T.untyped).returns(Prism::DefinedNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5472
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#5501
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5521
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5516
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5455
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # def lparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#5506
+ sig { returns(T.nilable(String)) }
+ def lparen; end
+
+ # attr_reader lparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#5446
+ sig { returns(T.nilable(Prism::Location)) }
+ def lparen_loc; end
+
+ # def rparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#5511
+ sig { returns(T.nilable(String)) }
+ def rparen; end
+
+ # attr_reader rparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#5452
+ sig { returns(T.nilable(Prism::Location)) }
+ def rparen_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5545
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#5449
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5555
+ def type; end
+ end
+end
+
+# DesugarCompiler is a compiler that desugars Ruby code into a more primitive
+# form. This is useful for consumers that want to deal with fewer node types.
+#
+# source://prism//lib/prism/desugar_compiler.rb#6
+class Prism::DesugarCompiler < ::Prism::MutationCompiler
+ # @@foo &&= bar
+ #
+ # becomes
+ #
+ # @@foo && @@foo = bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#12
+ def visit_class_variable_and_write_node(node); end
+
+ # @@foo += bar
+ #
+ # becomes
+ #
+ # @@foo = @@foo + bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#30
+ def visit_class_variable_operator_write_node(node); end
+
+ # @@foo ||= bar
+ #
+ # becomes
+ #
+ # defined?(@@foo) ? @@foo : @@foo = bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#21
+ def visit_class_variable_or_write_node(node); end
+
+ # Foo &&= bar
+ #
+ # becomes
+ #
+ # Foo && Foo = bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#39
+ def visit_constant_and_write_node(node); end
+
+ # Foo += bar
+ #
+ # becomes
+ #
+ # Foo = Foo + bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#57
+ def visit_constant_operator_write_node(node); end
+
+ # Foo ||= bar
+ #
+ # becomes
+ #
+ # defined?(Foo) ? Foo : Foo = bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#48
+ def visit_constant_or_write_node(node); end
+
+ # $foo &&= bar
+ #
+ # becomes
+ #
+ # $foo && $foo = bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#66
+ def visit_global_variable_and_write_node(node); end
+
+ # $foo += bar
+ #
+ # becomes
+ #
+ # $foo = $foo + bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#84
+ def visit_global_variable_operator_write_node(node); end
+
+ # $foo ||= bar
+ #
+ # becomes
+ #
+ # defined?($foo) ? $foo : $foo = bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#75
+ def visit_global_variable_or_write_node(node); end
+
+ # becomes
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#93
+ def visit_instance_variable_and_write_node(node); end
+
+ # becomes
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#111
+ def visit_instance_variable_operator_write_node(node); end
+
+ # becomes
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#102
+ def visit_instance_variable_or_write_node(node); end
+
+ # foo &&= bar
+ #
+ # becomes
+ #
+ # foo && foo = bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#120
+ def visit_local_variable_and_write_node(node); end
+
+ # foo += bar
+ #
+ # becomes
+ #
+ # foo = foo + bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#138
+ def visit_local_variable_operator_write_node(node); end
+
+ # foo ||= bar
+ #
+ # becomes
+ #
+ # foo || foo = bar
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#129
+ def visit_local_variable_or_write_node(node); end
+
+ private
+
+ # Desugar `x &&= y` to `x && x = y`
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#145
+ def desugar_and_write_node(node, read_class, write_class, *arguments); end
+
+ # Desugar `x += y` to `x = x + y`
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#155
+ def desugar_operator_write_node(node, read_class, write_class, *arguments); end
+
+ # Desugar `x ||= y` to `defined?(x) ? x : x = y`
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#187
+ def desugar_or_write_defined_node(node, read_class, write_class, *arguments); end
+
+ # Desugar `x ||= y` to `x || x = y`
+ #
+ # source://prism//lib/prism/desugar_compiler.rb#177
+ def desugar_or_write_node(node, read_class, write_class, *arguments); end
+end
+
+# The dispatcher class fires events for nodes that are found while walking an
+# AST to all registered listeners. It's useful for performing different types
+# of analysis on the AST while only having to walk the tree once.
+#
+# To use the dispatcher, you would first instantiate it and register listeners
+# for the events you're interested in:
+#
+# class OctalListener
+# def on_integer_node_enter(node)
+# if node.octal? && !node.slice.start_with?("0o")
+# warn("Octal integers should be written with the 0o prefix")
+# end
+# end
+# end
+#
+# dispatcher = Dispatcher.new
+# dispatcher.register(listener, :on_integer_node_enter)
+#
+# Then, you can walk any number of trees and dispatch events to the listeners:
+#
+# result = Prism.parse("001 + 002 + 003")
+# dispatcher.dispatch(result.value)
+#
+# Optionally, you can also use `#dispatch_once` to dispatch enter and leave
+# events for a single node without recursing further down the tree. This can
+# be useful in circumstances where you want to reuse the listeners you already
+# have registers but want to stop walking the tree at a certain point.
+#
+# integer = result.value.statements.body.first.receiver.receiver
+# dispatcher.dispatch_once(integer)
+#
+# source://prism//lib/prism/dispatcher.rb#40
+class Prism::Dispatcher < ::Prism::Visitor
+ # Initialize a new dispatcher.
+ #
+ # @return [Dispatcher] a new instance of Dispatcher
+ #
+ # source://prism//lib/prism/dispatcher.rb#45
+ def initialize; end
+
+ # Walks `root` dispatching events to all registered listeners.
+ #
+ # def dispatch: (Node) -> void
+ #
+ # source://prism//lib/prism/visitor.rb#16
+ def dispatch(node); end
+
+ # Dispatches a single event for `node` to all registered listeners.
+ #
+ # def dispatch_once: (Node) -> void
+ #
+ # source://prism//lib/prism/dispatcher.rb#64
+ def dispatch_once(node); end
+
+ # attr_reader listeners: Hash[Symbol, Array[Listener]]
+ #
+ # source://prism//lib/prism/dispatcher.rb#42
+ def listeners; end
+
+ # Register a listener for one or more events.
+ #
+ # def register: (Listener, *Symbol) -> void
+ #
+ # source://prism//lib/prism/dispatcher.rb#52
+ def register(listener, *events); end
+
+ # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#70
+ def visit_alias_global_variable_node(node); end
+
+ # Dispatch enter and leave events for AliasMethodNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#78
+ def visit_alias_method_node(node); end
+
+ # Dispatch enter and leave events for AlternationPatternNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#86
+ def visit_alternation_pattern_node(node); end
+
+ # Dispatch enter and leave events for AndNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#94
+ def visit_and_node(node); end
+
+ # Dispatch enter and leave events for ArgumentsNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#102
+ def visit_arguments_node(node); end
+
+ # Dispatch enter and leave events for ArrayNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#110
+ def visit_array_node(node); end
+
+ # Dispatch enter and leave events for ArrayPatternNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#118
+ def visit_array_pattern_node(node); end
+
+ # Dispatch enter and leave events for AssocNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#126
+ def visit_assoc_node(node); end
+
+ # Dispatch enter and leave events for AssocSplatNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#134
+ def visit_assoc_splat_node(node); end
+
+ # Dispatch enter and leave events for BackReferenceReadNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#142
+ def visit_back_reference_read_node(node); end
+
+ # Dispatch enter and leave events for BeginNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#150
+ def visit_begin_node(node); end
+
+ # Dispatch enter and leave events for BlockArgumentNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#158
+ def visit_block_argument_node(node); end
+
+ # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#166
+ def visit_block_local_variable_node(node); end
+
+ # Dispatch enter and leave events for BlockNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#174
+ def visit_block_node(node); end
+
+ # Dispatch enter and leave events for BlockParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#182
+ def visit_block_parameter_node(node); end
+
+ # Dispatch enter and leave events for BlockParametersNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#190
+ def visit_block_parameters_node(node); end
+
+ # Dispatch enter and leave events for BreakNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#198
+ def visit_break_node(node); end
+
+ # Dispatch enter and leave events for CallAndWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#206
+ def visit_call_and_write_node(node); end
+
+ # Dispatch enter and leave events for CallNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#214
+ def visit_call_node(node); end
+
+ # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#222
+ def visit_call_operator_write_node(node); end
+
+ # Dispatch enter and leave events for CallOrWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#230
+ def visit_call_or_write_node(node); end
+
+ # Dispatch enter and leave events for CallTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#238
+ def visit_call_target_node(node); end
+
+ # Dispatch enter and leave events for CapturePatternNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#246
+ def visit_capture_pattern_node(node); end
+
+ # Dispatch enter and leave events for CaseMatchNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#254
+ def visit_case_match_node(node); end
+
+ # Dispatch enter and leave events for CaseNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#262
+ def visit_case_node(node); end
+
+ # Dispatch enter and leave events for ClassNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#270
+ def visit_class_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#278
+ def visit_class_variable_and_write_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#286
+ def visit_class_variable_operator_write_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#294
+ def visit_class_variable_or_write_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableReadNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#302
+ def visit_class_variable_read_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#310
+ def visit_class_variable_target_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#318
+ def visit_class_variable_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#326
+ def visit_constant_and_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#334
+ def visit_constant_operator_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#342
+ def visit_constant_or_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#350
+ def visit_constant_path_and_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#358
+ def visit_constant_path_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#366
+ def visit_constant_path_operator_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#374
+ def visit_constant_path_or_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#382
+ def visit_constant_path_target_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#390
+ def visit_constant_path_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantReadNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#398
+ def visit_constant_read_node(node); end
+
+ # Dispatch enter and leave events for ConstantTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#406
+ def visit_constant_target_node(node); end
+
+ # Dispatch enter and leave events for ConstantWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#414
+ def visit_constant_write_node(node); end
+
+ # Dispatch enter and leave events for DefNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#422
+ def visit_def_node(node); end
+
+ # Dispatch enter and leave events for DefinedNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#430
+ def visit_defined_node(node); end
+
+ # Dispatch enter and leave events for ElseNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#438
+ def visit_else_node(node); end
+
+ # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#446
+ def visit_embedded_statements_node(node); end
+
+ # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#454
+ def visit_embedded_variable_node(node); end
+
+ # Dispatch enter and leave events for EnsureNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#462
+ def visit_ensure_node(node); end
+
+ # Dispatch enter and leave events for FalseNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#470
+ def visit_false_node(node); end
+
+ # Dispatch enter and leave events for FindPatternNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#478
+ def visit_find_pattern_node(node); end
+
+ # Dispatch enter and leave events for FlipFlopNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#486
+ def visit_flip_flop_node(node); end
+
+ # Dispatch enter and leave events for FloatNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#494
+ def visit_float_node(node); end
+
+ # Dispatch enter and leave events for ForNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#502
+ def visit_for_node(node); end
+
+ # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#510
+ def visit_forwarding_arguments_node(node); end
+
+ # Dispatch enter and leave events for ForwardingParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#518
+ def visit_forwarding_parameter_node(node); end
+
+ # Dispatch enter and leave events for ForwardingSuperNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#526
+ def visit_forwarding_super_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#534
+ def visit_global_variable_and_write_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#542
+ def visit_global_variable_operator_write_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#550
+ def visit_global_variable_or_write_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#558
+ def visit_global_variable_read_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#566
+ def visit_global_variable_target_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#574
+ def visit_global_variable_write_node(node); end
+
+ # Dispatch enter and leave events for HashNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#582
+ def visit_hash_node(node); end
+
+ # Dispatch enter and leave events for HashPatternNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#590
+ def visit_hash_pattern_node(node); end
+
+ # Dispatch enter and leave events for IfNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#598
+ def visit_if_node(node); end
+
+ # Dispatch enter and leave events for ImaginaryNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#606
+ def visit_imaginary_node(node); end
+
+ # Dispatch enter and leave events for ImplicitNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#614
+ def visit_implicit_node(node); end
+
+ # Dispatch enter and leave events for ImplicitRestNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#622
+ def visit_implicit_rest_node(node); end
+
+ # Dispatch enter and leave events for InNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#630
+ def visit_in_node(node); end
+
+ # Dispatch enter and leave events for IndexAndWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#638
+ def visit_index_and_write_node(node); end
+
+ # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#646
+ def visit_index_operator_write_node(node); end
+
+ # Dispatch enter and leave events for IndexOrWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#654
+ def visit_index_or_write_node(node); end
+
+ # Dispatch enter and leave events for IndexTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#662
+ def visit_index_target_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#670
+ def visit_instance_variable_and_write_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#678
+ def visit_instance_variable_operator_write_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#686
+ def visit_instance_variable_or_write_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#694
+ def visit_instance_variable_read_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#702
+ def visit_instance_variable_target_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#710
+ def visit_instance_variable_write_node(node); end
+
+ # Dispatch enter and leave events for IntegerNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#718
+ def visit_integer_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#726
+ def visit_interpolated_match_last_line_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#734
+ def visit_interpolated_regular_expression_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedStringNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#742
+ def visit_interpolated_string_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#750
+ def visit_interpolated_symbol_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#758
+ def visit_interpolated_x_string_node(node); end
+
+ # Dispatch enter and leave events for KeywordHashNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#766
+ def visit_keyword_hash_node(node); end
+
+ # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#774
+ def visit_keyword_rest_parameter_node(node); end
+
+ # Dispatch enter and leave events for LambdaNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#782
+ def visit_lambda_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#790
+ def visit_local_variable_and_write_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#798
+ def visit_local_variable_operator_write_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#806
+ def visit_local_variable_or_write_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableReadNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#814
+ def visit_local_variable_read_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#822
+ def visit_local_variable_target_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#830
+ def visit_local_variable_write_node(node); end
+
+ # Dispatch enter and leave events for MatchLastLineNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#838
+ def visit_match_last_line_node(node); end
+
+ # Dispatch enter and leave events for MatchPredicateNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#846
+ def visit_match_predicate_node(node); end
+
+ # Dispatch enter and leave events for MatchRequiredNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#854
+ def visit_match_required_node(node); end
+
+ # Dispatch enter and leave events for MatchWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#862
+ def visit_match_write_node(node); end
+
+ # Dispatch enter and leave events for MissingNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#870
+ def visit_missing_node(node); end
+
+ # Dispatch enter and leave events for ModuleNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#878
+ def visit_module_node(node); end
+
+ # Dispatch enter and leave events for MultiTargetNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#886
+ def visit_multi_target_node(node); end
+
+ # Dispatch enter and leave events for MultiWriteNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#894
+ def visit_multi_write_node(node); end
+
+ # Dispatch enter and leave events for NextNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#902
+ def visit_next_node(node); end
+
+ # Dispatch enter and leave events for NilNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#910
+ def visit_nil_node(node); end
+
+ # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#918
+ def visit_no_keywords_parameter_node(node); end
+
+ # Dispatch enter and leave events for NumberedParametersNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#926
+ def visit_numbered_parameters_node(node); end
+
+ # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#934
+ def visit_numbered_reference_read_node(node); end
+
+ # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#942
+ def visit_optional_keyword_parameter_node(node); end
+
+ # Dispatch enter and leave events for OptionalParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#950
+ def visit_optional_parameter_node(node); end
+
+ # Dispatch enter and leave events for OrNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#958
+ def visit_or_node(node); end
+
+ # Dispatch enter and leave events for ParametersNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#966
+ def visit_parameters_node(node); end
+
+ # Dispatch enter and leave events for ParenthesesNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#974
+ def visit_parentheses_node(node); end
+
+ # Dispatch enter and leave events for PinnedExpressionNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#982
+ def visit_pinned_expression_node(node); end
+
+ # Dispatch enter and leave events for PinnedVariableNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#990
+ def visit_pinned_variable_node(node); end
+
+ # Dispatch enter and leave events for PostExecutionNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#998
+ def visit_post_execution_node(node); end
+
+ # Dispatch enter and leave events for PreExecutionNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1006
+ def visit_pre_execution_node(node); end
+
+ # Dispatch enter and leave events for ProgramNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1014
+ def visit_program_node(node); end
+
+ # Dispatch enter and leave events for RangeNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1022
+ def visit_range_node(node); end
+
+ # Dispatch enter and leave events for RationalNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1030
+ def visit_rational_node(node); end
+
+ # Dispatch enter and leave events for RedoNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1038
+ def visit_redo_node(node); end
+
+ # Dispatch enter and leave events for RegularExpressionNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1046
+ def visit_regular_expression_node(node); end
+
+ # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1054
+ def visit_required_keyword_parameter_node(node); end
+
+ # Dispatch enter and leave events for RequiredParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1062
+ def visit_required_parameter_node(node); end
+
+ # Dispatch enter and leave events for RescueModifierNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1070
+ def visit_rescue_modifier_node(node); end
+
+ # Dispatch enter and leave events for RescueNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1078
+ def visit_rescue_node(node); end
+
+ # Dispatch enter and leave events for RestParameterNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1086
+ def visit_rest_parameter_node(node); end
+
+ # Dispatch enter and leave events for RetryNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1094
+ def visit_retry_node(node); end
+
+ # Dispatch enter and leave events for ReturnNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1102
+ def visit_return_node(node); end
+
+ # Dispatch enter and leave events for SelfNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1110
+ def visit_self_node(node); end
+
+ # Dispatch enter and leave events for SingletonClassNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1118
+ def visit_singleton_class_node(node); end
+
+ # Dispatch enter and leave events for SourceEncodingNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1126
+ def visit_source_encoding_node(node); end
+
+ # Dispatch enter and leave events for SourceFileNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1134
+ def visit_source_file_node(node); end
+
+ # Dispatch enter and leave events for SourceLineNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1142
+ def visit_source_line_node(node); end
+
+ # Dispatch enter and leave events for SplatNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1150
+ def visit_splat_node(node); end
+
+ # Dispatch enter and leave events for StatementsNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1158
+ def visit_statements_node(node); end
+
+ # Dispatch enter and leave events for StringNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1166
+ def visit_string_node(node); end
+
+ # Dispatch enter and leave events for SuperNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1174
+ def visit_super_node(node); end
+
+ # Dispatch enter and leave events for SymbolNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1182
+ def visit_symbol_node(node); end
+
+ # Dispatch enter and leave events for TrueNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1190
+ def visit_true_node(node); end
+
+ # Dispatch enter and leave events for UndefNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1198
+ def visit_undef_node(node); end
+
+ # Dispatch enter and leave events for UnlessNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1206
+ def visit_unless_node(node); end
+
+ # Dispatch enter and leave events for UntilNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1214
+ def visit_until_node(node); end
+
+ # Dispatch enter and leave events for WhenNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1222
+ def visit_when_node(node); end
+
+ # Dispatch enter and leave events for WhileNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1230
+ def visit_while_node(node); end
+
+ # Dispatch enter and leave events for XStringNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1238
+ def visit_x_string_node(node); end
+
+ # Dispatch enter and leave events for YieldNode nodes and continue
+ # walking the tree.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1246
+ def visit_yield_node(node); end
+end
+
+# source://prism//lib/prism/dispatcher.rb#1252
+class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor
+ # @return [DispatchOnce] a new instance of DispatchOnce
+ #
+ # source://prism//lib/prism/dispatcher.rb#1255
+ def initialize(listeners); end
+
+ # Returns the value of attribute listeners.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1253
+ def listeners; end
+
+ # Dispatch enter and leave events for AliasGlobalVariableNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1260
+ def visit_alias_global_variable_node(node); end
+
+ # Dispatch enter and leave events for AliasMethodNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1266
+ def visit_alias_method_node(node); end
+
+ # Dispatch enter and leave events for AlternationPatternNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1272
+ def visit_alternation_pattern_node(node); end
+
+ # Dispatch enter and leave events for AndNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1278
+ def visit_and_node(node); end
+
+ # Dispatch enter and leave events for ArgumentsNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1284
+ def visit_arguments_node(node); end
+
+ # Dispatch enter and leave events for ArrayNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1290
+ def visit_array_node(node); end
+
+ # Dispatch enter and leave events for ArrayPatternNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1296
+ def visit_array_pattern_node(node); end
+
+ # Dispatch enter and leave events for AssocNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1302
+ def visit_assoc_node(node); end
+
+ # Dispatch enter and leave events for AssocSplatNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1308
+ def visit_assoc_splat_node(node); end
+
+ # Dispatch enter and leave events for BackReferenceReadNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1314
+ def visit_back_reference_read_node(node); end
+
+ # Dispatch enter and leave events for BeginNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1320
+ def visit_begin_node(node); end
+
+ # Dispatch enter and leave events for BlockArgumentNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1326
+ def visit_block_argument_node(node); end
+
+ # Dispatch enter and leave events for BlockLocalVariableNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1332
+ def visit_block_local_variable_node(node); end
+
+ # Dispatch enter and leave events for BlockNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1338
+ def visit_block_node(node); end
+
+ # Dispatch enter and leave events for BlockParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1344
+ def visit_block_parameter_node(node); end
+
+ # Dispatch enter and leave events for BlockParametersNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1350
+ def visit_block_parameters_node(node); end
+
+ # Dispatch enter and leave events for BreakNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1356
+ def visit_break_node(node); end
+
+ # Dispatch enter and leave events for CallAndWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1362
+ def visit_call_and_write_node(node); end
+
+ # Dispatch enter and leave events for CallNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1368
+ def visit_call_node(node); end
+
+ # Dispatch enter and leave events for CallOperatorWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1374
+ def visit_call_operator_write_node(node); end
+
+ # Dispatch enter and leave events for CallOrWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1380
+ def visit_call_or_write_node(node); end
+
+ # Dispatch enter and leave events for CallTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1386
+ def visit_call_target_node(node); end
+
+ # Dispatch enter and leave events for CapturePatternNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1392
+ def visit_capture_pattern_node(node); end
+
+ # Dispatch enter and leave events for CaseMatchNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1398
+ def visit_case_match_node(node); end
+
+ # Dispatch enter and leave events for CaseNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1404
+ def visit_case_node(node); end
+
+ # Dispatch enter and leave events for ClassNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1410
+ def visit_class_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableAndWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1416
+ def visit_class_variable_and_write_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1422
+ def visit_class_variable_operator_write_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableOrWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1428
+ def visit_class_variable_or_write_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableReadNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1434
+ def visit_class_variable_read_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1440
+ def visit_class_variable_target_node(node); end
+
+ # Dispatch enter and leave events for ClassVariableWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1446
+ def visit_class_variable_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantAndWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1452
+ def visit_constant_and_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantOperatorWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1458
+ def visit_constant_operator_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantOrWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1464
+ def visit_constant_or_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathAndWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1470
+ def visit_constant_path_and_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1476
+ def visit_constant_path_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1482
+ def visit_constant_path_operator_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathOrWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1488
+ def visit_constant_path_or_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1494
+ def visit_constant_path_target_node(node); end
+
+ # Dispatch enter and leave events for ConstantPathWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1500
+ def visit_constant_path_write_node(node); end
+
+ # Dispatch enter and leave events for ConstantReadNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1506
+ def visit_constant_read_node(node); end
+
+ # Dispatch enter and leave events for ConstantTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1512
+ def visit_constant_target_node(node); end
+
+ # Dispatch enter and leave events for ConstantWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1518
+ def visit_constant_write_node(node); end
+
+ # Dispatch enter and leave events for DefNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1524
+ def visit_def_node(node); end
+
+ # Dispatch enter and leave events for DefinedNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1530
+ def visit_defined_node(node); end
+
+ # Dispatch enter and leave events for ElseNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1536
+ def visit_else_node(node); end
+
+ # Dispatch enter and leave events for EmbeddedStatementsNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1542
+ def visit_embedded_statements_node(node); end
+
+ # Dispatch enter and leave events for EmbeddedVariableNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1548
+ def visit_embedded_variable_node(node); end
+
+ # Dispatch enter and leave events for EnsureNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1554
+ def visit_ensure_node(node); end
+
+ # Dispatch enter and leave events for FalseNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1560
+ def visit_false_node(node); end
+
+ # Dispatch enter and leave events for FindPatternNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1566
+ def visit_find_pattern_node(node); end
+
+ # Dispatch enter and leave events for FlipFlopNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1572
+ def visit_flip_flop_node(node); end
+
+ # Dispatch enter and leave events for FloatNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1578
+ def visit_float_node(node); end
+
+ # Dispatch enter and leave events for ForNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1584
+ def visit_for_node(node); end
+
+ # Dispatch enter and leave events for ForwardingArgumentsNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1590
+ def visit_forwarding_arguments_node(node); end
+
+ # Dispatch enter and leave events for ForwardingParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1596
+ def visit_forwarding_parameter_node(node); end
+
+ # Dispatch enter and leave events for ForwardingSuperNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1602
+ def visit_forwarding_super_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1608
+ def visit_global_variable_and_write_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1614
+ def visit_global_variable_operator_write_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1620
+ def visit_global_variable_or_write_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableReadNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1626
+ def visit_global_variable_read_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1632
+ def visit_global_variable_target_node(node); end
+
+ # Dispatch enter and leave events for GlobalVariableWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1638
+ def visit_global_variable_write_node(node); end
+
+ # Dispatch enter and leave events for HashNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1644
+ def visit_hash_node(node); end
+
+ # Dispatch enter and leave events for HashPatternNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1650
+ def visit_hash_pattern_node(node); end
+
+ # Dispatch enter and leave events for IfNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1656
+ def visit_if_node(node); end
+
+ # Dispatch enter and leave events for ImaginaryNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1662
+ def visit_imaginary_node(node); end
+
+ # Dispatch enter and leave events for ImplicitNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1668
+ def visit_implicit_node(node); end
+
+ # Dispatch enter and leave events for ImplicitRestNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1674
+ def visit_implicit_rest_node(node); end
+
+ # Dispatch enter and leave events for InNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1680
+ def visit_in_node(node); end
+
+ # Dispatch enter and leave events for IndexAndWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1686
+ def visit_index_and_write_node(node); end
+
+ # Dispatch enter and leave events for IndexOperatorWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1692
+ def visit_index_operator_write_node(node); end
+
+ # Dispatch enter and leave events for IndexOrWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1698
+ def visit_index_or_write_node(node); end
+
+ # Dispatch enter and leave events for IndexTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1704
+ def visit_index_target_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1710
+ def visit_instance_variable_and_write_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1716
+ def visit_instance_variable_operator_write_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1722
+ def visit_instance_variable_or_write_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableReadNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1728
+ def visit_instance_variable_read_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1734
+ def visit_instance_variable_target_node(node); end
+
+ # Dispatch enter and leave events for InstanceVariableWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1740
+ def visit_instance_variable_write_node(node); end
+
+ # Dispatch enter and leave events for IntegerNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1746
+ def visit_integer_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1752
+ def visit_interpolated_match_last_line_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1758
+ def visit_interpolated_regular_expression_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedStringNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1764
+ def visit_interpolated_string_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedSymbolNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1770
+ def visit_interpolated_symbol_node(node); end
+
+ # Dispatch enter and leave events for InterpolatedXStringNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1776
+ def visit_interpolated_x_string_node(node); end
+
+ # Dispatch enter and leave events for KeywordHashNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1782
+ def visit_keyword_hash_node(node); end
+
+ # Dispatch enter and leave events for KeywordRestParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1788
+ def visit_keyword_rest_parameter_node(node); end
+
+ # Dispatch enter and leave events for LambdaNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1794
+ def visit_lambda_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableAndWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1800
+ def visit_local_variable_and_write_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1806
+ def visit_local_variable_operator_write_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableOrWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1812
+ def visit_local_variable_or_write_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableReadNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1818
+ def visit_local_variable_read_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1824
+ def visit_local_variable_target_node(node); end
+
+ # Dispatch enter and leave events for LocalVariableWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1830
+ def visit_local_variable_write_node(node); end
+
+ # Dispatch enter and leave events for MatchLastLineNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1836
+ def visit_match_last_line_node(node); end
+
+ # Dispatch enter and leave events for MatchPredicateNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1842
+ def visit_match_predicate_node(node); end
+
+ # Dispatch enter and leave events for MatchRequiredNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1848
+ def visit_match_required_node(node); end
+
+ # Dispatch enter and leave events for MatchWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1854
+ def visit_match_write_node(node); end
+
+ # Dispatch enter and leave events for MissingNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1860
+ def visit_missing_node(node); end
+
+ # Dispatch enter and leave events for ModuleNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1866
+ def visit_module_node(node); end
+
+ # Dispatch enter and leave events for MultiTargetNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1872
+ def visit_multi_target_node(node); end
+
+ # Dispatch enter and leave events for MultiWriteNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1878
+ def visit_multi_write_node(node); end
+
+ # Dispatch enter and leave events for NextNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1884
+ def visit_next_node(node); end
+
+ # Dispatch enter and leave events for NilNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1890
+ def visit_nil_node(node); end
+
+ # Dispatch enter and leave events for NoKeywordsParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1896
+ def visit_no_keywords_parameter_node(node); end
+
+ # Dispatch enter and leave events for NumberedParametersNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1902
+ def visit_numbered_parameters_node(node); end
+
+ # Dispatch enter and leave events for NumberedReferenceReadNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1908
+ def visit_numbered_reference_read_node(node); end
+
+ # Dispatch enter and leave events for OptionalKeywordParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1914
+ def visit_optional_keyword_parameter_node(node); end
+
+ # Dispatch enter and leave events for OptionalParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1920
+ def visit_optional_parameter_node(node); end
+
+ # Dispatch enter and leave events for OrNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1926
+ def visit_or_node(node); end
+
+ # Dispatch enter and leave events for ParametersNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1932
+ def visit_parameters_node(node); end
+
+ # Dispatch enter and leave events for ParenthesesNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1938
+ def visit_parentheses_node(node); end
+
+ # Dispatch enter and leave events for PinnedExpressionNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1944
+ def visit_pinned_expression_node(node); end
+
+ # Dispatch enter and leave events for PinnedVariableNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1950
+ def visit_pinned_variable_node(node); end
+
+ # Dispatch enter and leave events for PostExecutionNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1956
+ def visit_post_execution_node(node); end
+
+ # Dispatch enter and leave events for PreExecutionNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1962
+ def visit_pre_execution_node(node); end
+
+ # Dispatch enter and leave events for ProgramNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1968
+ def visit_program_node(node); end
+
+ # Dispatch enter and leave events for RangeNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1974
+ def visit_range_node(node); end
+
+ # Dispatch enter and leave events for RationalNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1980
+ def visit_rational_node(node); end
+
+ # Dispatch enter and leave events for RedoNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1986
+ def visit_redo_node(node); end
+
+ # Dispatch enter and leave events for RegularExpressionNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1992
+ def visit_regular_expression_node(node); end
+
+ # Dispatch enter and leave events for RequiredKeywordParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#1998
+ def visit_required_keyword_parameter_node(node); end
+
+ # Dispatch enter and leave events for RequiredParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2004
+ def visit_required_parameter_node(node); end
+
+ # Dispatch enter and leave events for RescueModifierNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2010
+ def visit_rescue_modifier_node(node); end
+
+ # Dispatch enter and leave events for RescueNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2016
+ def visit_rescue_node(node); end
+
+ # Dispatch enter and leave events for RestParameterNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2022
+ def visit_rest_parameter_node(node); end
+
+ # Dispatch enter and leave events for RetryNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2028
+ def visit_retry_node(node); end
+
+ # Dispatch enter and leave events for ReturnNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2034
+ def visit_return_node(node); end
+
+ # Dispatch enter and leave events for SelfNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2040
+ def visit_self_node(node); end
+
+ # Dispatch enter and leave events for SingletonClassNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2046
+ def visit_singleton_class_node(node); end
+
+ # Dispatch enter and leave events for SourceEncodingNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2052
+ def visit_source_encoding_node(node); end
+
+ # Dispatch enter and leave events for SourceFileNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2058
+ def visit_source_file_node(node); end
+
+ # Dispatch enter and leave events for SourceLineNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2064
+ def visit_source_line_node(node); end
+
+ # Dispatch enter and leave events for SplatNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2070
+ def visit_splat_node(node); end
+
+ # Dispatch enter and leave events for StatementsNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2076
+ def visit_statements_node(node); end
+
+ # Dispatch enter and leave events for StringNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2082
+ def visit_string_node(node); end
+
+ # Dispatch enter and leave events for SuperNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2088
+ def visit_super_node(node); end
+
+ # Dispatch enter and leave events for SymbolNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2094
+ def visit_symbol_node(node); end
+
+ # Dispatch enter and leave events for TrueNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2100
+ def visit_true_node(node); end
+
+ # Dispatch enter and leave events for UndefNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2106
+ def visit_undef_node(node); end
+
+ # Dispatch enter and leave events for UnlessNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2112
+ def visit_unless_node(node); end
+
+ # Dispatch enter and leave events for UntilNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2118
+ def visit_until_node(node); end
+
+ # Dispatch enter and leave events for WhenNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2124
+ def visit_when_node(node); end
+
+ # Dispatch enter and leave events for WhileNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2130
+ def visit_while_node(node); end
+
+ # Dispatch enter and leave events for XStringNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2136
+ def visit_x_string_node(node); end
+
+ # Dispatch enter and leave events for YieldNode nodes.
+ #
+ # source://prism//lib/prism/dispatcher.rb#2142
+ def visit_yield_node(node); end
+end
+
+# This visitor provides the ability to call Node#to_dot, which converts a
+# subtree into a graphviz dot graph.
+#
+# source://prism//lib/prism/dot_visitor.rb#13
+class Prism::DotVisitor < ::Prism::Visitor
+ # Initialize a new dot visitor.
+ #
+ # @return [DotVisitor] a new instance of DotVisitor
+ #
+ # source://prism//lib/prism/dot_visitor.rb#105
+ def initialize; end
+
+ # The digraph that is being built.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#102
+ def digraph; end
+
+ # Convert this visitor into a graphviz dot graph string.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#110
+ def to_dot; end
+
+ # Visit a AliasGlobalVariableNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#115
+ def visit_alias_global_variable_node(node); end
+
+ # Visit a AliasMethodNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#140
+ def visit_alias_method_node(node); end
+
+ # Visit a AlternationPatternNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#165
+ def visit_alternation_pattern_node(node); end
+
+ # Visit a AndNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#190
+ def visit_and_node(node); end
+
+ # Visit a ArgumentsNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#215
+ def visit_arguments_node(node); end
+
+ # Visit a ArrayNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#245
+ def visit_array_node(node); end
+
+ # Visit a ArrayPatternNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#285
+ def visit_array_pattern_node(node); end
+
+ # Visit a AssocNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#347
+ def visit_assoc_node(node); end
+
+ # Visit a AssocSplatNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#376
+ def visit_assoc_splat_node(node); end
+
+ # Visit a BackReferenceReadNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#399
+ def visit_back_reference_read_node(node); end
+
+ # Visit a BeginNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#416
+ def visit_begin_node(node); end
+
+ # Visit a BlockArgumentNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#464
+ def visit_block_argument_node(node); end
+
+ # Visit a BlockLocalVariableNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#487
+ def visit_block_local_variable_node(node); end
+
+ # Visit a BlockNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#504
+ def visit_block_node(node); end
+
+ # Visit a BlockParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#542
+ def visit_block_parameter_node(node); end
+
+ # Visit a BlockParametersNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#567
+ def visit_block_parameters_node(node); end
+
+ # Visit a BreakNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#610
+ def visit_break_node(node); end
+
+ # Visit a CallAndWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#633
+ def visit_call_and_write_node(node); end
+
+ # Visit a CallNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#679
+ def visit_call_node(node); end
+
+ # Visit a CallOperatorWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#737
+ def visit_call_operator_write_node(node); end
+
+ # Visit a CallOrWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#786
+ def visit_call_or_write_node(node); end
+
+ # Visit a CallTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#832
+ def visit_call_target_node(node); end
+
+ # Visit a CapturePatternNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#862
+ def visit_capture_pattern_node(node); end
+
+ # Visit a CaseMatchNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#887
+ def visit_case_match_node(node); end
+
+ # Visit a CaseNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#932
+ def visit_case_node(node); end
+
+ # Visit a ClassNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#977
+ def visit_class_node(node); end
+
+ # Visit a ClassVariableAndWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1024
+ def visit_class_variable_and_write_node(node); end
+
+ # Visit a ClassVariableOperatorWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1051
+ def visit_class_variable_operator_write_node(node); end
+
+ # Visit a ClassVariableOrWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1081
+ def visit_class_variable_or_write_node(node); end
+
+ # Visit a ClassVariableReadNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1108
+ def visit_class_variable_read_node(node); end
+
+ # Visit a ClassVariableTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1125
+ def visit_class_variable_target_node(node); end
+
+ # Visit a ClassVariableWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1142
+ def visit_class_variable_write_node(node); end
+
+ # Visit a ConstantAndWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1171
+ def visit_constant_and_write_node(node); end
+
+ # Visit a ConstantOperatorWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1198
+ def visit_constant_operator_write_node(node); end
+
+ # Visit a ConstantOrWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1228
+ def visit_constant_or_write_node(node); end
+
+ # Visit a ConstantPathAndWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1255
+ def visit_constant_path_and_write_node(node); end
+
+ # Visit a ConstantPathNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1280
+ def visit_constant_path_node(node); end
+
+ # Visit a ConstantPathOperatorWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1307
+ def visit_constant_path_operator_write_node(node); end
+
+ # Visit a ConstantPathOrWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1335
+ def visit_constant_path_or_write_node(node); end
+
+ # Visit a ConstantPathTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1360
+ def visit_constant_path_target_node(node); end
+
+ # Visit a ConstantPathWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1387
+ def visit_constant_path_write_node(node); end
+
+ # Visit a ConstantReadNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1412
+ def visit_constant_read_node(node); end
+
+ # Visit a ConstantTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1429
+ def visit_constant_target_node(node); end
+
+ # Visit a ConstantWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1446
+ def visit_constant_write_node(node); end
+
+ # Visit a DefNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1473
+ def visit_def_node(node); end
+
+ # Visit a DefinedNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1545
+ def visit_defined_node(node); end
+
+ # Visit a ElseNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1576
+ def visit_else_node(node); end
+
+ # Visit a EmbeddedStatementsNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1604
+ def visit_embedded_statements_node(node); end
+
+ # Visit a EmbeddedVariableNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1630
+ def visit_embedded_variable_node(node); end
+
+ # Visit a EnsureNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1651
+ def visit_ensure_node(node); end
+
+ # Visit a FalseNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1677
+ def visit_false_node(node); end
+
+ # Visit a FindPatternNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1691
+ def visit_find_pattern_node(node); end
+
+ # Visit a FlipFlopNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1742
+ def visit_flip_flop_node(node); end
+
+ # Visit a FloatNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1774
+ def visit_float_node(node); end
+
+ # Visit a ForNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1788
+ def visit_for_node(node); end
+
+ # Visit a ForwardingArgumentsNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1830
+ def visit_forwarding_arguments_node(node); end
+
+ # Visit a ForwardingParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1844
+ def visit_forwarding_parameter_node(node); end
+
+ # Visit a ForwardingSuperNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1858
+ def visit_forwarding_super_node(node); end
+
+ # Visit a GlobalVariableAndWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1878
+ def visit_global_variable_and_write_node(node); end
+
+ # Visit a GlobalVariableOperatorWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1905
+ def visit_global_variable_operator_write_node(node); end
+
+ # Visit a GlobalVariableOrWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1935
+ def visit_global_variable_or_write_node(node); end
+
+ # Visit a GlobalVariableReadNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1962
+ def visit_global_variable_read_node(node); end
+
+ # Visit a GlobalVariableTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1979
+ def visit_global_variable_target_node(node); end
+
+ # Visit a GlobalVariableWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#1996
+ def visit_global_variable_write_node(node); end
+
+ # Visit a HashNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2023
+ def visit_hash_node(node); end
+
+ # Visit a HashPatternNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2056
+ def visit_hash_pattern_node(node); end
+
+ # Visit a IfNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2105
+ def visit_if_node(node); end
+
+ # Visit a ImaginaryNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2150
+ def visit_imaginary_node(node); end
+
+ # Visit a ImplicitNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2168
+ def visit_implicit_node(node); end
+
+ # Visit a ImplicitRestNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2186
+ def visit_implicit_rest_node(node); end
+
+ # Visit a InNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2200
+ def visit_in_node(node); end
+
+ # Visit a IndexAndWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2232
+ def visit_index_and_write_node(node); end
+
+ # Visit a IndexOperatorWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2285
+ def visit_index_operator_write_node(node); end
+
+ # Visit a IndexOrWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2341
+ def visit_index_or_write_node(node); end
+
+ # Visit a IndexTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2394
+ def visit_index_target_node(node); end
+
+ # Visit a InstanceVariableAndWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2433
+ def visit_instance_variable_and_write_node(node); end
+
+ # Visit a InstanceVariableOperatorWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2460
+ def visit_instance_variable_operator_write_node(node); end
+
+ # Visit a InstanceVariableOrWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2490
+ def visit_instance_variable_or_write_node(node); end
+
+ # Visit a InstanceVariableReadNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2517
+ def visit_instance_variable_read_node(node); end
+
+ # Visit a InstanceVariableTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2534
+ def visit_instance_variable_target_node(node); end
+
+ # Visit a InstanceVariableWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2551
+ def visit_instance_variable_write_node(node); end
+
+ # Visit a IntegerNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2578
+ def visit_integer_node(node); end
+
+ # Visit a InterpolatedMatchLastLineNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2595
+ def visit_interpolated_match_last_line_node(node); end
+
+ # Visit a InterpolatedRegularExpressionNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2631
+ def visit_interpolated_regular_expression_node(node); end
+
+ # Visit a InterpolatedStringNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2667
+ def visit_interpolated_string_node(node); end
+
+ # Visit a InterpolatedSymbolNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2704
+ def visit_interpolated_symbol_node(node); end
+
+ # Visit a InterpolatedXStringNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2741
+ def visit_interpolated_x_string_node(node); end
+
+ # Visit a KeywordHashNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2774
+ def visit_keyword_hash_node(node); end
+
+ # Visit a KeywordRestParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2804
+ def visit_keyword_rest_parameter_node(node); end
+
+ # Visit a LambdaNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2829
+ def visit_lambda_node(node); end
+
+ # Visit a LocalVariableAndWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2870
+ def visit_local_variable_and_write_node(node); end
+
+ # Visit a LocalVariableOperatorWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2900
+ def visit_local_variable_operator_write_node(node); end
+
+ # Visit a LocalVariableOrWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2933
+ def visit_local_variable_or_write_node(node); end
+
+ # Visit a LocalVariableReadNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2963
+ def visit_local_variable_read_node(node); end
+
+ # Visit a LocalVariableTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#2983
+ def visit_local_variable_target_node(node); end
+
+ # Visit a LocalVariableWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3003
+ def visit_local_variable_write_node(node); end
+
+ # Visit a MatchLastLineNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3033
+ def visit_match_last_line_node(node); end
+
+ # Visit a MatchPredicateNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3062
+ def visit_match_predicate_node(node); end
+
+ # Visit a MatchRequiredNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3087
+ def visit_match_required_node(node); end
+
+ # Visit a MatchWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3112
+ def visit_match_write_node(node); end
+
+ # Visit a MissingNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3143
+ def visit_missing_node(node); end
+
+ # Visit a ModuleNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3157
+ def visit_module_node(node); end
+
+ # Visit a MultiTargetNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3193
+ def visit_multi_target_node(node); end
+
+ # Visit a MultiWriteNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3249
+ def visit_multi_write_node(node); end
+
+ # Visit a NextNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3312
+ def visit_next_node(node); end
+
+ # Visit a NilNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3335
+ def visit_nil_node(node); end
+
+ # Visit a NoKeywordsParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3349
+ def visit_no_keywords_parameter_node(node); end
+
+ # Visit a NumberedParametersNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3369
+ def visit_numbered_parameters_node(node); end
+
+ # Visit a NumberedReferenceReadNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3386
+ def visit_numbered_reference_read_node(node); end
+
+ # Visit a OptionalKeywordParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3403
+ def visit_optional_keyword_parameter_node(node); end
+
+ # Visit a OptionalParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3427
+ def visit_optional_parameter_node(node); end
+
+ # Visit a OrNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3454
+ def visit_or_node(node); end
+
+ # Visit a ParametersNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3479
+ def visit_parameters_node(node); end
+
+ # Visit a ParenthesesNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3563
+ def visit_parentheses_node(node); end
+
+ # Visit a PinnedExpressionNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3589
+ def visit_pinned_expression_node(node); end
+
+ # Visit a PinnedVariableNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3616
+ def visit_pinned_variable_node(node); end
+
+ # Visit a PostExecutionNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3637
+ def visit_post_execution_node(node); end
+
+ # Visit a PreExecutionNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3666
+ def visit_pre_execution_node(node); end
+
+ # Visit a ProgramNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3695
+ def visit_program_node(node); end
+
+ # Visit a RangeNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3716
+ def visit_range_node(node); end
+
+ # Visit a RationalNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3748
+ def visit_rational_node(node); end
+
+ # Visit a RedoNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3766
+ def visit_redo_node(node); end
+
+ # Visit a RegularExpressionNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3780
+ def visit_regular_expression_node(node); end
+
+ # Visit a RequiredKeywordParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3809
+ def visit_required_keyword_parameter_node(node); end
+
+ # Visit a RequiredParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3829
+ def visit_required_parameter_node(node); end
+
+ # Visit a RescueModifierNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3846
+ def visit_rescue_modifier_node(node); end
+
+ # Visit a RescueNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3871
+ def visit_rescue_node(node); end
+
+ # Visit a RestParameterNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3924
+ def visit_rest_parameter_node(node); end
+
+ # Visit a RetryNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3949
+ def visit_retry_node(node); end
+
+ # Visit a ReturnNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3963
+ def visit_return_node(node); end
+
+ # Visit a SelfNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#3986
+ def visit_self_node(node); end
+
+ # Visit a SingletonClassNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4000
+ def visit_singleton_class_node(node); end
+
+ # Visit a SourceEncodingNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4036
+ def visit_source_encoding_node(node); end
+
+ # Visit a SourceFileNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4050
+ def visit_source_file_node(node); end
+
+ # Visit a SourceLineNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4067
+ def visit_source_line_node(node); end
+
+ # Visit a SplatNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4081
+ def visit_splat_node(node); end
+
+ # Visit a StatementsNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4104
+ def visit_statements_node(node); end
+
+ # Visit a StringNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4131
+ def visit_string_node(node); end
+
+ # Visit a SuperNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4164
+ def visit_super_node(node); end
+
+ # Visit a SymbolNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4203
+ def visit_symbol_node(node); end
+
+ # Visit a TrueNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4238
+ def visit_true_node(node); end
+
+ # Visit a UndefNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4252
+ def visit_undef_node(node); end
+
+ # Visit a UnlessNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4282
+ def visit_unless_node(node); end
+
+ # Visit a UntilNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4325
+ def visit_until_node(node); end
+
+ # Visit a WhenNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4360
+ def visit_when_node(node); end
+
+ # Visit a WhileNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4396
+ def visit_while_node(node); end
+
+ # Visit a XStringNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4431
+ def visit_x_string_node(node); end
+
+ # Visit a YieldNode node.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4460
+ def visit_yield_node(node); end
+
+ private
+
+ # Inspect a node that has arguments_node_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4506
+ def arguments_node_flags_inspect(node); end
+
+ # Inspect a node that has array_node_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4514
+ def array_node_flags_inspect(node); end
+
+ # Inspect a node that has call_node_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4522
+ def call_node_flags_inspect(node); end
+
+ # Inspect a node that has encoding_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4532
+ def encoding_flags_inspect(node); end
+
+ # Inspect a node that has integer_base_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4541
+ def integer_base_flags_inspect(node); end
+
+ # Inspect a node that has keyword_hash_node_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4552
+ def keyword_hash_node_flags_inspect(node); end
+
+ # Inspect a location to display the start and end line and column numbers.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4500
+ def location_inspect(location); end
+
+ # Inspect a node that has loop_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4560
+ def loop_flags_inspect(node); end
+
+ # Generate a unique node ID for a node throughout the digraph.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4495
+ def node_id(node); end
+
+ # Inspect a node that has range_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4568
+ def range_flags_inspect(node); end
+
+ # Inspect a node that has regular_expression_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4576
+ def regular_expression_flags_inspect(node); end
+
+ # Inspect a node that has string_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4594
+ def string_flags_inspect(node); end
+
+ # Inspect a node that has symbol_flags flags to display the flags as a
+ # comma-separated list.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#4604
+ def symbol_flags_inspect(node); end
+end
+
+# source://prism//lib/prism/dot_visitor.rb#58
+class Prism::DotVisitor::Digraph
+ # @return [Digraph] a new instance of Digraph
+ #
+ # source://prism//lib/prism/dot_visitor.rb#61
+ def initialize; end
+
+ # source://prism//lib/prism/dot_visitor.rb#75
+ def edge(value); end
+
+ # Returns the value of attribute edges.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#59
+ def edges; end
+
+ # source://prism//lib/prism/dot_visitor.rb#67
+ def node(value); end
+
+ # Returns the value of attribute nodes.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#59
+ def nodes; end
+
+ # source://prism//lib/prism/dot_visitor.rb#79
+ def to_dot; end
+
+ # source://prism//lib/prism/dot_visitor.rb#71
+ def waypoint(value); end
+
+ # Returns the value of attribute waypoints.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#59
+ def waypoints; end
+end
+
+# source://prism//lib/prism/dot_visitor.rb#14
+class Prism::DotVisitor::Field
+ # @return [Field] a new instance of Field
+ #
+ # source://prism//lib/prism/dot_visitor.rb#17
+ def initialize(name, value, port); end
+
+ # Returns the value of attribute name.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#15
+ def name; end
+
+ # Returns the value of attribute port.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#15
+ def port; end
+
+ # source://prism//lib/prism/dot_visitor.rb#23
+ def to_dot; end
+
+ # Returns the value of attribute value.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#15
+ def value; end
+end
+
+# source://prism//lib/prism/dot_visitor.rb#32
+class Prism::DotVisitor::Table
+ # @return [Table] a new instance of Table
+ #
+ # source://prism//lib/prism/dot_visitor.rb#35
+ def initialize(name); end
+
+ # source://prism//lib/prism/dot_visitor.rb#40
+ def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end
+
+ # Returns the value of attribute fields.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#33
+ def fields; end
+
+ # Returns the value of attribute name.
+ #
+ # source://prism//lib/prism/dot_visitor.rb#33
+ def name; end
+
+ # source://prism//lib/prism/dot_visitor.rb#44
+ def to_dot; end
+end
+
+# Represents an `else` clause in a `case`, `if`, or `unless` statement.
+#
+# if a then b else c end
+# ^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#5564
+class Prism::ElseNode < ::Prism::Node
+ # def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void
+ #
+ # @return [ElseNode] a new instance of ElseNode
+ #
+ # source://prism//lib/prism/node.rb#5575
+ sig do
+ params(
+ else_keyword_loc: Prism::Location,
+ statements: T.nilable(Prism::StatementsNode),
+ end_keyword_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(else_keyword_loc, statements, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#5583
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5588
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#5600
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#5593
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ElseNode
+ #
+ # source://prism//lib/prism/node.rb#5605
+ sig { params(params: T.untyped).returns(Prism::ElseNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5588
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#5618
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def else_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5623
+ sig { returns(String) }
+ def else_keyword; end
+
+ # attr_reader else_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5566
+ sig { returns(Prism::Location) }
+ def else_keyword_loc; end
+
+ # def end_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#5628
+ sig { returns(T.nilable(String)) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#5572
+ sig { returns(T.nilable(Prism::Location)) }
+ def end_keyword_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5633
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#5569
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5660
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5670
+ def type; end
+ end
+end
+
+# EmbDocComment objects correspond to comments that are surrounded by =begin
+# and =end.
+#
+# source://prism//lib/prism/parse_result.rb#260
+class Prism::EmbDocComment < ::Prism::Comment
+ # Returns a string representation of this comment.
+ #
+ # source://prism//lib/prism/parse_result.rb#267
+ def inspect; end
+
+ # This can only be true for inline comments.
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/parse_result.rb#262
+ def trailing?; end
+end
+
+# Represents an interpolated set of statements.
+#
+# "foo #{bar}"
+# ^^^^^^
+#
+# source://prism//lib/prism/node.rb#5679
+class Prism::EmbeddedStatementsNode < ::Prism::Node
+ # def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void
+ #
+ # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode
+ #
+ # source://prism//lib/prism/node.rb#5690
+ sig do
+ params(
+ opening_loc: Prism::Location,
+ statements: T.nilable(Prism::StatementsNode),
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(opening_loc, statements, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#5698
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5703
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5743
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5687
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#5715
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#5708
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> EmbeddedStatementsNode
+ #
+ # source://prism//lib/prism/node.rb#5720
+ sig { params(params: T.untyped).returns(Prism::EmbeddedStatementsNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5703
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#5733
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5748
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5738
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5681
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#5684
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5775
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5785
+ def type; end
+ end
+end
+
+# Represents an interpolated variable.
+#
+# "foo #@bar"
+# ^^^^^
+#
+# source://prism//lib/prism/node.rb#5794
+class Prism::EmbeddedVariableNode < ::Prism::Node
+ # def initialize: (operator_loc: Location, variable: Node, location: Location) -> void
+ #
+ # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode
+ #
+ # source://prism//lib/prism/node.rb#5802
+ sig { params(operator_loc: Prism::Location, variable: Prism::Node, location: Prism::Location).void }
+ def initialize(operator_loc, variable, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#5809
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5814
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#5824
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#5819
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> EmbeddedVariableNode
+ #
+ # source://prism//lib/prism/node.rb#5829
+ sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5814
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#5841
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5851
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5846
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5796
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5873
+ def type; end
+
+ # attr_reader variable: Node
+ #
+ # source://prism//lib/prism/node.rb#5799
+ sig { returns(Prism::Node) }
+ def variable; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5883
+ def type; end
+ end
+end
+
+# Flags for nodes that have unescaped content.
+#
+# source://prism//lib/prism/node.rb#17301
+module Prism::EncodingFlags; end
+
+# internal bytes forced the encoding to binary
+#
+# source://prism//lib/prism/node.rb#17306
+Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# internal bytes forced the encoding to UTF-8
+#
+# source://prism//lib/prism/node.rb#17303
+Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# Represents an `ensure` clause in a `begin` statement.
+#
+# begin
+# foo
+# ensure
+# ^^^^^^
+# bar
+# end
+#
+# source://prism//lib/prism/node.rb#5896
+class Prism::EnsureNode < ::Prism::Node
+ # def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void
+ #
+ # @return [EnsureNode] a new instance of EnsureNode
+ #
+ # source://prism//lib/prism/node.rb#5907
+ sig do
+ params(
+ ensure_keyword_loc: Prism::Location,
+ statements: T.nilable(Prism::StatementsNode),
+ end_keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(ensure_keyword_loc, statements, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#5915
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5920
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#5932
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#5925
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> EnsureNode
+ #
+ # source://prism//lib/prism/node.rb#5937
+ sig { params(params: T.untyped).returns(Prism::EnsureNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#5920
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#5950
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def end_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5960
+ sig { returns(String) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5904
+ sig { returns(Prism::Location) }
+ def end_keyword_loc; end
+
+ # def ensure_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#5955
+ sig { returns(String) }
+ def ensure_keyword; end
+
+ # attr_reader ensure_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#5898
+ sig { returns(Prism::Location) }
+ def ensure_keyword_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#5965
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#5901
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#5992
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6002
+ def type; end
+ end
+end
+
+# Represents the use of the literal `false` keyword.
+#
+# false
+# ^^^^^
+#
+# source://prism//lib/prism/node.rb#6011
+class Prism::FalseNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [FalseNode] a new instance of FalseNode
+ #
+ # source://prism//lib/prism/node.rb#6013
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6018
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6023
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6033
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6028
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> FalseNode
+ #
+ # source://prism//lib/prism/node.rb#6038
+ sig { params(params: T.untyped).returns(Prism::FalseNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6023
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6048
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6053
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6072
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6082
+ def type; end
+ end
+end
+
+# Represents a find pattern in pattern matching.
+#
+# foo in *bar, baz, *qux
+# ^^^^^^^^^^^^^^^
+#
+# foo in [*bar, baz, *qux]
+# ^^^^^^^^^^^^^^^^^
+#
+# foo in Foo(*bar, baz, *qux)
+# ^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#6097
+class Prism::FindPatternNode < ::Prism::Node
+ # def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void
+ #
+ # @return [FindPatternNode] a new instance of FindPatternNode
+ #
+ # source://prism//lib/prism/node.rb#6117
+ sig do
+ params(
+ constant: T.nilable(Prism::Node),
+ left: Prism::Node,
+ requireds: T::Array[Prism::Node],
+ right: Prism::Node,
+ opening_loc: T.nilable(Prism::Location),
+ closing_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(constant, left, requireds, right, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6128
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6133
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#6179
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#6114
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6148
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6138
+ def compact_child_nodes; end
+
+ # attr_reader constant: Node?
+ #
+ # source://prism//lib/prism/node.rb#6099
+ sig { returns(T.nilable(Prism::Node)) }
+ def constant; end
+
+ # def copy: (**params) -> FindPatternNode
+ #
+ # source://prism//lib/prism/node.rb#6153
+ sig { params(params: T.untyped).returns(Prism::FindPatternNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6133
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6169
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6184
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader left: Node
+ #
+ # source://prism//lib/prism/node.rb#6102
+ sig { returns(Prism::Node) }
+ def left; end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#6174
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#6111
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # attr_reader requireds: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6105
+ sig { returns(T::Array[Prism::Node]) }
+ def requireds; end
+
+ # attr_reader right: Node
+ #
+ # source://prism//lib/prism/node.rb#6108
+ sig { returns(Prism::Node) }
+ def right; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6216
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6226
+ def type; end
+ end
+end
+
+# Represents the use of the `..` or `...` operators to create flip flops.
+#
+# baz if foo .. bar
+# ^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#6235
+class Prism::FlipFlopNode < ::Prism::Node
+ # def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void
+ #
+ # @return [FlipFlopNode] a new instance of FlipFlopNode
+ #
+ # source://prism//lib/prism/node.rb#6249
+ sig do
+ params(
+ flags: Integer,
+ left: T.nilable(Prism::Node),
+ right: T.nilable(Prism::Node),
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, left, right, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6258
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6263
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6276
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6268
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> FlipFlopNode
+ #
+ # source://prism//lib/prism/node.rb#6281
+ sig { params(params: T.untyped).returns(Prism::FlipFlopNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6263
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6295
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def exclude_end?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#6300
+ sig { returns(T::Boolean) }
+ def exclude_end?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6310
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader left: Node?
+ #
+ # source://prism//lib/prism/node.rb#6240
+ sig { returns(T.nilable(Prism::Node)) }
+ def left; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#6305
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#6246
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader right: Node?
+ #
+ # source://prism//lib/prism/node.rb#6243
+ sig { returns(T.nilable(Prism::Node)) }
+ def right; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6344
+ def type; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#6237
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6354
+ def type; end
+ end
+end
+
+# Represents a floating point number literal.
+#
+# 1.0
+# ^^^
+#
+# source://prism//lib/prism/node.rb#6363
+class Prism::FloatNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [FloatNode] a new instance of FloatNode
+ #
+ # source://prism//lib/prism/node.rb#6365
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6370
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6375
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6385
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6380
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> FloatNode
+ #
+ # source://prism//lib/prism/node.rb#6390
+ sig { params(params: T.untyped).returns(Prism::FloatNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6375
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6400
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6405
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6424
+ def type; end
+
+ # Returns the value of the node as a Ruby Float.
+ #
+ # source://prism//lib/prism/node_ext.rb#62
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6434
+ def type; end
+ end
+end
+
+# Represents the use of the `for` keyword.
+#
+# for i in a end
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#6443
+class Prism::ForNode < ::Prism::Node
+ # def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void
+ #
+ # @return [ForNode] a new instance of ForNode
+ #
+ # source://prism//lib/prism/node.rb#6466
+ sig do
+ params(
+ index: Prism::Node,
+ collection: Prism::Node,
+ statements: T.nilable(Prism::StatementsNode),
+ for_keyword_loc: Prism::Location,
+ in_keyword_loc: Prism::Location,
+ do_keyword_loc: T.nilable(Prism::Location),
+ end_keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6478
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6483
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # attr_reader collection: Node
+ #
+ # source://prism//lib/prism/node.rb#6448
+ sig { returns(Prism::Node) }
+ def collection; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6497
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6488
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ForNode
+ #
+ # source://prism//lib/prism/node.rb#6502
+ sig { params(params: T.untyped).returns(Prism::ForNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6483
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6519
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def do_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#6534
+ sig { returns(T.nilable(String)) }
+ def do_keyword; end
+
+ # attr_reader do_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#6460
+ sig { returns(T.nilable(Prism::Location)) }
+ def do_keyword_loc; end
+
+ # def end_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#6539
+ sig { returns(String) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#6463
+ sig { returns(Prism::Location) }
+ def end_keyword_loc; end
+
+ # def for_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#6524
+ sig { returns(String) }
+ def for_keyword; end
+
+ # attr_reader for_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#6454
+ sig { returns(Prism::Location) }
+ def for_keyword_loc; end
+
+ # def in_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#6529
+ sig { returns(String) }
+ def in_keyword; end
+
+ # attr_reader in_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#6457
+ sig { returns(Prism::Location) }
+ def in_keyword_loc; end
+
+ # attr_reader index: Node
+ #
+ # source://prism//lib/prism/node.rb#6445
+ sig { returns(Prism::Node) }
+ def index; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6544
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#6451
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6577
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6587
+ def type; end
+ end
+end
+
+# Represents forwarding all arguments to this method to another method.
+#
+# def foo(...)
+# bar(...)
+# ^^^
+# end
+#
+# source://prism//lib/prism/node.rb#6598
+class Prism::ForwardingArgumentsNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode
+ #
+ # source://prism//lib/prism/node.rb#6600
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6605
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6610
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6620
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6615
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ForwardingArgumentsNode
+ #
+ # source://prism//lib/prism/node.rb#6625
+ sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6610
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6635
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6640
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6659
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6669
+ def type; end
+ end
+end
+
+# Represents the use of the forwarding parameter in a method, block, or lambda declaration.
+#
+# def foo(...)
+# ^^^
+# end
+#
+# source://prism//lib/prism/node.rb#6679
+class Prism::ForwardingParameterNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode
+ #
+ # source://prism//lib/prism/node.rb#6681
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6686
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6691
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6701
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6696
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ForwardingParameterNode
+ #
+ # source://prism//lib/prism/node.rb#6706
+ sig { params(params: T.untyped).returns(Prism::ForwardingParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6691
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6716
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6721
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6740
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6750
+ def type; end
+ end
+end
+
+# Represents the use of the `super` keyword without parentheses or arguments.
+#
+# super
+# ^^^^^
+#
+# source://prism//lib/prism/node.rb#6759
+class Prism::ForwardingSuperNode < ::Prism::Node
+ # def initialize: (block: BlockNode?, location: Location) -> void
+ #
+ # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode
+ #
+ # source://prism//lib/prism/node.rb#6764
+ sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).void }
+ def initialize(block, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6770
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader block: BlockNode?
+ #
+ # source://prism//lib/prism/node.rb#6761
+ sig { returns(T.nilable(Prism::BlockNode)) }
+ def block; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6775
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6787
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6780
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ForwardingSuperNode
+ #
+ # source://prism//lib/prism/node.rb#6792
+ sig { params(params: T.untyped).returns(Prism::ForwardingSuperNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6775
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6803
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6808
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6833
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6843
+ def type; end
+ end
+end
+
+# Represents the use of the `&&=` operator for assignment to a global variable.
+#
+# $target &&= value
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#6852
+class Prism::GlobalVariableAndWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#6866
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6875
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6880
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#6890
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6885
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> GlobalVariableAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#6895
+ sig { params(params: T.untyped).returns(Prism::GlobalVariableAndWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6880
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#6909
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#6919
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#6854
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#6857
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#6914
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#6860
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6943
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#6863
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#6953
+ def type; end
+ end
+end
+
+# Represents assigning to a global variable using an operator that isn't `=`.
+#
+# $target += value
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#6962
+class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
+ #
+ # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#6979
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ operator: Symbol,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, operator, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#6989
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6994
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7004
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#6999
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> GlobalVariableOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#7009
+ sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#6994
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7024
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7029
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#6964
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#6967
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # attr_reader operator: Symbol
+ #
+ # source://prism//lib/prism/node.rb#6976
+ sig { returns(Symbol) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#6970
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7054
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#6973
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7064
+ def type; end
+ end
+end
+
+# Represents the use of the `||=` operator for assignment to a global variable.
+#
+# $target ||= value
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#7073
+class Prism::GlobalVariableOrWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#7087
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7096
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7101
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7111
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7106
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> GlobalVariableOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#7116
+ sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7101
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7130
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7140
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#7075
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#7078
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#7135
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#7081
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7164
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#7084
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7174
+ def type; end
+ end
+end
+
+# Represents referencing a global variable.
+#
+# $foo
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#7183
+class Prism::GlobalVariableReadNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode
+ #
+ # source://prism//lib/prism/node.rb#7188
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7194
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7199
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7209
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7204
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> GlobalVariableReadNode
+ #
+ # source://prism//lib/prism/node.rb#7214
+ sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7199
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7225
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7230
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#7185
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7250
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7260
+ def type; end
+ end
+end
+
+# Represents writing to a global variable in a context that doesn't have an explicit value.
+#
+# $foo, $bar = baz
+# ^^^^ ^^^^
+#
+# source://prism//lib/prism/node.rb#7269
+class Prism::GlobalVariableTargetNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode
+ #
+ # source://prism//lib/prism/node.rb#7274
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7280
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7285
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7295
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7290
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> GlobalVariableTargetNode
+ #
+ # source://prism//lib/prism/node.rb#7300
+ sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7285
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7311
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7316
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#7271
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7336
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7346
+ def type; end
+ end
+end
+
+# Represents writing to a global variable.
+#
+# $foo = 1
+# ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#7355
+class Prism::GlobalVariableWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode
+ #
+ # source://prism//lib/prism/node.rb#7369
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ value: Prism::Node,
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, value, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7378
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7383
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7393
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7388
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> GlobalVariableWriteNode
+ #
+ # source://prism//lib/prism/node.rb#7398
+ sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7383
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7412
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7422
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#7357
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#7360
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#7417
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#7366
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7446
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#7363
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7456
+ def type; end
+ end
+end
+
+# Represents a hash literal.
+#
+# { a => b }
+# ^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#7465
+class Prism::HashNode < ::Prism::Node
+ # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void
+ #
+ # @return [HashNode] a new instance of HashNode
+ #
+ # source://prism//lib/prism/node.rb#7476
+ sig do
+ params(
+ opening_loc: Prism::Location,
+ elements: T::Array[Prism::Node],
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(opening_loc, elements, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7484
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7489
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#7527
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#7473
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7499
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7494
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> HashNode
+ #
+ # source://prism//lib/prism/node.rb#7504
+ sig { params(params: T.untyped).returns(Prism::HashNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7489
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7517
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader elements: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7470
+ sig { returns(T::Array[Prism::Node]) }
+ def elements; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7532
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#7522
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#7467
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7554
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7564
+ def type; end
+ end
+end
+
+# Represents a hash pattern in pattern matching.
+#
+# foo => { a: 1, b: 2 }
+# ^^^^^^^^^^^^^^
+#
+# foo => { a: 1, b: 2, **c }
+# ^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#7576
+class Prism::HashPatternNode < ::Prism::Node
+ # def initialize: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void
+ #
+ # @return [HashPatternNode] a new instance of HashPatternNode
+ #
+ # source://prism//lib/prism/node.rb#7593
+ sig do
+ params(
+ constant: T.nilable(Prism::Node),
+ elements: T::Array[Prism::Node],
+ rest: T.nilable(Prism::Node),
+ opening_loc: T.nilable(Prism::Location),
+ closing_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(constant, elements, rest, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7603
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7608
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#7652
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#7590
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7622
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7613
+ def compact_child_nodes; end
+
+ # attr_reader constant: Node?
+ #
+ # source://prism//lib/prism/node.rb#7578
+ sig { returns(T.nilable(Prism::Node)) }
+ def constant; end
+
+ # def copy: (**params) -> HashPatternNode
+ #
+ # source://prism//lib/prism/node.rb#7627
+ sig { params(params: T.untyped).returns(Prism::HashPatternNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7608
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7642
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader elements: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7581
+ sig { returns(T::Array[Prism::Node]) }
+ def elements; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7657
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#7647
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#7587
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # attr_reader rest: Node?
+ #
+ # source://prism//lib/prism/node.rb#7584
+ sig { returns(T.nilable(Prism::Node)) }
+ def rest; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7691
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7701
+ def type; end
+ end
+end
+
+# source://prism//lib/prism/node_ext.rb#35
+module Prism::HeredocQuery
+ # Returns true if this node was represented as a heredoc in the source code.
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node_ext.rb#37
+ def heredoc?; end
+end
+
+# Represents the use of the `if` keyword, either in the block form or the modifier form.
+#
+# bar if foo
+# ^^^^^^^^^^
+#
+# if foo then bar end
+# ^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#7713
+class Prism::IfNode < ::Prism::Node
+ # def initialize: (if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void
+ #
+ # @return [IfNode] a new instance of IfNode
+ #
+ # source://prism//lib/prism/node.rb#7733
+ sig do
+ params(
+ if_keyword_loc: T.nilable(Prism::Location),
+ predicate: Prism::Node,
+ then_keyword_loc: T.nilable(Prism::Location),
+ statements: T.nilable(Prism::StatementsNode),
+ consequent: T.nilable(Prism::Node),
+ end_keyword_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7744
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7753
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7767
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7758
+ def compact_child_nodes; end
+
+ # attr_reader consequent: Node?
+ #
+ # source://prism//lib/prism/node.rb#7727
+ sig { returns(T.nilable(Prism::Node)) }
+ def consequent; end
+
+ # def copy: (**params) -> IfNode
+ #
+ # source://prism//lib/prism/node.rb#7772
+ sig { params(params: T.untyped).returns(Prism::IfNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7753
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7788
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def end_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#7803
+ sig { returns(T.nilable(String)) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#7730
+ sig { returns(T.nilable(Prism::Location)) }
+ def end_keyword_loc; end
+
+ # def if_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#7793
+ sig { returns(T.nilable(String)) }
+ def if_keyword; end
+
+ # attr_reader if_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#7715
+ sig { returns(T.nilable(Prism::Location)) }
+ def if_keyword_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7808
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader predicate: Node
+ #
+ # source://prism//lib/prism/node.rb#7718
+ sig { returns(Prism::Node) }
+ def predicate; end
+
+ # source://prism//lib/prism/node.rb#7748
+ def set_newline_flag(newline_marked); end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#7724
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # def then_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#7798
+ sig { returns(T.nilable(String)) }
+ def then_keyword; end
+
+ # attr_reader then_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#7721
+ sig { returns(T.nilable(Prism::Location)) }
+ def then_keyword_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7844
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7854
+ def type; end
+ end
+end
+
+# Represents an imaginary number literal.
+#
+# 1.0i
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#7863
+class Prism::ImaginaryNode < ::Prism::Node
+ # def initialize: (numeric: Node, location: Location) -> void
+ #
+ # @return [ImaginaryNode] a new instance of ImaginaryNode
+ #
+ # source://prism//lib/prism/node.rb#7868
+ sig { params(numeric: Prism::Node, location: Prism::Location).void }
+ def initialize(numeric, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7874
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7879
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7889
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7884
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ImaginaryNode
+ #
+ # source://prism//lib/prism/node.rb#7894
+ sig { params(params: T.untyped).returns(Prism::ImaginaryNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7879
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7905
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#7910
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader numeric: Node
+ #
+ # source://prism//lib/prism/node.rb#7865
+ sig { returns(Prism::Node) }
+ def numeric; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7931
+ def type; end
+
+ # Returns the value of the node as a Ruby Complex.
+ #
+ # source://prism//lib/prism/node_ext.rb#69
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#7941
+ def type; end
+ end
+end
+
+# Represents a node that is implicitly being added to the tree but doesn't
+# correspond directly to a node in the source.
+#
+# { foo: }
+# ^^^^
+#
+# { Foo: }
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#7954
+class Prism::ImplicitNode < ::Prism::Node
+ # def initialize: (value: Node, location: Location) -> void
+ #
+ # @return [ImplicitNode] a new instance of ImplicitNode
+ #
+ # source://prism//lib/prism/node.rb#7959
+ sig { params(value: Prism::Node, location: Prism::Location).void }
+ def initialize(value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#7965
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7970
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#7980
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#7975
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ImplicitNode
+ #
+ # source://prism//lib/prism/node.rb#7985
+ sig { params(params: T.untyped).returns(Prism::ImplicitNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#7970
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#7996
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#8001
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8022
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#7956
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8032
+ def type; end
+ end
+end
+
+# Represents using a trailing comma to indicate an implicit rest parameter.
+#
+# foo { |bar,| }
+# ^
+#
+# foo in [bar,]
+# ^
+#
+# for foo, in bar do end
+# ^
+#
+# foo, = bar
+# ^
+#
+# source://prism//lib/prism/node.rb#8050
+class Prism::ImplicitRestNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [ImplicitRestNode] a new instance of ImplicitRestNode
+ #
+ # source://prism//lib/prism/node.rb#8052
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#8057
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8062
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#8072
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#8067
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ImplicitRestNode
+ #
+ # source://prism//lib/prism/node.rb#8077
+ sig { params(params: T.untyped).returns(Prism::ImplicitRestNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8062
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#8087
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#8092
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8111
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8121
+ def type; end
+ end
+end
+
+# Represents the use of the `in` keyword in a case statement.
+#
+# case a; in b then c end
+# ^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#8130
+class Prism::InNode < ::Prism::Node
+ # def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void
+ #
+ # @return [InNode] a new instance of InNode
+ #
+ # source://prism//lib/prism/node.rb#8144
+ sig do
+ params(
+ pattern: Prism::Node,
+ statements: T.nilable(Prism::StatementsNode),
+ in_loc: Prism::Location,
+ then_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(pattern, statements, in_loc, then_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#8153
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8158
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#8171
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#8163
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InNode
+ #
+ # source://prism//lib/prism/node.rb#8176
+ sig { params(params: T.untyped).returns(Prism::InNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8158
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#8190
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def in: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8195
+ sig { returns(String) }
+ def in; end
+
+ # attr_reader in_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8138
+ sig { returns(Prism::Location) }
+ def in_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#8205
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader pattern: Node
+ #
+ # source://prism//lib/prism/node.rb#8132
+ sig { returns(Prism::Node) }
+ def pattern; end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#8135
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # def then: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#8200
+ sig { returns(T.nilable(String)) }
+ def then; end
+
+ # attr_reader then_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#8141
+ sig { returns(T.nilable(Prism::Location)) }
+ def then_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8234
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8244
+ def type; end
+ end
+end
+
+# Represents the use of the `&&=` operator on a call to the `[]` method.
+#
+# foo.bar[baz] &&= value
+# ^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#8253
+class Prism::IndexAndWriteNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#8282
+ sig do
+ params(
+ flags: Integer,
+ receiver: T.nilable(Prism::Node),
+ call_operator_loc: T.nilable(Prism::Location),
+ opening_loc: Prism::Location,
+ arguments: T.nilable(Prism::ArgumentsNode),
+ closing_loc: Prism::Location,
+ block: T.nilable(Prism::Node),
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#8296
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#8267
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8355
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # attr_reader block: Node?
+ #
+ # source://prism//lib/prism/node.rb#8273
+ sig { returns(T.nilable(Prism::Node)) }
+ def block; end
+
+ # def call_operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#8360
+ sig { returns(T.nilable(String)) }
+ def call_operator; end
+
+ # attr_reader call_operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#8261
+ sig { returns(T.nilable(Prism::Location)) }
+ def call_operator_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8301
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8370
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8270
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#8316
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#8306
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> IndexAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#8321
+ sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8301
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#8340
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#8380
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8365
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8264
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8375
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8276
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader receiver: Node?
+ #
+ # source://prism//lib/prism/node.rb#8258
+ sig { returns(T.nilable(Prism::Node)) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8345
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8425
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#8279
+ sig { returns(Prism::Node) }
+ def value; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8350
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#8255
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8435
+ def type; end
+ end
+end
+
+# Represents the use of an assignment operator on a call to `[]`.
+#
+# foo.bar[baz] += value
+# ^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#8444
+class Prism::IndexOperatorWriteNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#8476
+ sig do
+ params(
+ flags: Integer,
+ receiver: T.nilable(Prism::Node),
+ call_operator_loc: T.nilable(Prism::Location),
+ opening_loc: Prism::Location,
+ arguments: T.nilable(Prism::ArgumentsNode),
+ closing_loc: Prism::Location,
+ block: T.nilable(Prism::Node),
+ operator: Symbol,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#8491
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#8458
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8551
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # attr_reader block: Node?
+ #
+ # source://prism//lib/prism/node.rb#8464
+ sig { returns(T.nilable(Prism::Node)) }
+ def block; end
+
+ # def call_operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#8556
+ sig { returns(T.nilable(String)) }
+ def call_operator; end
+
+ # attr_reader call_operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#8452
+ sig { returns(T.nilable(Prism::Location)) }
+ def call_operator_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8496
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8566
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8461
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#8511
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#8501
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> IndexOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#8516
+ sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8496
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#8536
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#8571
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8561
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8455
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader operator: Symbol
+ #
+ # source://prism//lib/prism/node.rb#8467
+ sig { returns(Symbol) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8470
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader receiver: Node?
+ #
+ # source://prism//lib/prism/node.rb#8449
+ sig { returns(T.nilable(Prism::Node)) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8541
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8617
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#8473
+ sig { returns(Prism::Node) }
+ def value; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8546
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#8446
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8627
+ def type; end
+ end
+end
+
+# Represents the use of the `||=` operator on a call to `[]`.
+#
+# foo.bar[baz] ||= value
+# ^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#8636
+class Prism::IndexOrWriteNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#8665
+ sig do
+ params(
+ flags: Integer,
+ receiver: T.nilable(Prism::Node),
+ call_operator_loc: T.nilable(Prism::Location),
+ opening_loc: Prism::Location,
+ arguments: T.nilable(Prism::ArgumentsNode),
+ closing_loc: Prism::Location,
+ block: T.nilable(Prism::Node),
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#8679
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#8650
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8738
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # attr_reader block: Node?
+ #
+ # source://prism//lib/prism/node.rb#8656
+ sig { returns(T.nilable(Prism::Node)) }
+ def block; end
+
+ # def call_operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#8743
+ sig { returns(T.nilable(String)) }
+ def call_operator; end
+
+ # attr_reader call_operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#8644
+ sig { returns(T.nilable(Prism::Location)) }
+ def call_operator_loc; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8684
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8753
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8653
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#8699
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#8689
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> IndexOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#8704
+ sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8684
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#8723
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#8763
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8748
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8647
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8758
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8659
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader receiver: Node?
+ #
+ # source://prism//lib/prism/node.rb#8641
+ sig { returns(T.nilable(Prism::Node)) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8728
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8808
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#8662
+ sig { returns(Prism::Node) }
+ def value; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8733
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#8638
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8818
+ def type; end
+ end
+end
+
+# Represents assigning to an index.
+#
+# foo[bar], = 1
+# ^^^^^^^^
+#
+# begin
+# rescue => foo[bar]
+# ^^^^^^^^
+# end
+#
+# for foo[bar] in baz do end
+# ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#8835
+class Prism::IndexTargetNode < ::Prism::Node
+ # def initialize: (flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location) -> void
+ #
+ # @return [IndexTargetNode] a new instance of IndexTargetNode
+ #
+ # source://prism//lib/prism/node.rb#8855
+ sig do
+ params(
+ flags: Integer,
+ receiver: Prism::Node,
+ opening_loc: Prism::Location,
+ arguments: T.nilable(Prism::ArgumentsNode),
+ closing_loc: Prism::Location,
+ block: T.nilable(Prism::Node),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, receiver, opening_loc, arguments, closing_loc, block, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#8866
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#8846
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def attribute_write?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8921
+ sig { returns(T::Boolean) }
+ def attribute_write?; end
+
+ # attr_reader block: Node?
+ #
+ # source://prism//lib/prism/node.rb#8852
+ sig { returns(T.nilable(Prism::Node)) }
+ def block; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8871
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8931
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8849
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#8885
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#8876
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> IndexTargetNode
+ #
+ # source://prism//lib/prism/node.rb#8890
+ sig { params(params: T.untyped).returns(Prism::IndexTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#8871
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#8906
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#8936
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#8926
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8843
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader receiver: Node
+ #
+ # source://prism//lib/prism/node.rb#8840
+ sig { returns(Prism::Node) }
+ def receiver; end
+
+ # def safe_navigation?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8911
+ sig { returns(T::Boolean) }
+ def safe_navigation?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8973
+ def type; end
+
+ # def variable_call?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#8916
+ sig { returns(T::Boolean) }
+ def variable_call?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#8837
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#8983
+ def type; end
+ end
+end
+
+# InlineComment objects are the most common. They correspond to comments in
+# the source file like this one that start with #.
+#
+# source://prism//lib/prism/parse_result.rb#245
+class Prism::InlineComment < ::Prism::Comment
+ # Returns a string representation of this comment.
+ #
+ # source://prism//lib/prism/parse_result.rb#253
+ def inspect; end
+
+ # Returns true if this comment happens on the same line as other code and
+ # false if the comment is by itself.
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/parse_result.rb#248
+ sig { override.returns(T::Boolean) }
+ def trailing?; end
+end
+
+# Represents the use of the `&&=` operator for assignment to an instance variable.
+#
+# @target &&= value
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#8992
+class Prism::InstanceVariableAndWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#9006
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9015
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9020
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9030
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9025
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InstanceVariableAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#9035
+ sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9020
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9049
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#9059
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#8994
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#8997
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#9054
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9000
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9083
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#9003
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9093
+ def type; end
+ end
+end
+
+# Represents assigning to an instance variable using an operator that isn't `=`.
+#
+# @target += value
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#9102
+class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void
+ #
+ # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#9119
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ operator: Symbol,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, operator, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9129
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9134
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9144
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9139
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InstanceVariableOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#9149
+ sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9134
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9164
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#9169
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#9104
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9107
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # attr_reader operator: Symbol
+ #
+ # source://prism//lib/prism/node.rb#9116
+ sig { returns(Symbol) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9110
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9194
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#9113
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9204
+ def type; end
+ end
+end
+
+# Represents the use of the `||=` operator for assignment to an instance variable.
+#
+# @target ||= value
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#9213
+class Prism::InstanceVariableOrWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#9227
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9236
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9241
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9251
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9246
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InstanceVariableOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#9256
+ sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9241
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9270
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#9280
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#9215
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9218
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#9275
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9221
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9304
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#9224
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9314
+ def type; end
+ end
+end
+
+# Represents referencing an instance variable.
+#
+# @foo
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#9323
+class Prism::InstanceVariableReadNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode
+ #
+ # source://prism//lib/prism/node.rb#9328
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9334
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9339
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9349
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9344
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InstanceVariableReadNode
+ #
+ # source://prism//lib/prism/node.rb#9354
+ sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9339
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9365
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#9370
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#9325
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9390
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9400
+ def type; end
+ end
+end
+
+# Represents writing to an instance variable in a context that doesn't have an explicit value.
+#
+# @foo, @bar = baz
+# ^^^^ ^^^^
+#
+# source://prism//lib/prism/node.rb#9409
+class Prism::InstanceVariableTargetNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode
+ #
+ # source://prism//lib/prism/node.rb#9414
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9420
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9425
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9435
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9430
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InstanceVariableTargetNode
+ #
+ # source://prism//lib/prism/node.rb#9440
+ sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9425
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9451
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#9456
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#9411
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9476
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9486
+ def type; end
+ end
+end
+
+# Represents writing to an instance variable.
+#
+# @foo = 1
+# ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#9495
+class Prism::InstanceVariableWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode
+ #
+ # source://prism//lib/prism/node.rb#9509
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ value: Prism::Node,
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, value, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9518
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9523
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9533
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9528
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InstanceVariableWriteNode
+ #
+ # source://prism//lib/prism/node.rb#9538
+ sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9523
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9552
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#9562
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#9497
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9500
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#9557
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9506
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9586
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#9503
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9596
+ def type; end
+ end
+end
+
+# Flags for integer nodes that correspond to the base of the integer.
+#
+# source://prism//lib/prism/node.rb#17310
+module Prism::IntegerBaseFlags; end
+
+# 0b prefix
+#
+# source://prism//lib/prism/node.rb#17312
+Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer)
+
+# 0d or no prefix
+#
+# source://prism//lib/prism/node.rb#17315
+Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer)
+
+# 0x prefix
+#
+# source://prism//lib/prism/node.rb#17321
+Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer)
+
+# 0o or 0 prefix
+#
+# source://prism//lib/prism/node.rb#17318
+Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer)
+
+# Represents an integer number literal.
+#
+# 1
+# ^
+#
+# source://prism//lib/prism/node.rb#9605
+class Prism::IntegerNode < ::Prism::Node
+ # def initialize: (flags: Integer, location: Location) -> void
+ #
+ # @return [IntegerNode] a new instance of IntegerNode
+ #
+ # source://prism//lib/prism/node.rb#9610
+ sig { params(flags: Integer, location: Prism::Location).void }
+ def initialize(flags, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9616
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def binary?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9652
+ sig { returns(T::Boolean) }
+ def binary?; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9621
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9631
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9626
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> IntegerNode
+ #
+ # source://prism//lib/prism/node.rb#9636
+ sig { params(params: T.untyped).returns(Prism::IntegerNode) }
+ def copy(**params); end
+
+ # def decimal?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9657
+ sig { returns(T::Boolean) }
+ def decimal?; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9621
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9647
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def hexadecimal?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9667
+ sig { returns(T::Boolean) }
+ def hexadecimal?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#9672
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def octal?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9662
+ sig { returns(T::Boolean) }
+ def octal?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9693
+ def type; end
+
+ # Returns the value of the node as a Ruby Integer.
+ #
+ # source://prism//lib/prism/node_ext.rb#76
+ def value; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#9607
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9703
+ def type; end
+ end
+end
+
+# Represents a regular expression literal that contains interpolation that
+# is being used in the predicate of a conditional to implicitly match
+# against the last line read by an IO object.
+#
+# if /foo #{bar} baz/ then end
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#9714
+class Prism::InterpolatedMatchLastLineNode < ::Prism::Node
+ include ::Prism::RegularExpressionOptions
+
+ # def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void
+ #
+ # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode
+ #
+ # source://prism//lib/prism/node.rb#9728
+ sig do
+ params(
+ flags: Integer,
+ opening_loc: Prism::Location,
+ parts: T::Array[Prism::Node],
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, opening_loc, parts, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9737
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def ascii_8bit?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9806
+ sig { returns(T::Boolean) }
+ def ascii_8bit?; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9747
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#9841
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9725
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9757
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9752
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InterpolatedMatchLastLineNode
+ #
+ # source://prism//lib/prism/node.rb#9762
+ sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9747
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9776
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def euc_jp?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9801
+ sig { returns(T::Boolean) }
+ def euc_jp?; end
+
+ # def extended?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9786
+ sig { returns(T::Boolean) }
+ def extended?; end
+
+ # def forced_binary_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9826
+ sig { returns(T::Boolean) }
+ def forced_binary_encoding?; end
+
+ # def forced_us_ascii_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9831
+ sig { returns(T::Boolean) }
+ def forced_us_ascii_encoding?; end
+
+ # def forced_utf8_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9821
+ sig { returns(T::Boolean) }
+ def forced_utf8_encoding?; end
+
+ # def ignore_case?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9781
+ sig { returns(T::Boolean) }
+ def ignore_case?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#9846
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def multi_line?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9791
+ sig { returns(T::Boolean) }
+ def multi_line?; end
+
+ # def once?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9796
+ sig { returns(T::Boolean) }
+ def once?; end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#9836
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9719
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader parts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9722
+ sig { returns(T::Array[Prism::Node]) }
+ def parts; end
+
+ # source://prism//lib/prism/node.rb#9741
+ def set_newline_flag(newline_marked); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9870
+ def type; end
+
+ # def utf_8?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9816
+ sig { returns(T::Boolean) }
+ def utf_8?; end
+
+ # def windows_31j?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9811
+ sig { returns(T::Boolean) }
+ def windows_31j?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#9716
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#9880
+ def type; end
+ end
+end
+
+# Represents a regular expression literal that contains interpolation.
+#
+# /foo #{bar} baz/
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#9889
+class Prism::InterpolatedRegularExpressionNode < ::Prism::Node
+ include ::Prism::RegularExpressionOptions
+
+ # def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void
+ #
+ # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode
+ #
+ # source://prism//lib/prism/node.rb#9903
+ sig do
+ params(
+ flags: Integer,
+ opening_loc: Prism::Location,
+ parts: T::Array[Prism::Node],
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, opening_loc, parts, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#9912
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def ascii_8bit?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9981
+ sig { returns(T::Boolean) }
+ def ascii_8bit?; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9922
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10016
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9900
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#9932
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9927
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InterpolatedRegularExpressionNode
+ #
+ # source://prism//lib/prism/node.rb#9937
+ sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#9922
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#9951
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def euc_jp?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9976
+ sig { returns(T::Boolean) }
+ def euc_jp?; end
+
+ # def extended?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9961
+ sig { returns(T::Boolean) }
+ def extended?; end
+
+ # def forced_binary_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#10001
+ sig { returns(T::Boolean) }
+ def forced_binary_encoding?; end
+
+ # def forced_us_ascii_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#10006
+ sig { returns(T::Boolean) }
+ def forced_us_ascii_encoding?; end
+
+ # def forced_utf8_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9996
+ sig { returns(T::Boolean) }
+ def forced_utf8_encoding?; end
+
+ # def ignore_case?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9956
+ sig { returns(T::Boolean) }
+ def ignore_case?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10021
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def multi_line?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9966
+ sig { returns(T::Boolean) }
+ def multi_line?; end
+
+ # def once?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9971
+ sig { returns(T::Boolean) }
+ def once?; end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10011
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#9894
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader parts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#9897
+ sig { returns(T::Array[Prism::Node]) }
+ def parts; end
+
+ # source://prism//lib/prism/node.rb#9916
+ def set_newline_flag(newline_marked); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10045
+ def type; end
+
+ # def utf_8?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9991
+ sig { returns(T::Boolean) }
+ def utf_8?; end
+
+ # def windows_31j?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#9986
+ sig { returns(T::Boolean) }
+ def windows_31j?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#9891
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10055
+ def type; end
+ end
+end
+
+# Represents a string literal that contains interpolation.
+#
+# "foo #{bar} baz"
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#10064
+class Prism::InterpolatedStringNode < ::Prism::Node
+ include ::Prism::HeredocQuery
+
+ # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void
+ #
+ # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode
+ #
+ # source://prism//lib/prism/node.rb#10075
+ sig do
+ params(
+ opening_loc: T.nilable(Prism::Location),
+ parts: T::Array[Prism::Node],
+ closing_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(opening_loc, parts, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#10083
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10093
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#10131
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#10072
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#10103
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10098
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InterpolatedStringNode
+ #
+ # source://prism//lib/prism/node.rb#10108
+ sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10093
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#10121
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10136
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#10126
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#10066
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # attr_reader parts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10069
+ sig { returns(T::Array[Prism::Node]) }
+ def parts; end
+
+ # source://prism//lib/prism/node.rb#10087
+ def set_newline_flag(newline_marked); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10158
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10168
+ def type; end
+ end
+end
+
+# Represents a symbol literal that contains interpolation.
+#
+# :"foo #{bar} baz"
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#10177
+class Prism::InterpolatedSymbolNode < ::Prism::Node
+ # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void
+ #
+ # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode
+ #
+ # source://prism//lib/prism/node.rb#10188
+ sig do
+ params(
+ opening_loc: T.nilable(Prism::Location),
+ parts: T::Array[Prism::Node],
+ closing_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(opening_loc, parts, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#10196
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10206
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#10244
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#10185
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#10216
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10211
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InterpolatedSymbolNode
+ #
+ # source://prism//lib/prism/node.rb#10221
+ sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10206
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#10234
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10249
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#10239
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#10179
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # attr_reader parts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10182
+ sig { returns(T::Array[Prism::Node]) }
+ def parts; end
+
+ # source://prism//lib/prism/node.rb#10200
+ def set_newline_flag(newline_marked); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10271
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10281
+ def type; end
+ end
+end
+
+# Represents an xstring literal that contains interpolation.
+#
+# `foo #{bar} baz`
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#10290
+class Prism::InterpolatedXStringNode < ::Prism::Node
+ include ::Prism::HeredocQuery
+
+ # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void
+ #
+ # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode
+ #
+ # source://prism//lib/prism/node.rb#10301
+ sig do
+ params(
+ opening_loc: Prism::Location,
+ parts: T::Array[Prism::Node],
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(opening_loc, parts, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#10309
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10319
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10357
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10298
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#10329
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10324
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> InterpolatedXStringNode
+ #
+ # source://prism//lib/prism/node.rb#10334
+ sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10319
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#10347
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10362
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10352
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10292
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader parts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10295
+ sig { returns(T::Array[Prism::Node]) }
+ def parts; end
+
+ # source://prism//lib/prism/node.rb#10313
+ def set_newline_flag(newline_marked); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10384
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10394
+ def type; end
+ end
+end
+
+# Represents a hash literal without opening and closing braces.
+#
+# foo(a: b)
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#10403
+class Prism::KeywordHashNode < ::Prism::Node
+ # def initialize: (flags: Integer, elements: Array[Node], location: Location) -> void
+ #
+ # @return [KeywordHashNode] a new instance of KeywordHashNode
+ #
+ # source://prism//lib/prism/node.rb#10411
+ sig { params(flags: Integer, elements: T::Array[Prism::Node], location: Prism::Location).void }
+ def initialize(flags, elements, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#10418
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10423
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#10433
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10428
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> KeywordHashNode
+ #
+ # source://prism//lib/prism/node.rb#10438
+ sig { params(params: T.untyped).returns(Prism::KeywordHashNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10423
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#10450
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader elements: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10408
+ sig { returns(T::Array[Prism::Node]) }
+ def elements; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10460
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def static_keys?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#10455
+ sig { returns(T::Boolean) }
+ def static_keys?; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10482
+ def type; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#10405
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10492
+ def type; end
+ end
+end
+
+# Flags for keyword hash nodes.
+#
+# source://prism//lib/prism/node.rb#17325
+module Prism::KeywordHashNodeFlags; end
+
+# a keyword hash which only has `AssocNode` elements all with static literal keys, which means the elements can be treated as keyword arguments
+#
+# source://prism//lib/prism/node.rb#17327
+Prism::KeywordHashNodeFlags::STATIC_KEYS = T.let(T.unsafe(nil), Integer)
+
+# Represents a keyword rest parameter to a method, block, or lambda definition.
+#
+# def a(**b)
+# ^^^
+# end
+#
+# source://prism//lib/prism/node.rb#10502
+class Prism::KeywordRestParameterNode < ::Prism::Node
+ # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void
+ #
+ # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode
+ #
+ # source://prism//lib/prism/node.rb#10513
+ sig do
+ params(
+ name: T.nilable(Symbol),
+ name_loc: T.nilable(Prism::Location),
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#10521
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10526
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#10536
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10531
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> KeywordRestParameterNode
+ #
+ # source://prism//lib/prism/node.rb#10541
+ sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10526
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#10554
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10564
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol?
+ #
+ # source://prism//lib/prism/node.rb#10504
+ sig { returns(T.nilable(Symbol)) }
+ def name; end
+
+ # attr_reader name_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#10507
+ sig { returns(T.nilable(Prism::Location)) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10559
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10510
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10590
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10600
+ def type; end
+ end
+end
+
+# Represents using a lambda literal (not the lambda method call).
+#
+# ->(value) { value * 2 }
+# ^^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#10609
+class Prism::LambdaNode < ::Prism::Node
+ # def initialize: (locals: Array[Symbol], locals_body_index: Integer, operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> void
+ #
+ # @return [LambdaNode] a new instance of LambdaNode
+ #
+ # source://prism//lib/prism/node.rb#10632
+ sig do
+ params(
+ locals: T::Array[Symbol],
+ locals_body_index: Integer,
+ operator_loc: Prism::Location,
+ opening_loc: Prism::Location,
+ closing_loc: Prism::Location,
+ parameters: T.nilable(Prism::Node),
+ body: T.nilable(Prism::Node),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(locals, locals_body_index, operator_loc, opening_loc, closing_loc, parameters, body, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#10644
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader body: Node?
+ #
+ # source://prism//lib/prism/node.rb#10629
+ sig { returns(T.nilable(Prism::Node)) }
+ def body; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10649
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10699
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10623
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#10662
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10654
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> LambdaNode
+ #
+ # source://prism//lib/prism/node.rb#10667
+ sig { params(params: T.untyped).returns(Prism::LambdaNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10649
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#10684
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10704
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader locals: Array[Symbol]
+ #
+ # source://prism//lib/prism/node.rb#10611
+ sig { returns(T::Array[Symbol]) }
+ def locals; end
+
+ # attr_reader locals_body_index: Integer
+ #
+ # source://prism//lib/prism/node.rb#10614
+ sig { returns(Integer) }
+ def locals_body_index; end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10694
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10620
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10689
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10617
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader parameters: Node?
+ #
+ # source://prism//lib/prism/node.rb#10626
+ sig { returns(T.nilable(Prism::Node)) }
+ def parameters; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10740
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10750
+ def type; end
+ end
+end
+
+# This class is responsible for lexing the source using prism and then
+# converting those tokens to be compatible with Ripper. In the vast majority
+# of cases, this is a one-to-one mapping of the token type. Everything else
+# generally lines up. However, there are a few cases that require special
+# handling.
+#
+# source://prism//lib/prism/lex_compat.rb#11
+class Prism::LexCompat
+ # @return [LexCompat] a new instance of LexCompat
+ #
+ # source://prism//lib/prism/lex_compat.rb#599
+ def initialize(source, **options); end
+
+ # Returns the value of attribute options.
+ #
+ # source://prism//lib/prism/lex_compat.rb#597
+ def options; end
+
+ # source://prism//lib/prism/lex_compat.rb#604
+ def result; end
+
+ # Returns the value of attribute source.
+ #
+ # source://prism//lib/prism/lex_compat.rb#597
+ def source; end
+end
+
+# Ripper doesn't include the rest of the token in the event, so we need to
+# trim it down to just the content on the first line when comparing.
+#
+# source://prism//lib/prism/lex_compat.rb#210
+class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token
+ # source://prism//lib/prism/lex_compat.rb#211
+ def ==(other); end
+end
+
+# A heredoc in this case is a list of tokens that belong to the body of the
+# heredoc that should be appended onto the list of tokens when the heredoc
+# closes.
+#
+# source://prism//lib/prism/lex_compat.rb#271
+module Prism::LexCompat::Heredoc
+ class << self
+ # Here we will split between the two types of heredocs and return the
+ # object that will store their tokens.
+ #
+ # source://prism//lib/prism/lex_compat.rb#583
+ def build(opening); end
+ end
+end
+
+# Dash heredocs are a little more complicated. They are a list of tokens
+# that need to be split on "\\\n" to mimic Ripper's behavior. We also need
+# to keep track of the state that the heredoc was opened in.
+#
+# source://prism//lib/prism/lex_compat.rb#295
+class Prism::LexCompat::Heredoc::DashHeredoc
+ # @return [DashHeredoc] a new instance of DashHeredoc
+ #
+ # source://prism//lib/prism/lex_compat.rb#298
+ def initialize(split); end
+
+ # source://prism//lib/prism/lex_compat.rb#303
+ def <<(token); end
+
+ # source://prism//lib/prism/lex_compat.rb#296
+ def split; end
+
+ # source://prism//lib/prism/lex_compat.rb#307
+ def to_a; end
+
+ # source://prism//lib/prism/lex_compat.rb#296
+ def tokens; end
+end
+
+# Heredocs that are dedenting heredocs are a little more complicated.
+# Ripper outputs on_ignored_sp tokens for the whitespace that is being
+# removed from the output. prism only modifies the node itself and keeps
+# the token the same. This simplifies prism, but makes comparing against
+# Ripper much harder because there is a length mismatch.
+#
+# Fortunately, we already have to pull out the heredoc tokens in order to
+# insert them into the stream in the correct order. As such, we can do
+# some extra manipulation on the tokens to make them match Ripper's
+# output by mirroring the dedent logic that Ripper uses.
+#
+# source://prism//lib/prism/lex_compat.rb#354
+class Prism::LexCompat::Heredoc::DedentingHeredoc
+ # @return [DedentingHeredoc] a new instance of DedentingHeredoc
+ #
+ # source://prism//lib/prism/lex_compat.rb#359
+ def initialize; end
+
+ # As tokens are coming in, we track the minimum amount of common leading
+ # whitespace on plain string content tokens. This allows us to later
+ # remove that amount of whitespace from the beginning of each line.
+ #
+ # source://prism//lib/prism/lex_compat.rb#370
+ def <<(token); end
+
+ # Returns the value of attribute dedent.
+ #
+ # source://prism//lib/prism/lex_compat.rb#357
+ def dedent; end
+
+ # Returns the value of attribute dedent_next.
+ #
+ # source://prism//lib/prism/lex_compat.rb#357
+ def dedent_next; end
+
+ # Returns the value of attribute embexpr_balance.
+ #
+ # source://prism//lib/prism/lex_compat.rb#357
+ def embexpr_balance; end
+
+ # source://prism//lib/prism/lex_compat.rb#407
+ def to_a; end
+
+ # Returns the value of attribute tokens.
+ #
+ # source://prism//lib/prism/lex_compat.rb#357
+ def tokens; end
+end
+
+# source://prism//lib/prism/lex_compat.rb#355
+Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer)
+
+# Heredocs that are no dash or tilde heredocs are just a list of tokens.
+# We need to keep them around so that we can insert them in the correct
+# order back into the token stream and set the state of the last token to
+# the state that the heredoc was opened in.
+#
+# source://prism//lib/prism/lex_compat.rb#276
+class Prism::LexCompat::Heredoc::PlainHeredoc
+ # @return [PlainHeredoc] a new instance of PlainHeredoc
+ #
+ # source://prism//lib/prism/lex_compat.rb#279
+ def initialize; end
+
+ # source://prism//lib/prism/lex_compat.rb#283
+ def <<(token); end
+
+ # source://prism//lib/prism/lex_compat.rb#287
+ def to_a; end
+
+ # source://prism//lib/prism/lex_compat.rb#277
+ def tokens; end
+end
+
+# Ident tokens for the most part are exactly the same, except sometimes we
+# know an ident is a local when ripper doesn't (when they are introduced
+# through named captures in regular expressions). In that case we don't
+# compare the state.
+#
+# source://prism//lib/prism/lex_compat.rb#228
+class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token
+ # source://prism//lib/prism/lex_compat.rb#229
+ def ==(other); end
+end
+
+# Tokens where state should be ignored
+# used for :on_comment, :on_heredoc_end, :on_embexpr_end
+#
+# source://prism//lib/prism/lex_compat.rb#218
+class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token
+ # source://prism//lib/prism/lex_compat.rb#219
+ def ==(other); end
+end
+
+# Ignored newlines can occasionally have a LABEL state attached to them, so
+# we compare the state differently here.
+#
+# source://prism//lib/prism/lex_compat.rb#239
+class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token
+ # source://prism//lib/prism/lex_compat.rb#240
+ def ==(other); end
+end
+
+# If we have an identifier that follows a method name like:
+#
+# def foo bar
+#
+# then Ripper will mark bar as END|LABEL if there is a local in a parent
+# scope named bar because it hasn't pushed the local table yet. We do this
+# more accurately, so we need to allow comparing against both END and
+# END|LABEL.
+#
+# source://prism//lib/prism/lex_compat.rb#259
+class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token
+ # source://prism//lib/prism/lex_compat.rb#260
+ def ==(other); end
+end
+
+# This is a mapping of prism token types to Ripper token types. This is a
+# many-to-one mapping because we split up our token types, whereas Ripper
+# tends to group them.
+#
+# source://prism//lib/prism/lex_compat.rb#15
+Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash)
+
+# When we produce tokens, we produce the same arrays that Ripper does.
+# However, we add a couple of convenience methods onto them to make them a
+# little easier to work with. We delegate all other methods to the array.
+#
+# source://prism//lib/prism/lex_compat.rb#186
+class Prism::LexCompat::Token < ::SimpleDelegator
+ # The type of the token.
+ #
+ # source://prism//lib/prism/lex_compat.rb#193
+ def event; end
+
+ # The location of the token in the source.
+ #
+ # source://prism//lib/prism/lex_compat.rb#188
+ def location; end
+
+ # The state of the lexer when this token was produced.
+ #
+ # source://prism//lib/prism/lex_compat.rb#203
+ def state; end
+
+ # The slice of the source that this token represents.
+ #
+ # source://prism//lib/prism/lex_compat.rb#198
+ def value; end
+end
+
+# This is a class that wraps the Ripper lexer to produce almost exactly the
+# same tokens.
+#
+# source://prism//lib/prism/lex_compat.rb#852
+class Prism::LexRipper
+ # @return [LexRipper] a new instance of LexRipper
+ #
+ # source://prism//lib/prism/lex_compat.rb#855
+ def initialize(source); end
+
+ # source://prism//lib/prism/lex_compat.rb#859
+ def result; end
+
+ # source://prism//lib/prism/lex_compat.rb#853
+ def source; end
+end
+
+# Represents the use of the `&&=` operator for assignment to a local variable.
+#
+# target &&= value
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#10759
+class Prism::LocalVariableAndWriteNode < ::Prism::Node
+ # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void
+ #
+ # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#10776
+ sig do
+ params(
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ name: Symbol,
+ depth: Integer,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name_loc, operator_loc, value, name, depth, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#10786
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10791
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#10801
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10796
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> LocalVariableAndWriteNode
+ #
+ # source://prism//lib/prism/node.rb#10806
+ sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10791
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#10821
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader depth: Integer
+ #
+ # source://prism//lib/prism/node.rb#10773
+ sig { returns(Integer) }
+ def depth; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10831
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#10770
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10761
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#10826
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10764
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10856
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#10767
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10866
+ def type; end
+ end
+end
+
+# Represents assigning to a local variable using an operator that isn't `=`.
+#
+# target += value
+# ^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#10875
+class Prism::LocalVariableOperatorWriteNode < ::Prism::Node
+ # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void
+ #
+ # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#10895
+ sig do
+ params(
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ name: Symbol,
+ operator: Symbol,
+ depth: Integer,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name_loc, operator_loc, value, name, operator, depth, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#10906
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10911
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#10921
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#10916
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> LocalVariableOperatorWriteNode
+ #
+ # source://prism//lib/prism/node.rb#10926
+ sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#10911
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#10942
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader depth: Integer
+ #
+ # source://prism//lib/prism/node.rb#10892
+ sig { returns(Integer) }
+ def depth; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#10947
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#10886
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10877
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # attr_reader operator: Symbol
+ #
+ # source://prism//lib/prism/node.rb#10889
+ sig { returns(Symbol) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10880
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10973
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#10883
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#10983
+ def type; end
+ end
+end
+
+# Represents the use of the `||=` operator for assignment to a local variable.
+#
+# target ||= value
+# ^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#10992
+class Prism::LocalVariableOrWriteNode < ::Prism::Node
+ # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void
+ #
+ # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#11009
+ sig do
+ params(
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ name: Symbol,
+ depth: Integer,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name_loc, operator_loc, value, name, depth, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11019
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11024
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11034
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11029
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> LocalVariableOrWriteNode
+ #
+ # source://prism//lib/prism/node.rb#11039
+ sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11024
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11054
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader depth: Integer
+ #
+ # source://prism//lib/prism/node.rb#11006
+ sig { returns(Integer) }
+ def depth; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11064
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#11003
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10994
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#11059
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#10997
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11089
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#11000
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11099
+ def type; end
+ end
+end
+
+# Represents reading a local variable. Note that this requires that a local
+# variable of the same name has already been written to in the same scope,
+# otherwise it is parsed as a method call.
+#
+# foo
+# ^^^
+#
+# source://prism//lib/prism/node.rb#11110
+class Prism::LocalVariableReadNode < ::Prism::Node
+ # def initialize: (name: Symbol, depth: Integer, location: Location) -> void
+ #
+ # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode
+ #
+ # source://prism//lib/prism/node.rb#11118
+ sig { params(name: Symbol, depth: Integer, location: Prism::Location).void }
+ def initialize(name, depth, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11125
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11130
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11140
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11135
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> LocalVariableReadNode
+ #
+ # source://prism//lib/prism/node.rb#11145
+ sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11130
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11157
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader depth: Integer
+ #
+ # source://prism//lib/prism/node.rb#11115
+ sig { returns(Integer) }
+ def depth; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11162
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#11112
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11183
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11193
+ def type; end
+ end
+end
+
+# Represents writing to a local variable in a context that doesn't have an explicit value.
+#
+# foo, bar = baz
+# ^^^ ^^^
+#
+# source://prism//lib/prism/node.rb#11202
+class Prism::LocalVariableTargetNode < ::Prism::Node
+ # def initialize: (name: Symbol, depth: Integer, location: Location) -> void
+ #
+ # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode
+ #
+ # source://prism//lib/prism/node.rb#11210
+ sig { params(name: Symbol, depth: Integer, location: Prism::Location).void }
+ def initialize(name, depth, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11217
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11222
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11232
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11227
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> LocalVariableTargetNode
+ #
+ # source://prism//lib/prism/node.rb#11237
+ sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11222
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11249
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader depth: Integer
+ #
+ # source://prism//lib/prism/node.rb#11207
+ sig { returns(Integer) }
+ def depth; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11254
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#11204
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11275
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11285
+ def type; end
+ end
+end
+
+# Represents writing to a local variable.
+#
+# foo = 1
+# ^^^^^^^
+#
+# source://prism//lib/prism/node.rb#11294
+class Prism::LocalVariableWriteNode < ::Prism::Node
+ # def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode
+ #
+ # source://prism//lib/prism/node.rb#11311
+ sig do
+ params(
+ name: Symbol,
+ depth: Integer,
+ name_loc: Prism::Location,
+ value: Prism::Node,
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, depth, name_loc, value, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11321
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11326
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11336
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11331
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> LocalVariableWriteNode
+ #
+ # source://prism//lib/prism/node.rb#11341
+ sig { params(params: T.untyped).returns(Prism::LocalVariableWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11326
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11356
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader depth: Integer
+ #
+ # source://prism//lib/prism/node.rb#11299
+ sig { returns(Integer) }
+ def depth; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11366
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#11296
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11302
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#11361
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11308
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11391
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#11305
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11401
+ def type; end
+ end
+end
+
+# This represents a location in the source.
+#
+# source://prism//lib/prism/parse_result.rb#91
+class Prism::Location
+ # Create a new location object with the given source, start byte offset, and
+ # byte length.
+ #
+ # @return [Location] a new instance of Location
+ #
+ # source://prism//lib/prism/parse_result.rb#108
+ sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void }
+ def initialize(source, start_offset, length); end
+
+ # Returns true if the given other location is equal to this location.
+ #
+ # source://prism//lib/prism/parse_result.rb#202
+ def ==(other); end
+
+ # The list of comments attached to this location
+ #
+ # source://prism//lib/prism/parse_result.rb#104
+ sig { returns(T::Array[Prism::Comment]) }
+ def comments; end
+
+ # Create a new location object with the given options.
+ #
+ # source://prism//lib/prism/parse_result.rb#116
+ sig { params(options: T.untyped).returns(Prism::Location) }
+ def copy(**options); end
+
+ # Implement the hash pattern matching interface for Location.
+ #
+ # source://prism//lib/prism/parse_result.rb#192
+ def deconstruct_keys(keys); end
+
+ # The column number in characters where this location ends from the start of
+ # the line.
+ #
+ # source://prism//lib/prism/parse_result.rb#187
+ def end_character_column; end
+
+ # The character offset from the beginning of the source where this location
+ # ends.
+ #
+ # source://prism//lib/prism/parse_result.rb#147
+ def end_character_offset; end
+
+ # The column number in bytes where this location ends from the start of the
+ # line.
+ #
+ # source://prism//lib/prism/parse_result.rb#181
+ sig { returns(Integer) }
+ def end_column; end
+
+ # The line number where this location ends.
+ #
+ # source://prism//lib/prism/parse_result.rb#163
+ sig { returns(Integer) }
+ def end_line; end
+
+ # The byte offset from the beginning of the source where this location ends.
+ #
+ # source://prism//lib/prism/parse_result.rb#141
+ sig { returns(Integer) }
+ def end_offset; end
+
+ # Returns a string representation of this location.
+ #
+ # source://prism//lib/prism/parse_result.rb#125
+ def inspect; end
+
+ # Returns a new location that stretches from this location to the given
+ # other location. Raises an error if this location is not before the other
+ # location or if they don't share the same source.
+ #
+ # source://prism//lib/prism/parse_result.rb#211
+ def join(other); end
+
+ # The length of this location in bytes.
+ #
+ # source://prism//lib/prism/parse_result.rb#101
+ def length; end
+
+ # Implement the pretty print interface for Location.
+ #
+ # source://prism//lib/prism/parse_result.rb#197
+ def pretty_print(q); end
+
+ # The source code that this location represents.
+ #
+ # source://prism//lib/prism/parse_result.rb#130
+ sig { returns(String) }
+ def slice; end
+
+ # The column number in characters where this location ends from the start of
+ # the line.
+ #
+ # source://prism//lib/prism/parse_result.rb#175
+ def start_character_column; end
+
+ # The character offset from the beginning of the source where this location
+ # starts.
+ #
+ # source://prism//lib/prism/parse_result.rb#136
+ def start_character_offset; end
+
+ # The column number in bytes where this location starts from the start of
+ # the line.
+ #
+ # source://prism//lib/prism/parse_result.rb#169
+ sig { returns(Integer) }
+ def start_column; end
+
+ # The line number where this location starts.
+ #
+ # source://prism//lib/prism/parse_result.rb#152
+ sig { returns(Integer) }
+ def start_line; end
+
+ # The content of the line where this location starts before this location.
+ #
+ # source://prism//lib/prism/parse_result.rb#157
+ def start_line_slice; end
+
+ # The byte offset from the beginning of the source where this location
+ # starts.
+ #
+ # source://prism//lib/prism/parse_result.rb#98
+ sig { returns(Integer) }
+ def start_offset; end
+
+ protected
+
+ # Returns the value of attribute source.
+ #
+ # source://prism//lib/prism/parse_result.rb#94
+ def source; end
+
+ class << self
+ # Returns a null location that does not correspond to a source and points to
+ # the beginning of the file. Useful for when you want a location object but
+ # do not care where it points.
+ #
+ # source://prism//lib/prism/parse_result.rb#221
+ def null; end
+ end
+end
+
+# Flags for while and until loop nodes.
+#
+# source://prism//lib/prism/node.rb#17331
+module Prism::LoopFlags; end
+
+# a loop after a begin statement, so the body is executed first before the condition
+#
+# source://prism//lib/prism/node.rb#17333
+Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer)
+
+# This represents a magic comment that was encountered during parsing.
+#
+# source://prism//lib/prism/parse_result.rb#273
+class Prism::MagicComment
+ # Create a new magic comment object with the given key and value locations.
+ #
+ # @return [MagicComment] a new instance of MagicComment
+ #
+ # source://prism//lib/prism/parse_result.rb#281
+ def initialize(key_loc, value_loc); end
+
+ # Implement the hash pattern matching interface for MagicComment.
+ #
+ # source://prism//lib/prism/parse_result.rb#297
+ def deconstruct_keys(keys); end
+
+ # Returns a string representation of this magic comment.
+ #
+ # source://prism//lib/prism/parse_result.rb#302
+ def inspect; end
+
+ # Returns the key of the magic comment by slicing it from the source code.
+ #
+ # source://prism//lib/prism/parse_result.rb#287
+ def key; end
+
+ # A Location object representing the location of the key in the source.
+ #
+ # source://prism//lib/prism/parse_result.rb#275
+ def key_loc; end
+
+ # Returns the value of the magic comment by slicing it from the source code.
+ #
+ # source://prism//lib/prism/parse_result.rb#292
+ def value; end
+
+ # A Location object representing the location of the value in the source.
+ #
+ # source://prism//lib/prism/parse_result.rb#278
+ def value_loc; end
+end
+
+# Represents a regular expression literal used in the predicate of a
+# conditional to implicitly match against the last line read by an IO
+# object.
+#
+# if /foo/i then end
+# ^^^^^^
+#
+# source://prism//lib/prism/node.rb#11412
+class Prism::MatchLastLineNode < ::Prism::Node
+ include ::Prism::RegularExpressionOptions
+
+ # def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
+ #
+ # @return [MatchLastLineNode] a new instance of MatchLastLineNode
+ #
+ # source://prism//lib/prism/node.rb#11429
+ sig do
+ params(
+ flags: Integer,
+ opening_loc: Prism::Location,
+ content_loc: Prism::Location,
+ closing_loc: Prism::Location,
+ unescaped: String,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11439
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def ascii_8bit?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11504
+ sig { returns(T::Boolean) }
+ def ascii_8bit?; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11444
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#11544
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11423
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11454
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11449
+ def compact_child_nodes; end
+
+ # def content: () -> String
+ #
+ # source://prism//lib/prism/node.rb#11539
+ sig { returns(String) }
+ def content; end
+
+ # attr_reader content_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11420
+ sig { returns(Prism::Location) }
+ def content_loc; end
+
+ # def copy: (**params) -> MatchLastLineNode
+ #
+ # source://prism//lib/prism/node.rb#11459
+ sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11444
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11474
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def euc_jp?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11499
+ sig { returns(T::Boolean) }
+ def euc_jp?; end
+
+ # def extended?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11484
+ sig { returns(T::Boolean) }
+ def extended?; end
+
+ # def forced_binary_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11524
+ sig { returns(T::Boolean) }
+ def forced_binary_encoding?; end
+
+ # def forced_us_ascii_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11529
+ sig { returns(T::Boolean) }
+ def forced_us_ascii_encoding?; end
+
+ # def forced_utf8_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11519
+ sig { returns(T::Boolean) }
+ def forced_utf8_encoding?; end
+
+ # def ignore_case?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11479
+ sig { returns(T::Boolean) }
+ def ignore_case?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11549
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def multi_line?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11489
+ sig { returns(T::Boolean) }
+ def multi_line?; end
+
+ # def once?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11494
+ sig { returns(T::Boolean) }
+ def once?; end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#11534
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11417
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11574
+ def type; end
+
+ # attr_reader unescaped: String
+ #
+ # source://prism//lib/prism/node.rb#11426
+ sig { returns(String) }
+ def unescaped; end
+
+ # def utf_8?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11514
+ sig { returns(T::Boolean) }
+ def utf_8?; end
+
+ # def windows_31j?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#11509
+ sig { returns(T::Boolean) }
+ def windows_31j?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#11414
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11584
+ def type; end
+ end
+end
+
+# Represents the use of the modifier `in` operator.
+#
+# foo in bar
+# ^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#11593
+class Prism::MatchPredicateNode < ::Prism::Node
+ # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [MatchPredicateNode] a new instance of MatchPredicateNode
+ #
+ # source://prism//lib/prism/node.rb#11604
+ sig do
+ params(
+ value: Prism::Node,
+ pattern: Prism::Node,
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(value, pattern, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11612
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11617
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11627
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11622
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> MatchPredicateNode
+ #
+ # source://prism//lib/prism/node.rb#11632
+ sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11617
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11645
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11655
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#11650
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11601
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader pattern: Node
+ #
+ # source://prism//lib/prism/node.rb#11598
+ sig { returns(Prism::Node) }
+ def pattern; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11679
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#11595
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11689
+ def type; end
+ end
+end
+
+# Represents the use of the `=>` operator.
+#
+# foo => bar
+# ^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#11698
+class Prism::MatchRequiredNode < ::Prism::Node
+ # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [MatchRequiredNode] a new instance of MatchRequiredNode
+ #
+ # source://prism//lib/prism/node.rb#11709
+ sig do
+ params(
+ value: Prism::Node,
+ pattern: Prism::Node,
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(value, pattern, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11717
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11722
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11732
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11727
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> MatchRequiredNode
+ #
+ # source://prism//lib/prism/node.rb#11737
+ sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11722
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11750
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11760
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#11755
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11706
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader pattern: Node
+ #
+ # source://prism//lib/prism/node.rb#11703
+ sig { returns(Prism::Node) }
+ def pattern; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11784
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#11700
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11794
+ def type; end
+ end
+end
+
+# Represents writing local variables using a regular expression match with
+# named capture groups.
+#
+# /(?bar)/ =~ baz
+# ^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#11804
+class Prism::MatchWriteNode < ::Prism::Node
+ # def initialize: (call: CallNode, targets: Array[Node], location: Location) -> void
+ #
+ # @return [MatchWriteNode] a new instance of MatchWriteNode
+ #
+ # source://prism//lib/prism/node.rb#11812
+ sig { params(call: Prism::CallNode, targets: T::Array[Prism::Node], location: Prism::Location).void }
+ def initialize(call, targets, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11819
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader call: CallNode
+ #
+ # source://prism//lib/prism/node.rb#11806
+ sig { returns(Prism::CallNode) }
+ def call; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11824
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11834
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11829
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> MatchWriteNode
+ #
+ # source://prism//lib/prism/node.rb#11839
+ sig { params(params: T.untyped).returns(Prism::MatchWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11824
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11851
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11856
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader targets: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11809
+ sig { returns(T::Array[Prism::Node]) }
+ def targets; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11878
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11888
+ def type; end
+ end
+end
+
+# Represents a node that is missing from the source and results in a syntax
+# error.
+#
+# source://prism//lib/prism/node.rb#11895
+class Prism::MissingNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [MissingNode] a new instance of MissingNode
+ #
+ # source://prism//lib/prism/node.rb#11897
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#11902
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11907
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#11917
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#11912
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> MissingNode
+ #
+ # source://prism//lib/prism/node.rb#11922
+ sig { params(params: T.untyped).returns(Prism::MissingNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#11907
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#11932
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#11937
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11956
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#11966
+ def type; end
+ end
+end
+
+# Represents a module declaration involving the `module` keyword.
+#
+# module Foo end
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#11975
+class Prism::ModuleNode < ::Prism::Node
+ # def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void
+ #
+ # @return [ModuleNode] a new instance of ModuleNode
+ #
+ # source://prism//lib/prism/node.rb#11995
+ sig do
+ params(
+ locals: T::Array[Symbol],
+ module_keyword_loc: Prism::Location,
+ constant_path: Prism::Node,
+ body: T.nilable(Prism::Node),
+ end_keyword_loc: Prism::Location,
+ name: Symbol,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12006
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader body: Node?
+ #
+ # source://prism//lib/prism/node.rb#11986
+ sig { returns(T.nilable(Prism::Node)) }
+ def body; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12011
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12024
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12016
+ def compact_child_nodes; end
+
+ # attr_reader constant_path: Node
+ #
+ # source://prism//lib/prism/node.rb#11983
+ sig { returns(Prism::Node) }
+ def constant_path; end
+
+ # def copy: (**params) -> ModuleNode
+ #
+ # source://prism//lib/prism/node.rb#12029
+ sig { params(params: T.untyped).returns(Prism::ModuleNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12011
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12045
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def end_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#12055
+ sig { returns(String) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11989
+ sig { returns(Prism::Location) }
+ def end_keyword_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12060
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader locals: Array[Symbol]
+ #
+ # source://prism//lib/prism/node.rb#11977
+ sig { returns(T::Array[Symbol]) }
+ def locals; end
+
+ # def module_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#12050
+ sig { returns(String) }
+ def module_keyword; end
+
+ # attr_reader module_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#11980
+ sig { returns(Prism::Location) }
+ def module_keyword_loc; end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#11992
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12091
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12101
+ def type; end
+ end
+end
+
+# Represents a multi-target expression.
+#
+# a, (b, c) = 1, 2, 3
+# ^^^^^^
+#
+# source://prism//lib/prism/node.rb#12110
+class Prism::MultiTargetNode < ::Prism::Node
+ # def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void
+ #
+ # @return [MultiTargetNode] a new instance of MultiTargetNode
+ #
+ # source://prism//lib/prism/node.rb#12127
+ sig do
+ params(
+ lefts: T::Array[Prism::Node],
+ rest: T.nilable(Prism::Node),
+ rights: T::Array[Prism::Node],
+ lparen_loc: T.nilable(Prism::Location),
+ rparen_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(lefts, rest, rights, lparen_loc, rparen_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12137
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12142
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12156
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12147
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> MultiTargetNode
+ #
+ # source://prism//lib/prism/node.rb#12161
+ sig { params(params: T.untyped).returns(Prism::MultiTargetNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12142
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12176
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12191
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader lefts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12112
+ sig { returns(T::Array[Prism::Node]) }
+ def lefts; end
+
+ # def lparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#12181
+ sig { returns(T.nilable(String)) }
+ def lparen; end
+
+ # attr_reader lparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#12121
+ sig { returns(T.nilable(Prism::Location)) }
+ def lparen_loc; end
+
+ # attr_reader rest: Node?
+ #
+ # source://prism//lib/prism/node.rb#12115
+ sig { returns(T.nilable(Prism::Node)) }
+ def rest; end
+
+ # attr_reader rights: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12118
+ sig { returns(T::Array[Prism::Node]) }
+ def rights; end
+
+ # def rparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#12186
+ sig { returns(T.nilable(String)) }
+ def rparen; end
+
+ # attr_reader rparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#12124
+ sig { returns(T.nilable(Prism::Location)) }
+ def rparen_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12220
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12230
+ def type; end
+ end
+end
+
+# Represents a write to a multi-target expression.
+#
+# a, b, c = 1, 2, 3
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#12239
+class Prism::MultiWriteNode < ::Prism::Node
+ # def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [MultiWriteNode] a new instance of MultiWriteNode
+ #
+ # source://prism//lib/prism/node.rb#12262
+ sig do
+ params(
+ lefts: T::Array[Prism::Node],
+ rest: T.nilable(Prism::Node),
+ rights: T::Array[Prism::Node],
+ lparen_loc: T.nilable(Prism::Location),
+ rparen_loc: T.nilable(Prism::Location),
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12274
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12279
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12294
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12284
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> MultiWriteNode
+ #
+ # source://prism//lib/prism/node.rb#12299
+ sig { params(params: T.untyped).returns(Prism::MultiWriteNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12279
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12316
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12336
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader lefts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12241
+ sig { returns(T::Array[Prism::Node]) }
+ def lefts; end
+
+ # def lparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#12321
+ sig { returns(T.nilable(String)) }
+ def lparen; end
+
+ # attr_reader lparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#12250
+ sig { returns(T.nilable(Prism::Location)) }
+ def lparen_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#12331
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#12256
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader rest: Node?
+ #
+ # source://prism//lib/prism/node.rb#12244
+ sig { returns(T.nilable(Prism::Node)) }
+ def rest; end
+
+ # attr_reader rights: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12247
+ sig { returns(T::Array[Prism::Node]) }
+ def rights; end
+
+ # def rparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#12326
+ sig { returns(T.nilable(String)) }
+ def rparen; end
+
+ # attr_reader rparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#12253
+ sig { returns(T.nilable(Prism::Location)) }
+ def rparen_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12368
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#12259
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12378
+ def type; end
+ end
+end
+
+# This visitor walks through the tree and copies each node as it is being
+# visited. This is useful for consumers that want to mutate the tree, as you
+# can change subtrees in place without effecting the rest of the tree.
+#
+# source://prism//lib/prism/mutation_compiler.rb#12
+class Prism::MutationCompiler < ::Prism::Compiler
+ # Copy a AliasGlobalVariableNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#14
+ def visit_alias_global_variable_node(node); end
+
+ # Copy a AliasMethodNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#19
+ def visit_alias_method_node(node); end
+
+ # Copy a AlternationPatternNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#24
+ def visit_alternation_pattern_node(node); end
+
+ # Copy a AndNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#29
+ def visit_and_node(node); end
+
+ # Copy a ArgumentsNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#34
+ def visit_arguments_node(node); end
+
+ # Copy a ArrayNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#39
+ def visit_array_node(node); end
+
+ # Copy a ArrayPatternNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#44
+ def visit_array_pattern_node(node); end
+
+ # Copy a AssocNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#49
+ def visit_assoc_node(node); end
+
+ # Copy a AssocSplatNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#54
+ def visit_assoc_splat_node(node); end
+
+ # Copy a BackReferenceReadNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#59
+ def visit_back_reference_read_node(node); end
+
+ # Copy a BeginNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#64
+ def visit_begin_node(node); end
+
+ # Copy a BlockArgumentNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#69
+ def visit_block_argument_node(node); end
+
+ # Copy a BlockLocalVariableNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#74
+ def visit_block_local_variable_node(node); end
+
+ # Copy a BlockNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#79
+ def visit_block_node(node); end
+
+ # Copy a BlockParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#84
+ def visit_block_parameter_node(node); end
+
+ # Copy a BlockParametersNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#89
+ def visit_block_parameters_node(node); end
+
+ # Copy a BreakNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#94
+ def visit_break_node(node); end
+
+ # Copy a CallAndWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#99
+ def visit_call_and_write_node(node); end
+
+ # Copy a CallNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#104
+ def visit_call_node(node); end
+
+ # Copy a CallOperatorWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#109
+ def visit_call_operator_write_node(node); end
+
+ # Copy a CallOrWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#114
+ def visit_call_or_write_node(node); end
+
+ # Copy a CallTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#119
+ def visit_call_target_node(node); end
+
+ # Copy a CapturePatternNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#124
+ def visit_capture_pattern_node(node); end
+
+ # Copy a CaseMatchNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#129
+ def visit_case_match_node(node); end
+
+ # Copy a CaseNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#134
+ def visit_case_node(node); end
+
+ # Copy a ClassNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#139
+ def visit_class_node(node); end
+
+ # Copy a ClassVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#144
+ def visit_class_variable_and_write_node(node); end
+
+ # Copy a ClassVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#149
+ def visit_class_variable_operator_write_node(node); end
+
+ # Copy a ClassVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#154
+ def visit_class_variable_or_write_node(node); end
+
+ # Copy a ClassVariableReadNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#159
+ def visit_class_variable_read_node(node); end
+
+ # Copy a ClassVariableTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#164
+ def visit_class_variable_target_node(node); end
+
+ # Copy a ClassVariableWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#169
+ def visit_class_variable_write_node(node); end
+
+ # Copy a ConstantAndWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#174
+ def visit_constant_and_write_node(node); end
+
+ # Copy a ConstantOperatorWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#179
+ def visit_constant_operator_write_node(node); end
+
+ # Copy a ConstantOrWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#184
+ def visit_constant_or_write_node(node); end
+
+ # Copy a ConstantPathAndWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#189
+ def visit_constant_path_and_write_node(node); end
+
+ # Copy a ConstantPathNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#194
+ def visit_constant_path_node(node); end
+
+ # Copy a ConstantPathOperatorWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#199
+ def visit_constant_path_operator_write_node(node); end
+
+ # Copy a ConstantPathOrWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#204
+ def visit_constant_path_or_write_node(node); end
+
+ # Copy a ConstantPathTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#209
+ def visit_constant_path_target_node(node); end
+
+ # Copy a ConstantPathWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#214
+ def visit_constant_path_write_node(node); end
+
+ # Copy a ConstantReadNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#219
+ def visit_constant_read_node(node); end
+
+ # Copy a ConstantTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#224
+ def visit_constant_target_node(node); end
+
+ # Copy a ConstantWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#229
+ def visit_constant_write_node(node); end
+
+ # Copy a DefNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#234
+ def visit_def_node(node); end
+
+ # Copy a DefinedNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#239
+ def visit_defined_node(node); end
+
+ # Copy a ElseNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#244
+ def visit_else_node(node); end
+
+ # Copy a EmbeddedStatementsNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#249
+ def visit_embedded_statements_node(node); end
+
+ # Copy a EmbeddedVariableNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#254
+ def visit_embedded_variable_node(node); end
+
+ # Copy a EnsureNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#259
+ def visit_ensure_node(node); end
+
+ # Copy a FalseNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#264
+ def visit_false_node(node); end
+
+ # Copy a FindPatternNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#269
+ def visit_find_pattern_node(node); end
+
+ # Copy a FlipFlopNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#274
+ def visit_flip_flop_node(node); end
+
+ # Copy a FloatNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#279
+ def visit_float_node(node); end
+
+ # Copy a ForNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#284
+ def visit_for_node(node); end
+
+ # Copy a ForwardingArgumentsNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#289
+ def visit_forwarding_arguments_node(node); end
+
+ # Copy a ForwardingParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#294
+ def visit_forwarding_parameter_node(node); end
+
+ # Copy a ForwardingSuperNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#299
+ def visit_forwarding_super_node(node); end
+
+ # Copy a GlobalVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#304
+ def visit_global_variable_and_write_node(node); end
+
+ # Copy a GlobalVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#309
+ def visit_global_variable_operator_write_node(node); end
+
+ # Copy a GlobalVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#314
+ def visit_global_variable_or_write_node(node); end
+
+ # Copy a GlobalVariableReadNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#319
+ def visit_global_variable_read_node(node); end
+
+ # Copy a GlobalVariableTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#324
+ def visit_global_variable_target_node(node); end
+
+ # Copy a GlobalVariableWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#329
+ def visit_global_variable_write_node(node); end
+
+ # Copy a HashNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#334
+ def visit_hash_node(node); end
+
+ # Copy a HashPatternNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#339
+ def visit_hash_pattern_node(node); end
+
+ # Copy a IfNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#344
+ def visit_if_node(node); end
+
+ # Copy a ImaginaryNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#349
+ def visit_imaginary_node(node); end
+
+ # Copy a ImplicitNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#354
+ def visit_implicit_node(node); end
+
+ # Copy a ImplicitRestNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#359
+ def visit_implicit_rest_node(node); end
+
+ # Copy a InNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#364
+ def visit_in_node(node); end
+
+ # Copy a IndexAndWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#369
+ def visit_index_and_write_node(node); end
+
+ # Copy a IndexOperatorWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#374
+ def visit_index_operator_write_node(node); end
+
+ # Copy a IndexOrWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#379
+ def visit_index_or_write_node(node); end
+
+ # Copy a IndexTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#384
+ def visit_index_target_node(node); end
+
+ # Copy a InstanceVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#389
+ def visit_instance_variable_and_write_node(node); end
+
+ # Copy a InstanceVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#394
+ def visit_instance_variable_operator_write_node(node); end
+
+ # Copy a InstanceVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#399
+ def visit_instance_variable_or_write_node(node); end
+
+ # Copy a InstanceVariableReadNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#404
+ def visit_instance_variable_read_node(node); end
+
+ # Copy a InstanceVariableTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#409
+ def visit_instance_variable_target_node(node); end
+
+ # Copy a InstanceVariableWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#414
+ def visit_instance_variable_write_node(node); end
+
+ # Copy a IntegerNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#419
+ def visit_integer_node(node); end
+
+ # Copy a InterpolatedMatchLastLineNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#424
+ def visit_interpolated_match_last_line_node(node); end
+
+ # Copy a InterpolatedRegularExpressionNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#429
+ def visit_interpolated_regular_expression_node(node); end
+
+ # Copy a InterpolatedStringNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#434
+ def visit_interpolated_string_node(node); end
+
+ # Copy a InterpolatedSymbolNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#439
+ def visit_interpolated_symbol_node(node); end
+
+ # Copy a InterpolatedXStringNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#444
+ def visit_interpolated_x_string_node(node); end
+
+ # Copy a KeywordHashNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#449
+ def visit_keyword_hash_node(node); end
+
+ # Copy a KeywordRestParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#454
+ def visit_keyword_rest_parameter_node(node); end
+
+ # Copy a LambdaNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#459
+ def visit_lambda_node(node); end
+
+ # Copy a LocalVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#464
+ def visit_local_variable_and_write_node(node); end
+
+ # Copy a LocalVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#469
+ def visit_local_variable_operator_write_node(node); end
+
+ # Copy a LocalVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#474
+ def visit_local_variable_or_write_node(node); end
+
+ # Copy a LocalVariableReadNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#479
+ def visit_local_variable_read_node(node); end
+
+ # Copy a LocalVariableTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#484
+ def visit_local_variable_target_node(node); end
+
+ # Copy a LocalVariableWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#489
+ def visit_local_variable_write_node(node); end
+
+ # Copy a MatchLastLineNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#494
+ def visit_match_last_line_node(node); end
+
+ # Copy a MatchPredicateNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#499
+ def visit_match_predicate_node(node); end
+
+ # Copy a MatchRequiredNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#504
+ def visit_match_required_node(node); end
+
+ # Copy a MatchWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#509
+ def visit_match_write_node(node); end
+
+ # Copy a MissingNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#514
+ def visit_missing_node(node); end
+
+ # Copy a ModuleNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#519
+ def visit_module_node(node); end
+
+ # Copy a MultiTargetNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#524
+ def visit_multi_target_node(node); end
+
+ # Copy a MultiWriteNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#529
+ def visit_multi_write_node(node); end
+
+ # Copy a NextNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#534
+ def visit_next_node(node); end
+
+ # Copy a NilNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#539
+ def visit_nil_node(node); end
+
+ # Copy a NoKeywordsParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#544
+ def visit_no_keywords_parameter_node(node); end
+
+ # Copy a NumberedParametersNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#549
+ def visit_numbered_parameters_node(node); end
+
+ # Copy a NumberedReferenceReadNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#554
+ def visit_numbered_reference_read_node(node); end
+
+ # Copy a OptionalKeywordParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#559
+ def visit_optional_keyword_parameter_node(node); end
+
+ # Copy a OptionalParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#564
+ def visit_optional_parameter_node(node); end
+
+ # Copy a OrNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#569
+ def visit_or_node(node); end
+
+ # Copy a ParametersNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#574
+ def visit_parameters_node(node); end
+
+ # Copy a ParenthesesNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#579
+ def visit_parentheses_node(node); end
+
+ # Copy a PinnedExpressionNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#584
+ def visit_pinned_expression_node(node); end
+
+ # Copy a PinnedVariableNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#589
+ def visit_pinned_variable_node(node); end
+
+ # Copy a PostExecutionNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#594
+ def visit_post_execution_node(node); end
+
+ # Copy a PreExecutionNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#599
+ def visit_pre_execution_node(node); end
+
+ # Copy a ProgramNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#604
+ def visit_program_node(node); end
+
+ # Copy a RangeNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#609
+ def visit_range_node(node); end
+
+ # Copy a RationalNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#614
+ def visit_rational_node(node); end
+
+ # Copy a RedoNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#619
+ def visit_redo_node(node); end
+
+ # Copy a RegularExpressionNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#624
+ def visit_regular_expression_node(node); end
+
+ # Copy a RequiredKeywordParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#629
+ def visit_required_keyword_parameter_node(node); end
+
+ # Copy a RequiredParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#634
+ def visit_required_parameter_node(node); end
+
+ # Copy a RescueModifierNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#639
+ def visit_rescue_modifier_node(node); end
+
+ # Copy a RescueNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#644
+ def visit_rescue_node(node); end
+
+ # Copy a RestParameterNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#649
+ def visit_rest_parameter_node(node); end
+
+ # Copy a RetryNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#654
+ def visit_retry_node(node); end
+
+ # Copy a ReturnNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#659
+ def visit_return_node(node); end
+
+ # Copy a SelfNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#664
+ def visit_self_node(node); end
+
+ # Copy a SingletonClassNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#669
+ def visit_singleton_class_node(node); end
+
+ # Copy a SourceEncodingNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#674
+ def visit_source_encoding_node(node); end
+
+ # Copy a SourceFileNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#679
+ def visit_source_file_node(node); end
+
+ # Copy a SourceLineNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#684
+ def visit_source_line_node(node); end
+
+ # Copy a SplatNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#689
+ def visit_splat_node(node); end
+
+ # Copy a StatementsNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#694
+ def visit_statements_node(node); end
+
+ # Copy a StringNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#699
+ def visit_string_node(node); end
+
+ # Copy a SuperNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#704
+ def visit_super_node(node); end
+
+ # Copy a SymbolNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#709
+ def visit_symbol_node(node); end
+
+ # Copy a TrueNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#714
+ def visit_true_node(node); end
+
+ # Copy a UndefNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#719
+ def visit_undef_node(node); end
+
+ # Copy a UnlessNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#724
+ def visit_unless_node(node); end
+
+ # Copy a UntilNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#729
+ def visit_until_node(node); end
+
+ # Copy a WhenNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#734
+ def visit_when_node(node); end
+
+ # Copy a WhileNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#739
+ def visit_while_node(node); end
+
+ # Copy a XStringNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#744
+ def visit_x_string_node(node); end
+
+ # Copy a YieldNode node
+ #
+ # source://prism//lib/prism/mutation_compiler.rb#749
+ def visit_yield_node(node); end
+end
+
+# Represents the use of the `next` keyword.
+#
+# next 1
+# ^^^^^^
+#
+# source://prism//lib/prism/node.rb#12387
+class Prism::NextNode < ::Prism::Node
+ # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void
+ #
+ # @return [NextNode] a new instance of NextNode
+ #
+ # source://prism//lib/prism/node.rb#12395
+ sig do
+ params(
+ arguments: T.nilable(Prism::ArgumentsNode),
+ keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(arguments, keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12402
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#12389
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12407
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12419
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12412
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> NextNode
+ #
+ # source://prism//lib/prism/node.rb#12424
+ sig { params(params: T.untyped).returns(Prism::NextNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12407
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12436
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12446
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#12441
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#12392
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12472
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12482
+ def type; end
+ end
+end
+
+# Represents the use of the `nil` keyword.
+#
+# nil
+# ^^^
+#
+# source://prism//lib/prism/node.rb#12491
+class Prism::NilNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [NilNode] a new instance of NilNode
+ #
+ # source://prism//lib/prism/node.rb#12493
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12498
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12503
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12513
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12508
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> NilNode
+ #
+ # source://prism//lib/prism/node.rb#12518
+ sig { params(params: T.untyped).returns(Prism::NilNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12503
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12528
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12533
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12552
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12562
+ def type; end
+ end
+end
+
+# Represents the use of `**nil` inside method arguments.
+#
+# def a(**nil)
+# ^^^^^
+# end
+#
+# source://prism//lib/prism/node.rb#12572
+class Prism::NoKeywordsParameterNode < ::Prism::Node
+ # def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void
+ #
+ # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode
+ #
+ # source://prism//lib/prism/node.rb#12580
+ sig { params(operator_loc: Prism::Location, keyword_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(operator_loc, keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12587
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12592
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12602
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12597
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> NoKeywordsParameterNode
+ #
+ # source://prism//lib/prism/node.rb#12607
+ sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12592
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12619
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12634
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#12629
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#12577
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#12624
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#12574
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12655
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12665
+ def type; end
+ end
+end
+
+# This represents a node in the tree. It is the parent class of all of the
+# various node types.
+#
+# source://prism//lib/prism/node.rb#11
+class Prism::Node
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # A Location instance that represents the location of this node in the
+ # source.
+ #
+ # source://prism//lib/prism/node.rb#14
+ sig { returns(Prism::Location) }
+ def location; end
+
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#16
+ def newline?; end
+
+ # Similar to inspect, but respects the current level of indentation given by
+ # the pretty print object.
+ #
+ # source://prism//lib/prism/node.rb#35
+ def pretty_print(q); end
+
+ # source://prism//lib/prism/node.rb#20
+ def set_newline_flag(newline_marked); end
+
+ # Slice the location of the node from the source.
+ #
+ # source://prism//lib/prism/node.rb#29
+ sig { returns(String) }
+ def slice; end
+
+ # Convert this node into a graphviz dot graph string.
+ #
+ # source://prism//lib/prism/node.rb#43
+ sig { returns(String) }
+ def to_dot; end
+end
+
+# This object is responsible for generating the output for the inspect method
+# implementations of child nodes.
+#
+# source://prism//lib/prism/node_inspector.rb#6
+class Prism::NodeInspector
+ # @return [NodeInspector] a new instance of NodeInspector
+ #
+ # source://prism//lib/prism/node_inspector.rb#9
+ def initialize(prefix = T.unsafe(nil)); end
+
+ # Appends a line to the output with the current prefix.
+ #
+ # source://prism//lib/prism/node_inspector.rb#15
+ sig { params(line: String).void }
+ def <<(line); end
+
+ # Returns a new inspector that can be used to inspect a child node.
+ #
+ # source://prism//lib/prism/node_inspector.rb#59
+ sig { params(append: String).returns(Prism::NodeInspector) }
+ def child_inspector(append); end
+
+ # Generates a string that represents a child node.
+ #
+ # source://prism//lib/prism/node_inspector.rb#54
+ sig { params(node: Prism::Node, append: String).returns(String) }
+ def child_node(node, append); end
+
+ # This generates a string that is used as the header of the inspect output
+ # for any given node.
+ #
+ # source://prism//lib/prism/node_inspector.rb#21
+ # This generates a string that is used as the header of the inspect output
+ sig { params(node: Prism::Node).returns(String) }
+ def header(node); end
+
+ # Generates a string that represents a list of nodes. It handles properly
+ # using the box drawing characters to make the output look nice.
+ #
+ # source://prism//lib/prism/node_inspector.rb#31
+ # Generates a string that represents a list of nodes. It handles properly
+ sig { params(prefix: String, nodes: T::Array[Prism::Node]).returns(String) }
+ def list(prefix, nodes); end
+
+ # Generates a string that represents a location field on a node.
+ #
+ # source://prism//lib/prism/node_inspector.rb#45
+ sig { params(value: Prism::Location).returns(String) }
+ def location(value); end
+
+ # source://prism//lib/prism/node_inspector.rb#7
+ sig { returns(String) }
+ def output; end
+
+ # source://prism//lib/prism/node_inspector.rb#7
+ sig { returns(String) }
+ def prefix; end
+
+ # Returns the output as a string.
+ #
+ # source://prism//lib/prism/node_inspector.rb#64
+ sig { returns(String) }
+ def to_str; end
+end
+
+# Represents an implicit set of parameters through the use of numbered
+# parameters within a block or lambda.
+#
+# -> { _1 + _2 }
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#12675
+class Prism::NumberedParametersNode < ::Prism::Node
+ # def initialize: (maximum: Integer, location: Location) -> void
+ #
+ # @return [NumberedParametersNode] a new instance of NumberedParametersNode
+ #
+ # source://prism//lib/prism/node.rb#12680
+ sig { params(maximum: Integer, location: Prism::Location).void }
+ def initialize(maximum, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12686
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12691
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12701
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12696
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> NumberedParametersNode
+ #
+ # source://prism//lib/prism/node.rb#12706
+ sig { params(params: T.untyped).returns(Prism::NumberedParametersNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12691
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12717
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12722
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader maximum: Integer
+ #
+ # source://prism//lib/prism/node.rb#12677
+ sig { returns(Integer) }
+ def maximum; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12742
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12752
+ def type; end
+ end
+end
+
+# Represents reading a numbered reference to a capture in the previous match.
+#
+# $1
+# ^^
+#
+# source://prism//lib/prism/node.rb#12761
+class Prism::NumberedReferenceReadNode < ::Prism::Node
+ # def initialize: (number: Integer, location: Location) -> void
+ #
+ # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode
+ #
+ # source://prism//lib/prism/node.rb#12766
+ sig { params(number: Integer, location: Prism::Location).void }
+ def initialize(number, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12772
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12777
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12787
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12782
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> NumberedReferenceReadNode
+ #
+ # source://prism//lib/prism/node.rb#12792
+ sig { params(params: T.untyped).returns(Prism::NumberedReferenceReadNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12777
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12803
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12808
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader number: Integer
+ #
+ # source://prism//lib/prism/node.rb#12763
+ sig { returns(Integer) }
+ def number; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12828
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12838
+ def type; end
+ end
+end
+
+# Represents an optional keyword parameter to a method, block, or lambda definition.
+#
+# def a(b: 1)
+# ^^^^
+# end
+#
+# source://prism//lib/prism/node.rb#12848
+class Prism::OptionalKeywordParameterNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode
+ #
+ # source://prism//lib/prism/node.rb#12859
+ sig { params(name: Symbol, name_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
+ def initialize(name, name_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12867
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12872
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12882
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12877
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> OptionalKeywordParameterNode
+ #
+ # source://prism//lib/prism/node.rb#12887
+ sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12872
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#12900
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#12905
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#12850
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#12853
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12928
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#12856
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#12938
+ def type; end
+ end
+end
+
+# Represents an optional parameter to a method, block, or lambda definition.
+#
+# def a(b = 1)
+# ^^^^^
+# end
+#
+# source://prism//lib/prism/node.rb#12948
+class Prism::OptionalParameterNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void
+ #
+ # @return [OptionalParameterNode] a new instance of OptionalParameterNode
+ #
+ # source://prism//lib/prism/node.rb#12962
+ sig do
+ params(
+ name: Symbol,
+ name_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ value: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, value, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#12971
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12976
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#12986
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#12981
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> OptionalParameterNode
+ #
+ # source://prism//lib/prism/node.rb#12991
+ sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#12976
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13005
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13015
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#12950
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#12953
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13010
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#12956
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13039
+ def type; end
+
+ # attr_reader value: Node
+ #
+ # source://prism//lib/prism/node.rb#12959
+ sig { returns(Prism::Node) }
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13049
+ def type; end
+ end
+end
+
+# Represents the use of the `||` operator or the `or` keyword.
+#
+# left or right
+# ^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#13058
+class Prism::OrNode < ::Prism::Node
+ # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [OrNode] a new instance of OrNode
+ #
+ # source://prism//lib/prism/node.rb#13069
+ sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(left, right, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#13077
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13082
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#13092
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13087
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> OrNode
+ #
+ # source://prism//lib/prism/node.rb#13097
+ sig { params(params: T.untyped).returns(Prism::OrNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13082
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13110
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13120
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader left: Node
+ #
+ # source://prism//lib/prism/node.rb#13060
+ sig { returns(Prism::Node) }
+ def left; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13115
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13066
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader right: Node
+ #
+ # source://prism//lib/prism/node.rb#13063
+ sig { returns(Prism::Node) }
+ def right; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13144
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13154
+ def type; end
+ end
+end
+
+# A parser for the pack template language.
+#
+# source://prism//lib/prism/pack.rb#5
+module Prism::Pack
+ class << self
+ def parse(_arg0, _arg1, _arg2); end
+ end
+end
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::BER = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol)
+
+# A directive in the pack template language.
+#
+# source://prism//lib/prism/pack.rb#59
+class Prism::Pack::Directive
+ # Initialize a new directive with the given values.
+ #
+ # @return [Directive] a new instance of Directive
+ #
+ # source://prism//lib/prism/pack.rb#88
+ def initialize(version, variant, source, type, signed, endian, size, length_type, length); end
+
+ # Provide a human-readable description of the directive.
+ #
+ # source://prism//lib/prism/pack.rb#130
+ def describe; end
+
+ # The type of endianness of the directive.
+ #
+ # source://prism//lib/prism/pack.rb#76
+ def endian; end
+
+ # The length of this directive (used for integers).
+ #
+ # source://prism//lib/prism/pack.rb#85
+ def length; end
+
+ # The length type of this directive (used for integers).
+ #
+ # source://prism//lib/prism/pack.rb#82
+ def length_type; end
+
+ # The type of signedness of the directive.
+ #
+ # source://prism//lib/prism/pack.rb#73
+ def signed; end
+
+ # The size of the directive.
+ #
+ # source://prism//lib/prism/pack.rb#79
+ def size; end
+
+ # A byteslice of the source string that this directive represents.
+ #
+ # source://prism//lib/prism/pack.rb#67
+ def source; end
+
+ # The type of the directive.
+ #
+ # source://prism//lib/prism/pack.rb#70
+ def type; end
+
+ # A symbol representing whether or not we are packing or unpacking.
+ #
+ # source://prism//lib/prism/pack.rb#64
+ def variant; end
+
+ # A symbol representing the version of Ruby.
+ #
+ # source://prism//lib/prism/pack.rb#61
+ def version; end
+end
+
+# The descriptions of the various types of endianness.
+#
+# source://prism//lib/prism/pack.rb#101
+Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash)
+
+# The descriptions of the various types of signedness.
+#
+# source://prism//lib/prism/pack.rb#110
+Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash)
+
+# The descriptions of the various types of sizes.
+#
+# source://prism//lib/prism/pack.rb#117
+Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol)
+
+# The result of parsing a pack template.
+#
+# source://prism//lib/prism/pack.rb#195
+class Prism::Pack::Format
+ # Create a new Format with the given directives and encoding.
+ #
+ # @return [Format] a new instance of Format
+ #
+ # source://prism//lib/prism/pack.rb#203
+ def initialize(directives, encoding); end
+
+ # Provide a human-readable description of the format.
+ #
+ # source://prism//lib/prism/pack.rb#209
+ def describe; end
+
+ # A list of the directives in the template.
+ #
+ # source://prism//lib/prism/pack.rb#197
+ def directives; end
+
+ # The encoding of the template.
+ #
+ # source://prism//lib/prism/pack.rb#200
+ def encoding; end
+end
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol)
+
+# source://prism//lib/prism/pack.rb#55
+Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol)
+
+# Represents the list of parameters on a method, block, or lambda definition.
+#
+# def a(b, c, d)
+# ^^^^^^^
+# end
+#
+# source://prism//lib/prism/node.rb#13164
+class Prism::ParametersNode < ::Prism::Node
+ # def initialize: (requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void
+ #
+ # @return [ParametersNode] a new instance of ParametersNode
+ #
+ # source://prism//lib/prism/node.rb#13187
+ sig do
+ params(
+ requireds: T::Array[Prism::Node],
+ optionals: T::Array[Prism::Node],
+ rest: T.nilable(Prism::Node),
+ posts: T::Array[Prism::Node],
+ keywords: T::Array[Prism::Node],
+ keyword_rest: T.nilable(Prism::Node),
+ block: T.nilable(Prism::BlockParameterNode),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#13199
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader block: BlockParameterNode?
+ #
+ # source://prism//lib/prism/node.rb#13184
+ sig { returns(T.nilable(Prism::BlockParameterNode)) }
+ def block; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13204
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#13222
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13209
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ParametersNode
+ #
+ # source://prism//lib/prism/node.rb#13227
+ sig { params(params: T.untyped).returns(Prism::ParametersNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13204
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13244
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13249
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader keyword_rest: Node?
+ #
+ # source://prism//lib/prism/node.rb#13181
+ sig { returns(T.nilable(Prism::Node)) }
+ def keyword_rest; end
+
+ # attr_reader keywords: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13178
+ sig { returns(T::Array[Prism::Node]) }
+ def keywords; end
+
+ # attr_reader optionals: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13169
+ sig { returns(T::Array[Prism::Node]) }
+ def optionals; end
+
+ # attr_reader posts: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13175
+ sig { returns(T::Array[Prism::Node]) }
+ def posts; end
+
+ # attr_reader requireds: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13166
+ sig { returns(T::Array[Prism::Node]) }
+ def requireds; end
+
+ # attr_reader rest: Node?
+ #
+ # source://prism//lib/prism/node.rb#13172
+ sig { returns(T.nilable(Prism::Node)) }
+ def rest; end
+
+ # Mirrors the Method#parameters method.
+ #
+ # source://prism//lib/prism/node_ext.rb#149
+ def signature; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13290
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13300
+ def type; end
+ end
+end
+
+# Represents a parenthesized expression
+#
+# (10 + 34)
+# ^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#13309
+class Prism::ParenthesesNode < ::Prism::Node
+ # def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void
+ #
+ # @return [ParenthesesNode] a new instance of ParenthesesNode
+ #
+ # source://prism//lib/prism/node.rb#13320
+ sig do
+ params(
+ body: T.nilable(Prism::Node),
+ opening_loc: Prism::Location,
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(body, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#13328
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader body: Node?
+ #
+ # source://prism//lib/prism/node.rb#13311
+ sig { returns(T.nilable(Prism::Node)) }
+ def body; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13337
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13377
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13317
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#13349
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13342
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ParenthesesNode
+ #
+ # source://prism//lib/prism/node.rb#13354
+ sig { params(params: T.untyped).returns(Prism::ParenthesesNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13337
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13367
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13382
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13372
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13314
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # source://prism//lib/prism/node.rb#13332
+ def set_newline_flag(newline_marked); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13409
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13419
+ def type; end
+ end
+end
+
+# This represents an error that was encountered during parsing.
+#
+# source://prism//lib/prism/parse_result.rb#308
+class Prism::ParseError
+ # Create a new error object with the given message and location.
+ #
+ # @return [ParseError] a new instance of ParseError
+ #
+ # source://prism//lib/prism/parse_result.rb#316
+ def initialize(message, location); end
+
+ # Implement the hash pattern matching interface for ParseError.
+ #
+ # source://prism//lib/prism/parse_result.rb#322
+ def deconstruct_keys(keys); end
+
+ # Returns a string representation of this error.
+ #
+ # source://prism//lib/prism/parse_result.rb#327
+ def inspect; end
+
+ # A Location object representing the location of this error in the source.
+ #
+ # source://prism//lib/prism/parse_result.rb#313
+ sig { returns(Prism::Location) }
+ def location; end
+
+ # The message associated with this error.
+ #
+ # source://prism//lib/prism/parse_result.rb#310
+ sig { returns(String) }
+ def message; end
+end
+
+# This represents the result of a call to ::parse or ::parse_file. It contains
+# the AST, any comments that were encounters, and any errors that were
+# encountered.
+#
+# source://prism//lib/prism/parse_result.rb#360
+class Prism::ParseResult
+ # Create a new parse result object with the given values.
+ #
+ # @return [ParseResult] a new instance of ParseResult
+ #
+ # source://prism//lib/prism/parse_result.rb#387
+ def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end
+
+ # Attach the list of comments to their respective locations in the tree.
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#173
+ def attach_comments!; end
+
+ # The list of comments that were encountered during parsing.
+ #
+ # source://prism//lib/prism/parse_result.rb#367
+ sig { returns(T::Array[Prism::Comment]) }
+ def comments; end
+
+ # An optional location that represents the location of the content after the
+ # __END__ marker. This content is loaded into the DATA constant when the
+ # file being parsed is the main file being executed.
+ #
+ # source://prism//lib/prism/parse_result.rb#375
+ def data_loc; end
+
+ # Implement the hash pattern matching interface for ParseResult.
+ #
+ # source://prism//lib/prism/parse_result.rb#398
+ def deconstruct_keys(keys); end
+
+ # The list of errors that were generated during parsing.
+ #
+ # source://prism//lib/prism/parse_result.rb#378
+ sig { returns(T::Array[Prism::ParseError]) }
+ def errors; end
+
+ # Returns true if there were errors during parsing and false if there were
+ # not.
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/parse_result.rb#410
+ def failure?; end
+
+ # The list of magic comments that were encountered during parsing.
+ #
+ # source://prism//lib/prism/parse_result.rb#370
+ def magic_comments; end
+
+ # Walk the tree and mark nodes that are on a new line.
+ #
+ # source://prism//lib/prism/parse_result/newlines.rb#60
+ def mark_newlines!; end
+
+ # A Source instance that represents the source code that was parsed.
+ #
+ # source://prism//lib/prism/parse_result.rb#384
+ sig { returns(Prism::Source) }
+ def source; end
+
+ # Returns true if there were no errors during parsing and false if there
+ # were.
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/parse_result.rb#404
+ def success?; end
+
+ # The value that was generated by parsing. Normally this holds the AST, but
+ # it can sometimes how a list of tokens or other results passed back from
+ # the parser.
+ #
+ # source://prism//lib/prism/parse_result.rb#364
+ sig { returns(Prism::ProgramNode) }
+ def value; end
+
+ # The list of warnings that were generated during parsing.
+ #
+ # source://prism//lib/prism/parse_result.rb#381
+ sig { returns(T::Array[Prism::ParseWarning]) }
+ def warnings; end
+end
+
+# When we've parsed the source, we have both the syntax tree and the list of
+# comments that we found in the source. This class is responsible for
+# walking the tree and finding the nearest location to attach each comment.
+#
+# It does this by first finding the nearest locations to each comment.
+# Locations can either come from nodes directly or from location fields on
+# nodes. For example, a `ClassNode` has an overall location encompassing the
+# entire class, but it also has a location for the `class` keyword.
+#
+# Once the nearest locations are found, it determines which one to attach
+# to. If it's a trailing comment (a comment on the same line as other source
+# code), it will favor attaching to the nearest location that occurs before
+# the comment. Otherwise it will favor attaching to the nearest location
+# that is after the comment.
+#
+# source://prism//lib/prism/parse_result/comments.rb#19
+class Prism::ParseResult::Comments
+ # Create a new Comments object that will attach comments to the given
+ # parse result.
+ #
+ # @return [Comments] a new instance of Comments
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#78
+ def initialize(parse_result); end
+
+ # Attach the comments to their respective locations in the tree by
+ # mutating the parse result.
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#84
+ def attach!; end
+
+ # The parse result that we are attaching comments to.
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#74
+ def parse_result; end
+
+ private
+
+ # Responsible for finding the nearest targets to the given comment within
+ # the context of the given encapsulating node.
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#103
+ def nearest_targets(node, comment); end
+end
+
+# A target for attaching comments that is based on a location field on a
+# node. For example, the `end` token of a ClassNode.
+#
+# source://prism//lib/prism/parse_result/comments.rb#49
+class Prism::ParseResult::Comments::LocationTarget
+ # @return [LocationTarget] a new instance of LocationTarget
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#52
+ def initialize(location); end
+
+ # source://prism//lib/prism/parse_result/comments.rb#68
+ def <<(comment); end
+
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#64
+ def encloses?(comment); end
+
+ # source://prism//lib/prism/parse_result/comments.rb#60
+ def end_offset; end
+
+ # source://prism//lib/prism/parse_result/comments.rb#50
+ def location; end
+
+ # source://prism//lib/prism/parse_result/comments.rb#56
+ def start_offset; end
+end
+
+# A target for attaching comments that is based on a specific node's
+# location.
+#
+# source://prism//lib/prism/parse_result/comments.rb#22
+class Prism::ParseResult::Comments::NodeTarget
+ # @return [NodeTarget] a new instance of NodeTarget
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#25
+ def initialize(node); end
+
+ # source://prism//lib/prism/parse_result/comments.rb#42
+ def <<(comment); end
+
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/parse_result/comments.rb#37
+ def encloses?(comment); end
+
+ # source://prism//lib/prism/parse_result/comments.rb#33
+ def end_offset; end
+
+ # source://prism//lib/prism/parse_result/comments.rb#23
+ def node; end
+
+ # source://prism//lib/prism/parse_result/comments.rb#29
+ def start_offset; end
+end
+
+# The :line tracepoint event gets fired whenever the Ruby VM encounters an
+# expression on a new line. The types of expressions that can trigger this
+# event are:
+#
+# * if statements
+# * unless statements
+# * nodes that are children of statements lists
+#
+# In order to keep track of the newlines, we have a list of offsets that
+# come back from the parser. We assign these offsets to the first nodes that
+# we find in the tree that are on those lines.
+#
+# Note that the logic in this file should be kept in sync with the Java
+# MarkNewlinesVisitor, since that visitor is responsible for marking the
+# newlines for JRuby/TruffleRuby.
+#
+# source://prism//lib/prism/parse_result/newlines.rb#20
+class Prism::ParseResult::Newlines < ::Prism::Visitor
+ # Create a new Newlines visitor with the given newline offsets.
+ #
+ # @return [Newlines] a new instance of Newlines
+ #
+ # source://prism//lib/prism/parse_result/newlines.rb#22
+ def initialize(newline_marked); end
+
+ # Permit block/lambda nodes to mark newlines within themselves.
+ #
+ # source://prism//lib/prism/parse_result/newlines.rb#27
+ def visit_block_node(node); end
+
+ # Mark if/unless nodes as newlines.
+ #
+ # source://prism//lib/prism/parse_result/newlines.rb#41
+ def visit_if_node(node); end
+
+ # Permit block/lambda nodes to mark newlines within themselves.
+ #
+ # source://prism//lib/prism/parse_result/newlines.rb#27
+ def visit_lambda_node(node); end
+
+ # Permit statements lists to mark newlines within themselves.
+ #
+ # source://prism//lib/prism/parse_result/newlines.rb#49
+ def visit_statements_node(node); end
+
+ # Mark if/unless nodes as newlines.
+ #
+ # source://prism//lib/prism/parse_result/newlines.rb#41
+ def visit_unless_node(node); end
+end
+
+# This represents a warning that was encountered during parsing.
+#
+# source://prism//lib/prism/parse_result.rb#333
+class Prism::ParseWarning
+ # Create a new warning object with the given message and location.
+ #
+ # @return [ParseWarning] a new instance of ParseWarning
+ #
+ # source://prism//lib/prism/parse_result.rb#341
+ def initialize(message, location); end
+
+ # Implement the hash pattern matching interface for ParseWarning.
+ #
+ # source://prism//lib/prism/parse_result.rb#347
+ def deconstruct_keys(keys); end
+
+ # Returns a string representation of this warning.
+ #
+ # source://prism//lib/prism/parse_result.rb#352
+ def inspect; end
+
+ # A Location object representing the location of this warning in the source.
+ #
+ # source://prism//lib/prism/parse_result.rb#338
+ sig { returns(Prism::Location) }
+ def location; end
+
+ # The message associated with this warning.
+ #
+ # source://prism//lib/prism/parse_result.rb#335
+ sig { returns(String) }
+ def message; end
+end
+
+# A pattern is an object that wraps a Ruby pattern matching expression. The
+# expression would normally be passed to an `in` clause within a `case`
+# expression or a rightward assignment expression. For example, in the
+# following snippet:
+#
+# case node
+# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]
+# end
+#
+# the pattern is the ConstantPathNode[...] expression.
+#
+# The pattern gets compiled into an object that responds to #call by running
+# the #compile method. This method itself will run back through Prism to
+# parse the expression into a tree, then walk the tree to generate the
+# necessary callable objects. For example, if you wanted to compile the
+# expression above into a callable, you would:
+#
+# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile
+# callable.call(node)
+#
+# The callable object returned by #compile is guaranteed to respond to #call
+# with a single argument, which is the node to match against. It also is
+# guaranteed to respond to #===, which means it itself can be used in a `case`
+# expression, as in:
+#
+# case node
+# when callable
+# end
+#
+# If the query given to the initializer cannot be compiled into a valid
+# matcher (either because of a syntax error or because it is using syntax we
+# do not yet support) then a Prism::Pattern::CompilationError will be
+# raised.
+#
+# source://prism//lib/prism/pattern.rb#37
+class Prism::Pattern
+ # Create a new pattern with the given query. The query should be a string
+ # containing a Ruby pattern matching expression.
+ #
+ # @return [Pattern] a new instance of Pattern
+ #
+ # source://prism//lib/prism/pattern.rb#63
+ def initialize(query); end
+
+ # Compile the query into a callable object that can be used to match against
+ # nodes.
+ #
+ # source://prism//lib/prism/pattern.rb#70
+ def compile; end
+
+ # The query that this pattern was initialized with.
+ #
+ # source://prism//lib/prism/pattern.rb#59
+ def query; end
+
+ # Scan the given node and all of its children for nodes that match the
+ # pattern. If a block is given, it will be called with each node that
+ # matches the pattern. If no block is given, an enumerator will be returned
+ # that will yield each node that matches the pattern.
+ #
+ # source://prism//lib/prism/pattern.rb#79
+ def scan(root); end
+
+ private
+
+ # Shortcut for combining two procs into one that returns true if both return
+ # true.
+ #
+ # source://prism//lib/prism/pattern.rb#95
+ def combine_and(left, right); end
+
+ # Shortcut for combining two procs into one that returns true if either
+ # returns true.
+ #
+ # source://prism//lib/prism/pattern.rb#101
+ def combine_or(left, right); end
+
+ # in foo | bar
+ #
+ # source://prism//lib/prism/pattern.rb#136
+ def compile_alternation_pattern_node(node); end
+
+ # in [foo, bar, baz]
+ #
+ # source://prism//lib/prism/pattern.rb#111
+ def compile_array_pattern_node(node); end
+
+ # in Prism::ConstantReadNode
+ #
+ # source://prism//lib/prism/pattern.rb#141
+ def compile_constant_path_node(node); end
+
+ # in ConstantReadNode
+ # in String
+ #
+ # source://prism//lib/prism/pattern.rb#153
+ def compile_constant_read_node(node); end
+
+ # Raise an error because the given node is not supported.
+ #
+ # @raise [CompilationError]
+ #
+ # source://prism//lib/prism/pattern.rb#106
+ def compile_error(node); end
+
+ # in InstanceVariableReadNode[name: Symbol]
+ # in { name: Symbol }
+ #
+ # source://prism//lib/prism/pattern.rb#171
+ def compile_hash_pattern_node(node); end
+
+ # in nil
+ #
+ # source://prism//lib/prism/pattern.rb#196
+ def compile_nil_node(node); end
+
+ # Compile any kind of node. Dispatch out to the individual compilation
+ # methods based on the type of node.
+ #
+ # source://prism//lib/prism/pattern.rb#225
+ def compile_node(node); end
+
+ # in /foo/
+ #
+ # source://prism//lib/prism/pattern.rb#201
+ def compile_regular_expression_node(node); end
+
+ # in ""
+ # in "foo"
+ #
+ # source://prism//lib/prism/pattern.rb#209
+ def compile_string_node(node); end
+
+ # in :+
+ # in :foo
+ #
+ # source://prism//lib/prism/pattern.rb#217
+ def compile_symbol_node(node); end
+end
+
+# Raised when the query given to a pattern is either invalid Ruby syntax or
+# is using syntax that we don't yet support.
+#
+# source://prism//lib/prism/pattern.rb#40
+class Prism::Pattern::CompilationError < ::StandardError
+ # Create a new CompilationError with the given representation of the node
+ # that caused the error.
+ #
+ # @return [CompilationError] a new instance of CompilationError
+ #
+ # source://prism//lib/prism/pattern.rb#43
+ def initialize(repr); end
+end
+
+# Represents the use of the `^` operator for pinning an expression in a
+# pattern matching expression.
+#
+# foo in ^(bar)
+# ^^^^^^
+#
+# source://prism//lib/prism/node.rb#13429
+class Prism::PinnedExpressionNode < ::Prism::Node
+ # def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void
+ #
+ # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode
+ #
+ # source://prism//lib/prism/node.rb#13443
+ sig do
+ params(
+ expression: Prism::Node,
+ operator_loc: Prism::Location,
+ lparen_loc: Prism::Location,
+ rparen_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(expression, operator_loc, lparen_loc, rparen_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#13452
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13457
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#13467
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13462
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> PinnedExpressionNode
+ #
+ # source://prism//lib/prism/node.rb#13472
+ sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13457
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13486
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader expression: Node
+ #
+ # source://prism//lib/prism/node.rb#13431
+ sig { returns(Prism::Node) }
+ def expression; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13506
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def lparen: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13496
+ sig { returns(String) }
+ def lparen; end
+
+ # attr_reader lparen_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13437
+ sig { returns(Prism::Location) }
+ def lparen_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13491
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13434
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # def rparen: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13501
+ sig { returns(String) }
+ def rparen; end
+
+ # attr_reader rparen_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13440
+ sig { returns(Prism::Location) }
+ def rparen_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13530
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13540
+ def type; end
+ end
+end
+
+# Represents the use of the `^` operator for pinning a variable in a pattern
+# matching expression.
+#
+# foo in ^bar
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#13550
+class Prism::PinnedVariableNode < ::Prism::Node
+ # def initialize: (variable: Node, operator_loc: Location, location: Location) -> void
+ #
+ # @return [PinnedVariableNode] a new instance of PinnedVariableNode
+ #
+ # source://prism//lib/prism/node.rb#13558
+ sig { params(variable: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(variable, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#13565
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13570
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#13580
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13575
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> PinnedVariableNode
+ #
+ # source://prism//lib/prism/node.rb#13585
+ sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13570
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13597
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13607
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13602
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13555
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13629
+ def type; end
+
+ # attr_reader variable: Node
+ #
+ # source://prism//lib/prism/node.rb#13552
+ sig { returns(Prism::Node) }
+ def variable; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13639
+ def type; end
+ end
+end
+
+# Represents the use of the `END` keyword.
+#
+# END { foo }
+# ^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#13648
+class Prism::PostExecutionNode < ::Prism::Node
+ # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void
+ #
+ # @return [PostExecutionNode] a new instance of PostExecutionNode
+ #
+ # source://prism//lib/prism/node.rb#13662
+ sig do
+ params(
+ statements: T.nilable(Prism::StatementsNode),
+ keyword_loc: Prism::Location,
+ opening_loc: Prism::Location,
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#13671
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13676
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13722
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13659
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#13688
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13681
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> PostExecutionNode
+ #
+ # source://prism//lib/prism/node.rb#13693
+ sig { params(params: T.untyped).returns(Prism::PostExecutionNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13676
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13707
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13727
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13712
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13653
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13717
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13656
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#13650
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13755
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13765
+ def type; end
+ end
+end
+
+# Represents the use of the `BEGIN` keyword.
+#
+# BEGIN { foo }
+# ^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#13774
+class Prism::PreExecutionNode < ::Prism::Node
+ # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void
+ #
+ # @return [PreExecutionNode] a new instance of PreExecutionNode
+ #
+ # source://prism//lib/prism/node.rb#13788
+ sig do
+ params(
+ statements: T.nilable(Prism::StatementsNode),
+ keyword_loc: Prism::Location,
+ opening_loc: Prism::Location,
+ closing_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#13797
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13802
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13848
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13785
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#13814
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13807
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> PreExecutionNode
+ #
+ # source://prism//lib/prism/node.rb#13819
+ sig { params(params: T.untyped).returns(Prism::PreExecutionNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13802
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13833
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13853
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13838
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13779
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#13843
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#13782
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#13776
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13881
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13891
+ def type; end
+ end
+end
+
+# The top level node of any parse tree.
+#
+# source://prism//lib/prism/node.rb#13897
+class Prism::ProgramNode < ::Prism::Node
+ # def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void
+ #
+ # @return [ProgramNode] a new instance of ProgramNode
+ #
+ # source://prism//lib/prism/node.rb#13905
+ sig { params(locals: T::Array[Symbol], statements: Prism::StatementsNode, location: Prism::Location).void }
+ def initialize(locals, statements, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#13912
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13917
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#13927
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#13922
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ProgramNode
+ #
+ # source://prism//lib/prism/node.rb#13932
+ sig { params(params: T.untyped).returns(Prism::ProgramNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#13917
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#13944
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#13949
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader locals: Array[Symbol]
+ #
+ # source://prism//lib/prism/node.rb#13899
+ sig { returns(T::Array[Symbol]) }
+ def locals; end
+
+ # attr_reader statements: StatementsNode
+ #
+ # source://prism//lib/prism/node.rb#13902
+ sig { returns(Prism::StatementsNode) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13971
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#13981
+ def type; end
+ end
+end
+
+# Flags for range and flip-flop nodes.
+#
+# source://prism//lib/prism/node.rb#17337
+module Prism::RangeFlags; end
+
+# ... operator
+#
+# source://prism//lib/prism/node.rb#17339
+Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer)
+
+# Represents the use of the `..` or `...` operators.
+#
+# 1..2
+# ^^^^
+#
+# c if a =~ /left/ ... b =~ /right/
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#13993
+class Prism::RangeNode < ::Prism::Node
+ # def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void
+ #
+ # @return [RangeNode] a new instance of RangeNode
+ #
+ # source://prism//lib/prism/node.rb#14007
+ sig do
+ params(
+ flags: Integer,
+ left: T.nilable(Prism::Node),
+ right: T.nilable(Prism::Node),
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, left, right, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14016
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14021
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14034
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14026
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> RangeNode
+ #
+ # source://prism//lib/prism/node.rb#14039
+ sig { params(params: T.untyped).returns(Prism::RangeNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14021
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14053
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def exclude_end?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14058
+ sig { returns(T::Boolean) }
+ def exclude_end?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14068
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader left: Node?
+ #
+ # source://prism//lib/prism/node.rb#13998
+ sig { returns(T.nilable(Prism::Node)) }
+ def left; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#14063
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#14004
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # attr_reader right: Node?
+ #
+ # source://prism//lib/prism/node.rb#14001
+ sig { returns(T.nilable(Prism::Node)) }
+ def right; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14102
+ def type; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#13995
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14112
+ def type; end
+ end
+end
+
+# Represents a rational number literal.
+#
+# 1.0r
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#14121
+class Prism::RationalNode < ::Prism::Node
+ # def initialize: (numeric: Node, location: Location) -> void
+ #
+ # @return [RationalNode] a new instance of RationalNode
+ #
+ # source://prism//lib/prism/node.rb#14126
+ sig { params(numeric: Prism::Node, location: Prism::Location).void }
+ def initialize(numeric, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14132
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14137
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14147
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14142
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> RationalNode
+ #
+ # source://prism//lib/prism/node.rb#14152
+ sig { params(params: T.untyped).returns(Prism::RationalNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14137
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14163
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14168
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader numeric: Node
+ #
+ # source://prism//lib/prism/node.rb#14123
+ sig { returns(Prism::Node) }
+ def numeric; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14189
+ def type; end
+
+ # Returns the value of the node as a Ruby Rational.
+ #
+ # source://prism//lib/prism/node_ext.rb#83
+ def value; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14199
+ def type; end
+ end
+end
+
+# Represents the use of the `redo` keyword.
+#
+# redo
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#14208
+class Prism::RedoNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [RedoNode] a new instance of RedoNode
+ #
+ # source://prism//lib/prism/node.rb#14210
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14215
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14220
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14230
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14225
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> RedoNode
+ #
+ # source://prism//lib/prism/node.rb#14235
+ sig { params(params: T.untyped).returns(Prism::RedoNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14220
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14245
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14250
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14269
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14279
+ def type; end
+ end
+end
+
+# Flags for regular expression and match last line nodes.
+#
+# source://prism//lib/prism/node.rb#17343
+module Prism::RegularExpressionFlags; end
+
+# n - forces the ASCII-8BIT encoding
+#
+# source://prism//lib/prism/node.rb#17360
+Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer)
+
+# e - forces the EUC-JP encoding
+#
+# source://prism//lib/prism/node.rb#17357
+Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer)
+
+# x - ignores whitespace and allows comments in regular expressions
+#
+# source://prism//lib/prism/node.rb#17348
+Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer)
+
+# internal bytes forced the encoding to binary
+#
+# source://prism//lib/prism/node.rb#17372
+Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# internal bytes forced the encoding to US-ASCII
+#
+# source://prism//lib/prism/node.rb#17375
+Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# internal bytes forced the encoding to UTF-8
+#
+# source://prism//lib/prism/node.rb#17369
+Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# i - ignores the case of characters when matching
+#
+# source://prism//lib/prism/node.rb#17345
+Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer)
+
+# m - allows $ to match the end of lines within strings
+#
+# source://prism//lib/prism/node.rb#17351
+Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer)
+
+# o - only interpolates values into the regular expression once
+#
+# source://prism//lib/prism/node.rb#17354
+Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer)
+
+# u - forces the UTF-8 encoding
+#
+# source://prism//lib/prism/node.rb#17366
+Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer)
+
+# s - forces the Windows-31J encoding
+#
+# source://prism//lib/prism/node.rb#17363
+Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer)
+
+# Represents a regular expression literal with no interpolation.
+#
+# /foo/i
+# ^^^^^^
+#
+# source://prism//lib/prism/node.rb#14288
+class Prism::RegularExpressionNode < ::Prism::Node
+ include ::Prism::RegularExpressionOptions
+
+ # def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
+ #
+ # @return [RegularExpressionNode] a new instance of RegularExpressionNode
+ #
+ # source://prism//lib/prism/node.rb#14305
+ sig do
+ params(
+ flags: Integer,
+ opening_loc: Prism::Location,
+ content_loc: Prism::Location,
+ closing_loc: Prism::Location,
+ unescaped: String,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14315
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def ascii_8bit?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14380
+ sig { returns(T::Boolean) }
+ def ascii_8bit?; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14320
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#14420
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#14299
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14330
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14325
+ def compact_child_nodes; end
+
+ # def content: () -> String
+ #
+ # source://prism//lib/prism/node.rb#14415
+ sig { returns(String) }
+ def content; end
+
+ # attr_reader content_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#14296
+ sig { returns(Prism::Location) }
+ def content_loc; end
+
+ # def copy: (**params) -> RegularExpressionNode
+ #
+ # source://prism//lib/prism/node.rb#14335
+ sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14320
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14350
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def euc_jp?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14375
+ sig { returns(T::Boolean) }
+ def euc_jp?; end
+
+ # def extended?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14360
+ sig { returns(T::Boolean) }
+ def extended?; end
+
+ # def forced_binary_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14400
+ sig { returns(T::Boolean) }
+ def forced_binary_encoding?; end
+
+ # def forced_us_ascii_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14405
+ sig { returns(T::Boolean) }
+ def forced_us_ascii_encoding?; end
+
+ # def forced_utf8_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14395
+ sig { returns(T::Boolean) }
+ def forced_utf8_encoding?; end
+
+ # def ignore_case?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14355
+ sig { returns(T::Boolean) }
+ def ignore_case?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14425
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def multi_line?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14365
+ sig { returns(T::Boolean) }
+ def multi_line?; end
+
+ # def once?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14370
+ sig { returns(T::Boolean) }
+ def once?; end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#14410
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#14293
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14450
+ def type; end
+
+ # attr_reader unescaped: String
+ #
+ # source://prism//lib/prism/node.rb#14302
+ sig { returns(String) }
+ def unescaped; end
+
+ # def utf_8?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14390
+ sig { returns(T::Boolean) }
+ def utf_8?; end
+
+ # def windows_31j?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#14385
+ sig { returns(T::Boolean) }
+ def windows_31j?; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#14290
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14460
+ def type; end
+ end
+end
+
+# source://prism//lib/prism/node_ext.rb#6
+module Prism::RegularExpressionOptions
+ # Returns a numeric value that represents the flags that were used to create
+ # the regular expression.
+ #
+ # source://prism//lib/prism/node_ext.rb#9
+ def options; end
+end
+
+# Represents a required keyword parameter to a method, block, or lambda definition.
+#
+# def a(b: )
+# ^^
+# end
+#
+# source://prism//lib/prism/node.rb#14470
+class Prism::RequiredKeywordParameterNode < ::Prism::Node
+ # def initialize: (name: Symbol, name_loc: Location, location: Location) -> void
+ #
+ # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode
+ #
+ # source://prism//lib/prism/node.rb#14478
+ sig { params(name: Symbol, name_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(name, name_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14485
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14490
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14500
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14495
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> RequiredKeywordParameterNode
+ #
+ # source://prism//lib/prism/node.rb#14505
+ sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14490
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14517
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14522
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#14472
+ sig { returns(Symbol) }
+ def name; end
+
+ # attr_reader name_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#14475
+ sig { returns(Prism::Location) }
+ def name_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14543
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14553
+ def type; end
+ end
+end
+
+# Represents a required parameter to a method, block, or lambda definition.
+#
+# def a(b)
+# ^
+# end
+#
+# source://prism//lib/prism/node.rb#14563
+class Prism::RequiredParameterNode < ::Prism::Node
+ # def initialize: (name: Symbol, location: Location) -> void
+ #
+ # @return [RequiredParameterNode] a new instance of RequiredParameterNode
+ #
+ # source://prism//lib/prism/node.rb#14568
+ sig { params(name: Symbol, location: Prism::Location).void }
+ def initialize(name, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14574
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14579
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14589
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14584
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> RequiredParameterNode
+ #
+ # source://prism//lib/prism/node.rb#14594
+ sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14579
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14605
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14610
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol
+ #
+ # source://prism//lib/prism/node.rb#14565
+ sig { returns(Symbol) }
+ def name; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14630
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14640
+ def type; end
+ end
+end
+
+# Represents an expression modified with a rescue.
+#
+# foo rescue nil
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#14649
+class Prism::RescueModifierNode < ::Prism::Node
+ # def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void
+ #
+ # @return [RescueModifierNode] a new instance of RescueModifierNode
+ #
+ # source://prism//lib/prism/node.rb#14660
+ sig do
+ params(
+ expression: Prism::Node,
+ keyword_loc: Prism::Location,
+ rescue_expression: Prism::Node,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(expression, keyword_loc, rescue_expression, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14668
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14677
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14687
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14682
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> RescueModifierNode
+ #
+ # source://prism//lib/prism/node.rb#14692
+ sig { params(params: T.untyped).returns(Prism::RescueModifierNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14677
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14705
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader expression: Node
+ #
+ # source://prism//lib/prism/node.rb#14651
+ sig { returns(Prism::Node) }
+ def expression; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14715
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#14710
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#14654
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # attr_reader rescue_expression: Node
+ #
+ # source://prism//lib/prism/node.rb#14657
+ sig { returns(Prism::Node) }
+ def rescue_expression; end
+
+ # source://prism//lib/prism/node.rb#14672
+ def set_newline_flag(newline_marked); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14739
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14749
+ def type; end
+ end
+end
+
+# Represents a rescue statement.
+#
+# begin
+# rescue Foo, *splat, Bar => ex
+# foo
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+# end
+#
+# `Foo, *splat, Bar` are in the `exceptions` field.
+# `ex` is in the `exception` field.
+#
+# source://prism//lib/prism/node.rb#14764
+class Prism::RescueNode < ::Prism::Node
+ # def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void
+ #
+ # @return [RescueNode] a new instance of RescueNode
+ #
+ # source://prism//lib/prism/node.rb#14784
+ sig do
+ params(
+ keyword_loc: Prism::Location,
+ exceptions: T::Array[Prism::Node],
+ operator_loc: T.nilable(Prism::Location),
+ reference: T.nilable(Prism::Node),
+ statements: T.nilable(Prism::StatementsNode),
+ consequent: T.nilable(Prism::RescueNode),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14795
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14800
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14815
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14805
+ def compact_child_nodes; end
+
+ # attr_reader consequent: RescueNode?
+ #
+ # source://prism//lib/prism/node.rb#14781
+ sig { returns(T.nilable(Prism::RescueNode)) }
+ def consequent; end
+
+ # def copy: (**params) -> RescueNode
+ #
+ # source://prism//lib/prism/node.rb#14820
+ sig { params(params: T.untyped).returns(Prism::RescueNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14800
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14836
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader exceptions: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14769
+ sig { returns(T::Array[Prism::Node]) }
+ def exceptions; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14851
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#14841
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#14766
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # def operator: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#14846
+ sig { returns(T.nilable(String)) }
+ def operator; end
+
+ # attr_reader operator_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#14772
+ sig { returns(T.nilable(Prism::Location)) }
+ def operator_loc; end
+
+ # attr_reader reference: Node?
+ #
+ # source://prism//lib/prism/node.rb#14775
+ sig { returns(T.nilable(Prism::Node)) }
+ def reference; end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#14778
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14891
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14901
+ def type; end
+ end
+end
+
+# Represents a rest parameter to a method, block, or lambda definition.
+#
+# def a(*b)
+# ^^
+# end
+#
+# source://prism//lib/prism/node.rb#14911
+class Prism::RestParameterNode < ::Prism::Node
+ # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void
+ #
+ # @return [RestParameterNode] a new instance of RestParameterNode
+ #
+ # source://prism//lib/prism/node.rb#14922
+ sig do
+ params(
+ name: T.nilable(Symbol),
+ name_loc: T.nilable(Prism::Location),
+ operator_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(name, name_loc, operator_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#14930
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14935
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#14945
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#14940
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> RestParameterNode
+ #
+ # source://prism//lib/prism/node.rb#14950
+ sig { params(params: T.untyped).returns(Prism::RestParameterNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#14935
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#14963
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#14973
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader name: Symbol?
+ #
+ # source://prism//lib/prism/node.rb#14913
+ sig { returns(T.nilable(Symbol)) }
+ def name; end
+
+ # attr_reader name_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#14916
+ sig { returns(T.nilable(Prism::Location)) }
+ def name_loc; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#14968
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#14919
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#14999
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15009
+ def type; end
+ end
+end
+
+# Represents the use of the `retry` keyword.
+#
+# retry
+# ^^^^^
+#
+# source://prism//lib/prism/node.rb#15018
+class Prism::RetryNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [RetryNode] a new instance of RetryNode
+ #
+ # source://prism//lib/prism/node.rb#15020
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15025
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15030
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15040
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15035
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> RetryNode
+ #
+ # source://prism//lib/prism/node.rb#15045
+ sig { params(params: T.untyped).returns(Prism::RetryNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15030
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15055
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15060
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15079
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15089
+ def type; end
+ end
+end
+
+# Represents the use of the `return` keyword.
+#
+# return 1
+# ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#15098
+class Prism::ReturnNode < ::Prism::Node
+ # def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void
+ #
+ # @return [ReturnNode] a new instance of ReturnNode
+ #
+ # source://prism//lib/prism/node.rb#15106
+ sig do
+ params(
+ keyword_loc: Prism::Location,
+ arguments: T.nilable(Prism::ArgumentsNode),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(keyword_loc, arguments, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15113
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#15103
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15118
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15130
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15123
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> ReturnNode
+ #
+ # source://prism//lib/prism/node.rb#15135
+ sig { params(params: T.untyped).returns(Prism::ReturnNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15118
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15147
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15157
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#15152
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#15100
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15183
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15193
+ def type; end
+ end
+end
+
+# Note: This integration is not finished, and therefore still has many
+# inconsistencies with Ripper. If you'd like to help out, pull requests would
+# be greatly appreciated!
+#
+# This class is meant to provide a compatibility layer between prism and
+# Ripper. It functions by parsing the entire tree first and then walking it
+# and executing each of the Ripper callbacks as it goes.
+#
+# This class is going to necessarily be slower than the native Ripper API. It
+# is meant as a stopgap until developers migrate to using prism. It is also
+# meant as a test harness for the prism parser.
+#
+# To use this class, you treat `Prism::RipperCompat` effectively as you would
+# treat the `Ripper` class.
+#
+# source://prism//lib/prism/ripper_compat.rb#20
+class Prism::RipperCompat < ::Prism::Visitor
+ # Create a new RipperCompat object with the given source.
+ #
+ # @return [RipperCompat] a new instance of RipperCompat
+ #
+ # source://prism//lib/prism/ripper_compat.rb#74
+ def initialize(source); end
+
+ # The current column number of the parser.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#71
+ def column; end
+
+ # True if the parser encountered an error during parsing.
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/ripper_compat.rb#86
+ def error?; end
+
+ # The current line number of the parser.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#68
+ def lineno; end
+
+ # Parse the source and return the result.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#91
+ def parse; end
+
+ # The source that is being parsed.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#65
+ def source; end
+
+ # Visit a CallNode node.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#110
+ def visit_call_node(node); end
+
+ # Visit a FloatNode node.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#123
+ def visit_float_node(node); end
+
+ # Visit a ImaginaryNode node.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#129
+ def visit_imaginary_node(node); end
+
+ # Visit an IntegerNode node.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#135
+ def visit_integer_node(node); end
+
+ # Visit a ProgramNode node.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#155
+ def visit_program_node(node); end
+
+ # Visit a RationalNode node.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#141
+ def visit_rational_node(node); end
+
+ # Visit a StatementsNode node.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#147
+ def visit_statements_node(node); end
+
+ private
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def _dispatch0; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def _dispatch1(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def _dispatch2(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def _dispatch3(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#196
+ def _dispatch4(_, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#197
+ def _dispatch5(_, _, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#198
+ def _dispatch7(_, _, _, _, _, _, _); end
+
+ # This method is responsible for updating lineno and column information
+ # to reflect the current node.
+ #
+ # This method could be drastically improved with some caching on the start
+ # of every line, but for now it's good enough.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#182
+ def bounds(location); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_BEGIN(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_CHAR(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_END(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on___end__(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_alias(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_alias_error(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_aref(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_aref_field(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_arg_ambiguous(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_arg_paren(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_args_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_args_add_block(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_args_add_star(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_args_forward; end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_args_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_array(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#196
+ def on_aryptn(_, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_assign(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_assign_error(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_assoc_new(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_assoc_splat(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_assoclist_from_args(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_backref(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_backtick(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_bare_assoc_hash(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_begin(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_binary(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_block_var(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_blockarg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#196
+ def on_bodystmt(_, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_brace_block(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_break(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_call(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_case(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_class(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_class_name_error(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_comma(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_command(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#196
+ def on_command_call(_, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_comment(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_const(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_const_path_field(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_const_path_ref(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_const_ref(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_cvar(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_def(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_defined(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#197
+ def on_defs(_, _, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_do_block(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_dot2(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_dot3(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_dyna_symbol(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_else(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_elsif(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_embdoc(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_embdoc_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_embdoc_end(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_embexpr_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_embexpr_end(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_embvar(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_ensure(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_excessed_comma; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_fcall(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_field(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_float(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#196
+ def on_fndptn(_, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_for(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_gvar(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_hash(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_heredoc_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_heredoc_dedent(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_heredoc_end(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_hshptn(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_ident(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_if(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_if_mod(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_ifop(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_ignored_nl(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_ignored_sp(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_imaginary(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_in(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_int(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_ivar(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_kw(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_kwrest_param(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_label(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_label_end(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_lambda(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_lbrace(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_lbracket(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_lparen(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_magic_comment(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_massign(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_method_add_arg(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_method_add_block(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_mlhs_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_mlhs_add_post(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_mlhs_add_star(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_mlhs_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_mlhs_paren(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_module(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_mrhs_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_mrhs_add_star(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_mrhs_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_mrhs_new_from_args(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_next(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_nl(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_nokw_param(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_op(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_opassign(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_operator_ambiguous(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_param_error(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#198
+ def on_params(_, _, _, _, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_paren(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_parse_error(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_period(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_program(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_qsymbols_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_qsymbols_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_qsymbols_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_qwords_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_qwords_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_qwords_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_rational(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_rbrace(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_rbracket(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_redo; end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_regexp_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_regexp_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_regexp_end(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_regexp_literal(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_regexp_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#196
+ def on_rescue(_, _, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_rescue_mod(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_rest_param(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_retry; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_return(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_return0; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_rparen(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_sclass(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_semicolon(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_sp(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_stmts_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_stmts_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_string_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_string_concat(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_string_content; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_string_dvar(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_string_embexpr(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_string_literal(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_super(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_symbeg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_symbol(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_symbol_literal(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_symbols_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_symbols_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_symbols_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_tlambda(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_tlambeg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_top_const_field(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_top_const_ref(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_tstring_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_tstring_content(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_tstring_end(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_unary(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_undef(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_unless(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_unless_mod(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_until(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_until_mod(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_var_alias(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_var_field(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_var_ref(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_vcall(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_void_stmt; end
+
+ # source://prism//lib/prism/ripper_compat.rb#195
+ def on_when(_, _, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_while(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_while_mod(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_word_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_word_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_words_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_words_beg(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_words_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_words_sep(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#194
+ def on_xstring_add(_, _); end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_xstring_literal(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_xstring_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#193
+ def on_yield(_); end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_yield0; end
+
+ # source://prism//lib/prism/ripper_compat.rb#192
+ def on_zsuper; end
+
+ # Lazily initialize the parse result.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#188
+ def result; end
+
+ class << self
+ # This is a convenience method that runs the SexpBuilderPP subclass parser.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#171
+ def sexp(source); end
+
+ # This is a convenience method that runs the SexpBuilder subclass parser.
+ #
+ # source://prism//lib/prism/ripper_compat.rb#166
+ def sexp_raw(source); end
+ end
+end
+
+# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that
+# returns the arrays of [type, *children].
+#
+# source://prism//lib/prism/ripper_compat.rb#23
+class Prism::RipperCompat::SexpBuilder < ::Prism::RipperCompat
+ private
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_BEGIN(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_CHAR(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_END(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on___end__(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_alias(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_alias_error(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_aref(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_aref_field(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_arg_ambiguous(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_arg_paren(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_args_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_args_add_block(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_args_add_star(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_args_forward(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_args_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_array(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_aryptn(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_assign(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_assign_error(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_assoc_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_assoc_splat(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_assoclist_from_args(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_backref(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_backtick(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_bare_assoc_hash(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_begin(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_binary(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_block_var(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_blockarg(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_bodystmt(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_brace_block(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_break(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_call(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_case(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_class(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_class_name_error(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_comma(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_command(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_command_call(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_comment(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_const(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_const_path_field(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_const_path_ref(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_const_ref(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_cvar(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_def(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_defined(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_defs(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_do_block(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_dot2(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_dot3(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_dyna_symbol(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_else(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_elsif(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_embdoc(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_embdoc_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_embdoc_end(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_embexpr_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_embexpr_end(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_embvar(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_ensure(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_excessed_comma(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_fcall(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_field(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_float(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_fndptn(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_for(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_gvar(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_hash(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_heredoc_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_heredoc_dedent(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_heredoc_end(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_hshptn(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_ident(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_if(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_if_mod(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_ifop(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_ignored_nl(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_ignored_sp(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_imaginary(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_in(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_int(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_ivar(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_kw(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_kwrest_param(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_label(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_label_end(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_lambda(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_lbrace(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_lbracket(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_lparen(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_magic_comment(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_massign(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_method_add_arg(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_method_add_block(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mlhs_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mlhs_add_post(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mlhs_add_star(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mlhs_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mlhs_paren(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_module(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mrhs_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mrhs_add_star(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mrhs_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_mrhs_new_from_args(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_next(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_nl(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_nokw_param(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_op(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_opassign(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_operator_ambiguous(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_param_error(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_params(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_paren(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_parse_error(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_period(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_program(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_qsymbols_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_qsymbols_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_qsymbols_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_qwords_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_qwords_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_qwords_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_rational(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_rbrace(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_rbracket(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_redo(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_regexp_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_regexp_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_regexp_end(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_regexp_literal(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_regexp_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_rescue(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_rescue_mod(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_rest_param(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_retry(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_return(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_return0(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_rparen(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_sclass(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_semicolon(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_sp(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_stmts_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_stmts_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_string_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_string_concat(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_string_content(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_string_dvar(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_string_embexpr(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_string_literal(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_super(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_symbeg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_symbol(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_symbol_literal(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_symbols_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_symbols_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_symbols_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_tlambda(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_tlambeg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_top_const_field(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_top_const_ref(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_tstring_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_tstring_content(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_tstring_end(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_unary(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_undef(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_unless(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_unless_mod(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_until(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_until_mod(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_var_alias(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_var_field(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_var_ref(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_vcall(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_void_stmt(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_when(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_while(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_while_mod(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_word_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_word_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_words_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_words_beg(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_words_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#33
+ def on_words_sep(value); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_xstring_add(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_xstring_literal(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_xstring_new(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_yield(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_yield0(*args); end
+
+ # source://prism//lib/prism/ripper_compat.rb#27
+ def on_zsuper(*args); end
+end
+
+# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that
+# returns the same values as ::Ripper::SexpBuilder except with a couple of
+# niceties that flatten linked lists into arrays.
+#
+# source://prism//lib/prism/ripper_compat.rb#42
+class Prism::RipperCompat::SexpBuilderPP < ::Prism::RipperCompat::SexpBuilder
+ private
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def _dispatch_event_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def _dispatch_event_push(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_args_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_args_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_mlhs_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_mlhs_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_mrhs_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_mrhs_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_qsymbols_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_qsymbols_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_qwords_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_qwords_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_regexp_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_regexp_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_stmts_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_stmts_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_string_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_symbols_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_symbols_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_word_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_word_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_words_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_words_new; end
+
+ # source://prism//lib/prism/ripper_compat.rb#49
+ def on_xstring_add(list, item); end
+
+ # source://prism//lib/prism/ripper_compat.rb#45
+ def on_xstring_new; end
+end
+
+# Represents the `self` keyword.
+#
+# self
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#15202
+class Prism::SelfNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [SelfNode] a new instance of SelfNode
+ #
+ # source://prism//lib/prism/node.rb#15204
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15209
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15214
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15224
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15219
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> SelfNode
+ #
+ # source://prism//lib/prism/node.rb#15229
+ sig { params(params: T.untyped).returns(Prism::SelfNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15214
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15239
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15244
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15263
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15273
+ def type; end
+ end
+end
+
+# A module responsible for deserializing parse results.
+#
+# source://prism//lib/prism/serialize.rb#23
+module Prism::Serialize
+ class << self
+ # Deserialize the AST represented by the given string into a parse result.
+ #
+ # source://prism//lib/prism/serialize.rb#37
+ def load(input, serialized); end
+
+ # Deserialize the tokens represented by the given string into a parse
+ # result.
+ #
+ # source://prism//lib/prism/serialize.rb#49
+ def load_tokens(source, serialized); end
+ end
+end
+
+# source://prism//lib/prism/serialize.rb#53
+class Prism::Serialize::Loader
+ # @return [Loader] a new instance of Loader
+ #
+ # source://prism//lib/prism/serialize.rb#58
+ def initialize(source, serialized); end
+
+ # Returns the value of attribute constant_pool.
+ #
+ # source://prism//lib/prism/serialize.rb#55
+ def constant_pool; end
+
+ # Returns the value of attribute constant_pool_offset.
+ #
+ # source://prism//lib/prism/serialize.rb#55
+ def constant_pool_offset; end
+
+ # Returns the value of attribute encoding.
+ #
+ # source://prism//lib/prism/serialize.rb#54
+ def encoding; end
+
+ # Returns the value of attribute input.
+ #
+ # source://prism//lib/prism/serialize.rb#54
+ def input; end
+
+ # Returns the value of attribute io.
+ #
+ # source://prism//lib/prism/serialize.rb#54
+ def io; end
+
+ # source://prism//lib/prism/serialize.rb#92
+ def load_comments; end
+
+ # source://prism//lib/prism/serialize.rb#82
+ def load_encoding; end
+
+ # source://prism//lib/prism/serialize.rb#73
+ def load_header; end
+
+ # source://prism//lib/prism/serialize.rb#102
+ def load_metadata; end
+
+ # source://prism//lib/prism/serialize.rb#135
+ def load_nodes; end
+
+ # source://prism//lib/prism/serialize.rb#148
+ def load_result; end
+
+ # source://prism//lib/prism/serialize.rb#88
+ def load_start_line; end
+
+ # source://prism//lib/prism/serialize.rb#111
+ def load_tokens; end
+
+ # source://prism//lib/prism/serialize.rb#124
+ def load_tokens_result; end
+
+ # Returns the value of attribute serialized.
+ #
+ # source://prism//lib/prism/serialize.rb#54
+ def serialized; end
+
+ # Returns the value of attribute source.
+ #
+ # source://prism//lib/prism/serialize.rb#55
+ def source; end
+
+ # Returns the value of attribute start_line.
+ #
+ # source://prism//lib/prism/serialize.rb#56
+ def start_line; end
+
+ private
+
+ # source://prism//lib/prism/serialize.rb#211
+ def load_constant(index); end
+
+ # source://prism//lib/prism/serialize.rb#187
+ def load_embedded_string; end
+
+ # source://prism//lib/prism/serialize.rb#203
+ def load_location; end
+
+ # source://prism//lib/prism/serialize.rb#242
+ def load_node; end
+
+ # source://prism//lib/prism/serialize.rb#236
+ def load_optional_constant; end
+
+ # source://prism//lib/prism/serialize.rb#207
+ def load_optional_location; end
+
+ # source://prism//lib/prism/serialize.rb#180
+ def load_optional_node; end
+
+ # source://prism//lib/prism/serialize.rb#232
+ def load_required_constant; end
+
+ # source://prism//lib/prism/serialize.rb#176
+ def load_serialized_length; end
+
+ # source://prism//lib/prism/serialize.rb#191
+ def load_string; end
+
+ # source://prism//lib/prism/serialize.rb#171
+ def load_varsint; end
+
+ # variable-length integer using https://en.wikipedia.org/wiki/LEB128
+ # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints
+ #
+ # source://prism//lib/prism/serialize.rb#157
+ def load_varuint; end
+end
+
+# The major version of prism that we are expecting to find in the serialized
+# strings.
+#
+# source://prism//lib/prism/serialize.rb#26
+Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer)
+
+# The minor version of prism that we are expecting to find in the serialized
+# strings.
+#
+# source://prism//lib/prism/serialize.rb#30
+Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer)
+
+# The patch version of prism that we are expecting to find in the serialized
+# strings.
+#
+# source://prism//lib/prism/serialize.rb#34
+Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer)
+
+# The token types that can be indexed by their enum values.
+#
+# source://prism//lib/prism/serialize.rb#1154
+Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array)
+
+# Represents a singleton class declaration involving the `class` keyword.
+#
+# class << self end
+# ^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#15282
+class Prism::SingletonClassNode < ::Prism::Node
+ # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void
+ #
+ # @return [SingletonClassNode] a new instance of SingletonClassNode
+ #
+ # source://prism//lib/prism/node.rb#15302
+ sig do
+ params(
+ locals: T::Array[Symbol],
+ class_keyword_loc: Prism::Location,
+ operator_loc: Prism::Location,
+ expression: Prism::Node,
+ body: T.nilable(Prism::Node),
+ end_keyword_loc: Prism::Location,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15313
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader body: Node?
+ #
+ # source://prism//lib/prism/node.rb#15296
+ sig { returns(T.nilable(Prism::Node)) }
+ def body; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15318
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def class_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#15357
+ sig { returns(String) }
+ def class_keyword; end
+
+ # attr_reader class_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#15287
+ sig { returns(Prism::Location) }
+ def class_keyword_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15331
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15323
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> SingletonClassNode
+ #
+ # source://prism//lib/prism/node.rb#15336
+ sig { params(params: T.untyped).returns(Prism::SingletonClassNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15318
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15352
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def end_keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#15367
+ sig { returns(String) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#15299
+ sig { returns(Prism::Location) }
+ def end_keyword_loc; end
+
+ # attr_reader expression: Node
+ #
+ # source://prism//lib/prism/node.rb#15293
+ sig { returns(Prism::Node) }
+ def expression; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15372
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # attr_reader locals: Array[Symbol]
+ #
+ # source://prism//lib/prism/node.rb#15284
+ sig { returns(T::Array[Symbol]) }
+ def locals; end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#15362
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#15290
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15403
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15413
+ def type; end
+ end
+end
+
+# This represents a source of Ruby code that has been parsed. It is used in
+# conjunction with locations to allow them to resolve line numbers and source
+# ranges.
+#
+# source://prism//lib/prism/parse_result.rb#7
+class Prism::Source
+ # Create a new source object with the given source code and newline byte
+ # offsets. If no newline byte offsets are given, they will be computed from
+ # the source code.
+ #
+ # @return [Source] a new instance of Source
+ #
+ # source://prism//lib/prism/parse_result.rb#20
+ def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end
+
+ # Return the column number in characters for the given byte offset.
+ #
+ # source://prism//lib/prism/parse_result.rb#55
+ def character_column(byte_offset); end
+
+ # Return the character offset for the given byte offset.
+ #
+ # source://prism//lib/prism/parse_result.rb#50
+ def character_offset(byte_offset); end
+
+ # Return the column number for the given byte offset.
+ #
+ # source://prism//lib/prism/parse_result.rb#45
+ def column(byte_offset); end
+
+ # Binary search through the offsets to find the line number for the given
+ # byte offset.
+ #
+ # source://prism//lib/prism/parse_result.rb#34
+ def line(byte_offset); end
+
+ sig { params(value: Integer).returns(Integer) }
+ def line_offset(value); end
+
+ # Return the byte offset of the start of the line corresponding to the given
+ # byte offset.
+ #
+ # source://prism//lib/prism/parse_result.rb#40
+ def line_start(byte_offset); end
+
+ # The list of newline byte offsets in the source code.
+ #
+ # source://prism//lib/prism/parse_result.rb#15
+ sig { returns(T::Array[Integer]) }
+ def offsets; end
+
+ # Perform a byteslice on the source code using the given byte offset and
+ # byte length.
+ #
+ # source://prism//lib/prism/parse_result.rb#28
+ def slice(byte_offset, length); end
+
+ # The source code that this source object represents.
+ #
+ # source://prism//lib/prism/parse_result.rb#9
+ sig { returns(String) }
+ def source; end
+
+ # The line number where this source starts.
+ #
+ # source://prism//lib/prism/parse_result.rb#12
+ def start_line; end
+
+ # The line number where this source starts.
+ #
+ # source://prism//lib/prism/parse_result.rb#12
+ def start_line=(_arg0); end
+
+ private
+
+ # Find all of the newlines in the source code and return their byte offsets
+ # from the start of the string an array.
+ #
+ # source://prism//lib/prism/parse_result.rb#83
+ def compute_offsets(code); end
+
+ # Binary search through the offsets to find the line number for the given
+ # byte offset.
+ #
+ # source://prism//lib/prism/parse_result.rb#63
+ def find_line(byte_offset); end
+end
+
+# Represents the use of the `__ENCODING__` keyword.
+#
+# __ENCODING__
+# ^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#15422
+class Prism::SourceEncodingNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [SourceEncodingNode] a new instance of SourceEncodingNode
+ #
+ # source://prism//lib/prism/node.rb#15424
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15429
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15434
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15444
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15439
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> SourceEncodingNode
+ #
+ # source://prism//lib/prism/node.rb#15449
+ sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15434
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15459
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15464
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15483
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15493
+ def type; end
+ end
+end
+
+# Represents the use of the `__FILE__` keyword.
+#
+# __FILE__
+# ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#15502
+class Prism::SourceFileNode < ::Prism::Node
+ # def initialize: (filepath: String, location: Location) -> void
+ #
+ # @return [SourceFileNode] a new instance of SourceFileNode
+ #
+ # source://prism//lib/prism/node.rb#15507
+ sig { params(filepath: String, location: Prism::Location).void }
+ def initialize(filepath, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15513
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15518
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15528
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15523
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> SourceFileNode
+ #
+ # source://prism//lib/prism/node.rb#15533
+ sig { params(params: T.untyped).returns(Prism::SourceFileNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15518
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15544
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader filepath: String
+ #
+ # source://prism//lib/prism/node.rb#15504
+ sig { returns(String) }
+ def filepath; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15549
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15569
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15579
+ def type; end
+ end
+end
+
+# Represents the use of the `__LINE__` keyword.
+#
+# __LINE__
+# ^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#15588
+class Prism::SourceLineNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [SourceLineNode] a new instance of SourceLineNode
+ #
+ # source://prism//lib/prism/node.rb#15590
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15595
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15600
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15610
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15605
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> SourceLineNode
+ #
+ # source://prism//lib/prism/node.rb#15615
+ sig { params(params: T.untyped).returns(Prism::SourceLineNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15600
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15625
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15630
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15649
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15659
+ def type; end
+ end
+end
+
+# Represents the use of the splat operator.
+#
+# [*a]
+# ^^
+#
+# source://prism//lib/prism/node.rb#15668
+class Prism::SplatNode < ::Prism::Node
+ # def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void
+ #
+ # @return [SplatNode] a new instance of SplatNode
+ #
+ # source://prism//lib/prism/node.rb#15676
+ sig { params(operator_loc: Prism::Location, expression: T.nilable(Prism::Node), location: Prism::Location).void }
+ def initialize(operator_loc, expression, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15683
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15688
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15700
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15693
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> SplatNode
+ #
+ # source://prism//lib/prism/node.rb#15705
+ sig { params(params: T.untyped).returns(Prism::SplatNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15688
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15717
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # attr_reader expression: Node?
+ #
+ # source://prism//lib/prism/node.rb#15673
+ sig { returns(T.nilable(Prism::Node)) }
+ def expression; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15727
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def operator: () -> String
+ #
+ # source://prism//lib/prism/node.rb#15722
+ sig { returns(String) }
+ def operator; end
+
+ # attr_reader operator_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#15670
+ sig { returns(Prism::Location) }
+ def operator_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15753
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15763
+ def type; end
+ end
+end
+
+# Represents a set of statements contained within some scope.
+#
+# foo; bar; baz
+# ^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#15772
+class Prism::StatementsNode < ::Prism::Node
+ # def initialize: (body: Array[Node], location: Location) -> void
+ #
+ # @return [StatementsNode] a new instance of StatementsNode
+ #
+ # source://prism//lib/prism/node.rb#15777
+ sig { params(body: T::Array[Prism::Node], location: Prism::Location).void }
+ def initialize(body, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15783
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader body: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15774
+ sig { returns(T::Array[Prism::Node]) }
+ def body; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15788
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15798
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15793
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> StatementsNode
+ #
+ # source://prism//lib/prism/node.rb#15803
+ sig { params(params: T.untyped).returns(Prism::StatementsNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15788
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15814
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15819
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15839
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15849
+ def type; end
+ end
+end
+
+# Flags for string nodes.
+#
+# source://prism//lib/prism/node.rb#17379
+module Prism::StringFlags; end
+
+# internal bytes forced the encoding to binary
+#
+# source://prism//lib/prism/node.rb#17384
+Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# internal bytes forced the encoding to UTF-8
+#
+# source://prism//lib/prism/node.rb#17381
+Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# frozen by virtue of a `frozen_string_literal` comment
+#
+# source://prism//lib/prism/node.rb#17387
+Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer)
+
+# Represents a string literal, a string contained within a `%w` list, or
+# plain string content within an interpolated string.
+#
+# "foo"
+# ^^^^^
+#
+# %w[foo]
+# ^^^
+#
+# "foo #{bar} baz"
+# ^^^^ ^^^^
+#
+# source://prism//lib/prism/node.rb#15865
+class Prism::StringNode < ::Prism::Node
+ include ::Prism::HeredocQuery
+
+ # def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void
+ #
+ # @return [StringNode] a new instance of StringNode
+ #
+ # source://prism//lib/prism/node.rb#15882
+ sig do
+ params(
+ flags: Integer,
+ opening_loc: T.nilable(Prism::Location),
+ content_loc: Prism::Location,
+ closing_loc: T.nilable(Prism::Location),
+ unescaped: String,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#15892
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15897
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#15957
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#15876
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#15907
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#15902
+ def compact_child_nodes; end
+
+ # def content: () -> String
+ #
+ # source://prism//lib/prism/node.rb#15952
+ sig { returns(String) }
+ def content; end
+
+ # attr_reader content_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#15873
+ sig { returns(Prism::Location) }
+ def content_loc; end
+
+ # def copy: (**params) -> StringNode
+ #
+ # source://prism//lib/prism/node.rb#15912
+ sig { params(params: T.untyped).returns(Prism::StringNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#15897
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#15927
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def forced_binary_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#15937
+ sig { returns(T::Boolean) }
+ def forced_binary_encoding?; end
+
+ # def forced_utf8_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#15932
+ sig { returns(T::Boolean) }
+ def forced_utf8_encoding?; end
+
+ # def frozen?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#15942
+ sig { returns(T::Boolean) }
+ def frozen?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#15962
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#15947
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#15870
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15987
+ def type; end
+
+ # attr_reader unescaped: String
+ #
+ # source://prism//lib/prism/node.rb#15879
+ sig { returns(String) }
+ def unescaped; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#15867
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#15997
+ def type; end
+ end
+end
+
+# Represents the use of the `super` keyword with parentheses or arguments.
+#
+# super()
+# ^^^^^^^
+#
+# super foo, bar
+# ^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#16009
+class Prism::SuperNode < ::Prism::Node
+ # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void
+ #
+ # @return [SuperNode] a new instance of SuperNode
+ #
+ # source://prism//lib/prism/node.rb#16026
+ sig do
+ params(
+ keyword_loc: Prism::Location,
+ lparen_loc: T.nilable(Prism::Location),
+ arguments: T.nilable(Prism::ArgumentsNode),
+ rparen_loc: T.nilable(Prism::Location),
+ block: T.nilable(Prism::Node),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#16036
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#16017
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # attr_reader block: Node?
+ #
+ # source://prism//lib/prism/node.rb#16023
+ sig { returns(T.nilable(Prism::Node)) }
+ def block; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16041
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#16054
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16046
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> SuperNode
+ #
+ # source://prism//lib/prism/node.rb#16059
+ sig { params(params: T.untyped).returns(Prism::SuperNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16041
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#16074
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#16094
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#16079
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#16011
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # def lparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16084
+ sig { returns(T.nilable(String)) }
+ def lparen; end
+
+ # attr_reader lparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16014
+ sig { returns(T.nilable(Prism::Location)) }
+ def lparen_loc; end
+
+ # def rparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16089
+ sig { returns(T.nilable(String)) }
+ def rparen; end
+
+ # attr_reader rparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16020
+ sig { returns(T.nilable(Prism::Location)) }
+ def rparen_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16128
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16138
+ def type; end
+ end
+end
+
+# Flags for symbol nodes.
+#
+# source://prism//lib/prism/node.rb#17391
+module Prism::SymbolFlags; end
+
+# internal bytes forced the encoding to binary
+#
+# source://prism//lib/prism/node.rb#17396
+Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# internal bytes forced the encoding to US-ASCII
+#
+# source://prism//lib/prism/node.rb#17399
+Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# internal bytes forced the encoding to UTF-8
+#
+# source://prism//lib/prism/node.rb#17393
+Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer)
+
+# Represents a symbol literal or a symbol contained within a `%i` list.
+#
+# :foo
+# ^^^^
+#
+# %i[foo]
+# ^^^
+#
+# source://prism//lib/prism/node.rb#16150
+class Prism::SymbolNode < ::Prism::Node
+ # def initialize: (flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void
+ #
+ # @return [SymbolNode] a new instance of SymbolNode
+ #
+ # source://prism//lib/prism/node.rb#16167
+ sig do
+ params(
+ flags: Integer,
+ opening_loc: T.nilable(Prism::Location),
+ value_loc: T.nilable(Prism::Location),
+ closing_loc: T.nilable(Prism::Location),
+ unescaped: String,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, opening_loc, value_loc, closing_loc, unescaped, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#16177
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16182
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16242
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16161
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#16192
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16187
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> SymbolNode
+ #
+ # source://prism//lib/prism/node.rb#16197
+ sig { params(params: T.untyped).returns(Prism::SymbolNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16182
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#16212
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def forced_binary_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#16222
+ sig { returns(T::Boolean) }
+ def forced_binary_encoding?; end
+
+ # def forced_us_ascii_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#16227
+ sig { returns(T::Boolean) }
+ def forced_us_ascii_encoding?; end
+
+ # def forced_utf8_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#16217
+ sig { returns(T::Boolean) }
+ def forced_utf8_encoding?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#16247
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16232
+ sig { returns(T.nilable(String)) }
+ def opening; end
+
+ # attr_reader opening_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16155
+ sig { returns(T.nilable(Prism::Location)) }
+ def opening_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16272
+ def type; end
+
+ # attr_reader unescaped: String
+ #
+ # source://prism//lib/prism/node.rb#16164
+ sig { returns(String) }
+ def unescaped; end
+
+ # def value: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16237
+ sig { returns(T.nilable(String)) }
+ def value; end
+
+ # attr_reader value_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16158
+ sig { returns(T.nilable(Prism::Location)) }
+ def value_loc; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#16152
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16282
+ def type; end
+ end
+end
+
+# This represents a token from the Ruby source.
+#
+# source://prism//lib/prism/parse_result.rb#416
+class Prism::Token
+ # Create a new token object with the given type, value, and location.
+ #
+ # @return [Token] a new instance of Token
+ #
+ # source://prism//lib/prism/parse_result.rb#427
+ sig { params(type: T.untyped, value: String, location: Prism::Location).void }
+ def initialize(type, value, location); end
+
+ # Returns true if the given other token is equal to this token.
+ #
+ # source://prism//lib/prism/parse_result.rb#454
+ sig { params(other: T.untyped).returns(T::Boolean) }
+ def ==(other); end
+
+ # Implement the hash pattern matching interface for Token.
+ #
+ # source://prism//lib/prism/parse_result.rb#434
+ sig { params(keys: T.untyped).returns(T.untyped) }
+ def deconstruct_keys(keys); end
+
+ # A Location object representing the location of this token in the source.
+ #
+ # source://prism//lib/prism/parse_result.rb#424
+ sig { returns(Prism::Location) }
+ def location; end
+
+ # Implement the pretty print interface for Token.
+ #
+ # source://prism//lib/prism/parse_result.rb#439
+ sig { params(q: T.untyped).returns(T.untyped) }
+ def pretty_print(q); end
+
+ # The type of token that this token is.
+ #
+ # source://prism//lib/prism/parse_result.rb#418
+ sig { returns(T.untyped) }
+ def type; end
+
+ # A byteslice of the source that this token represents.
+ #
+ # source://prism//lib/prism/parse_result.rb#421
+ sig { returns(String) }
+ def value; end
+end
+
+# Represents the use of the literal `true` keyword.
+#
+# true
+# ^^^^
+#
+# source://prism//lib/prism/node.rb#16291
+class Prism::TrueNode < ::Prism::Node
+ # def initialize: (location: Location) -> void
+ #
+ # @return [TrueNode] a new instance of TrueNode
+ #
+ # source://prism//lib/prism/node.rb#16293
+ sig { params(location: Prism::Location).void }
+ def initialize(location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#16298
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16303
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#16313
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16308
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> TrueNode
+ #
+ # source://prism//lib/prism/node.rb#16318
+ sig { params(params: T.untyped).returns(Prism::TrueNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16303
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#16328
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#16333
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16352
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16362
+ def type; end
+ end
+end
+
+# Represents the use of the `undef` keyword.
+#
+# undef :foo, :bar, :baz
+# ^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#16371
+class Prism::UndefNode < ::Prism::Node
+ # def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void
+ #
+ # @return [UndefNode] a new instance of UndefNode
+ #
+ # source://prism//lib/prism/node.rb#16379
+ sig { params(names: T::Array[Prism::Node], keyword_loc: Prism::Location, location: Prism::Location).void }
+ def initialize(names, keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#16386
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16391
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#16401
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16396
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> UndefNode
+ #
+ # source://prism//lib/prism/node.rb#16406
+ sig { params(params: T.untyped).returns(Prism::UndefNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16391
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#16418
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#16428
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#16423
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#16376
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # attr_reader names: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16373
+ sig { returns(T::Array[Prism::Node]) }
+ def names; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16449
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16459
+ def type; end
+ end
+end
+
+# Represents the use of the `unless` keyword, either in the block form or the modifier form.
+#
+# bar unless foo
+# ^^^^^^^^^^^^^^
+#
+# unless foo then bar end
+# ^^^^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#16471
+class Prism::UnlessNode < ::Prism::Node
+ # def initialize: (keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void
+ #
+ # @return [UnlessNode] a new instance of UnlessNode
+ #
+ # source://prism//lib/prism/node.rb#16491
+ sig do
+ params(
+ keyword_loc: Prism::Location,
+ predicate: Prism::Node,
+ then_keyword_loc: T.nilable(Prism::Location),
+ statements: T.nilable(Prism::StatementsNode),
+ consequent: T.nilable(Prism::ElseNode),
+ end_keyword_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#16502
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16511
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#16525
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16516
+ def compact_child_nodes; end
+
+ # attr_reader consequent: ElseNode?
+ #
+ # source://prism//lib/prism/node.rb#16485
+ sig { returns(T.nilable(Prism::ElseNode)) }
+ def consequent; end
+
+ # def copy: (**params) -> UnlessNode
+ #
+ # source://prism//lib/prism/node.rb#16530
+ sig { params(params: T.untyped).returns(Prism::UnlessNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16511
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#16546
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def end_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16561
+ sig { returns(T.nilable(String)) }
+ def end_keyword; end
+
+ # attr_reader end_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16488
+ sig { returns(T.nilable(Prism::Location)) }
+ def end_keyword_loc; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#16566
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#16551
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#16473
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # attr_reader predicate: Node
+ #
+ # source://prism//lib/prism/node.rb#16476
+ sig { returns(Prism::Node) }
+ def predicate; end
+
+ # source://prism//lib/prism/node.rb#16506
+ def set_newline_flag(newline_marked); end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#16482
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # def then_keyword: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16556
+ sig { returns(T.nilable(String)) }
+ def then_keyword; end
+
+ # attr_reader then_keyword_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16479
+ sig { returns(T.nilable(Prism::Location)) }
+ def then_keyword_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16602
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16612
+ def type; end
+ end
+end
+
+# Represents the use of the `until` keyword, either in the block form or the modifier form.
+#
+# bar until foo
+# ^^^^^^^^^^^^^
+#
+# until foo do bar end
+# ^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#16624
+class Prism::UntilNode < ::Prism::Node
+ # def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void
+ #
+ # @return [UntilNode] a new instance of UntilNode
+ #
+ # source://prism//lib/prism/node.rb#16641
+ sig do
+ params(
+ flags: Integer,
+ keyword_loc: Prism::Location,
+ closing_loc: T.nilable(Prism::Location),
+ predicate: Prism::Node,
+ statements: T.nilable(Prism::StatementsNode),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, keyword_loc, closing_loc, predicate, statements, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#16651
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def begin_modifier?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#16698
+ sig { returns(T::Boolean) }
+ def begin_modifier?; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16660
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16708
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16632
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#16673
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16665
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> UntilNode
+ #
+ # source://prism//lib/prism/node.rb#16678
+ sig { params(params: T.untyped).returns(Prism::UntilNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16660
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#16693
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#16713
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#16703
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#16629
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # attr_reader predicate: Node
+ #
+ # source://prism//lib/prism/node.rb#16635
+ sig { returns(Prism::Node) }
+ def predicate; end
+
+ # source://prism//lib/prism/node.rb#16655
+ def set_newline_flag(newline_marked); end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#16638
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16744
+ def type; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#16626
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16754
+ def type; end
+ end
+end
+
+# The version constant is set by reading the result of calling pm_version.
+Prism::VERSION = T.let(T.unsafe(nil), String)
+
+# A visitor is a class that provides a default implementation for every accept
+# method defined on the nodes. This means it can walk a tree without the
+# caller needing to define any special handling. This allows you to handle a
+# subset of the tree, while still walking the whole tree.
+#
+# For example, to find all of the method calls that call the `foo` method, you
+# could write:
+#
+# class FooCalls < Prism::Visitor
+# def visit_call_node(node)
+# if node.name == "foo"
+# # Do something with the node
+# end
+#
+# # Call super so that the visitor continues walking the tree
+# super
+# end
+# end
+#
+# source://prism//lib/prism/visitor.rb#50
+class Prism::Visitor < ::Prism::BasicVisitor
+ # Visit a AliasGlobalVariableNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::AliasGlobalVariableNode).void }
+ def visit_alias_global_variable_node(node); end
+
+ # Visit a AliasMethodNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::AliasMethodNode).void }
+ def visit_alias_method_node(node); end
+
+ # Visit a AlternationPatternNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::AlternationPatternNode).void }
+ def visit_alternation_pattern_node(node); end
+
+ # Visit a AndNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::AndNode).void }
+ def visit_and_node(node); end
+
+ # Visit a ArgumentsNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ArgumentsNode).void }
+ def visit_arguments_node(node); end
+
+ # Visit a ArrayNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ArrayNode).void }
+ def visit_array_node(node); end
+
+ # Visit a ArrayPatternNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ArrayPatternNode).void }
+ def visit_array_pattern_node(node); end
+
+ # Visit a AssocNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::AssocNode).void }
+ def visit_assoc_node(node); end
+
+ # Visit a AssocSplatNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::AssocSplatNode).void }
+ def visit_assoc_splat_node(node); end
+
+ # Visit a BackReferenceReadNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::BackReferenceReadNode).void }
+ def visit_back_reference_read_node(node); end
+
+ # Visit a BeginNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::BeginNode).void }
+ def visit_begin_node(node); end
+
+ # Visit a BlockArgumentNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::BlockArgumentNode).void }
+ def visit_block_argument_node(node); end
+
+ # Visit a BlockLocalVariableNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::BlockLocalVariableNode).void }
+ def visit_block_local_variable_node(node); end
+
+ # Visit a BlockNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::BlockNode).void }
+ def visit_block_node(node); end
+
+ # Visit a BlockParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::BlockParameterNode).void }
+ def visit_block_parameter_node(node); end
+
+ # Visit a BlockParametersNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::BlockParametersNode).void }
+ def visit_block_parameters_node(node); end
+
+ # Visit a BreakNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::BreakNode).void }
+ def visit_break_node(node); end
+
+ # Visit a CallAndWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::CallAndWriteNode).void }
+ def visit_call_and_write_node(node); end
+
+ # Visit a CallNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::CallNode).void }
+ def visit_call_node(node); end
+
+ # Visit a CallOperatorWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::CallOperatorWriteNode).void }
+ def visit_call_operator_write_node(node); end
+
+ # Visit a CallOrWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::CallOrWriteNode).void }
+ def visit_call_or_write_node(node); end
+
+ # Visit a CallTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::CallTargetNode).void }
+ def visit_call_target_node(node); end
+
+ # Visit a CapturePatternNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::CapturePatternNode).void }
+ def visit_capture_pattern_node(node); end
+
+ # Visit a CaseMatchNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::CaseMatchNode).void }
+ def visit_case_match_node(node); end
+
+ # Visit a CaseNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::CaseNode).void }
+ def visit_case_node(node); end
+
+ # Visit a ClassNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ClassNode).void }
+ def visit_class_node(node); end
+
+ # Visit a ClassVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ClassVariableAndWriteNode).void }
+ def visit_class_variable_and_write_node(node); end
+
+ # Visit a ClassVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ClassVariableOperatorWriteNode).void }
+ def visit_class_variable_operator_write_node(node); end
+
+ # Visit a ClassVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ClassVariableOrWriteNode).void }
+ def visit_class_variable_or_write_node(node); end
+
+ # Visit a ClassVariableReadNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ClassVariableReadNode).void }
+ def visit_class_variable_read_node(node); end
+
+ # Visit a ClassVariableTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ClassVariableTargetNode).void }
+ def visit_class_variable_target_node(node); end
+
+ # Visit a ClassVariableWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ClassVariableWriteNode).void }
+ def visit_class_variable_write_node(node); end
+
+ # Visit a ConstantAndWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantAndWriteNode).void }
+ def visit_constant_and_write_node(node); end
+
+ # Visit a ConstantOperatorWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantOperatorWriteNode).void }
+ def visit_constant_operator_write_node(node); end
+
+ # Visit a ConstantOrWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantOrWriteNode).void }
+ def visit_constant_or_write_node(node); end
+
+ # Visit a ConstantPathAndWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantPathAndWriteNode).void }
+ def visit_constant_path_and_write_node(node); end
+
+ # Visit a ConstantPathNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantPathNode).void }
+ def visit_constant_path_node(node); end
+
+ # Visit a ConstantPathOperatorWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantPathOperatorWriteNode).void }
+ def visit_constant_path_operator_write_node(node); end
+
+ # Visit a ConstantPathOrWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantPathOrWriteNode).void }
+ def visit_constant_path_or_write_node(node); end
+
+ # Visit a ConstantPathTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantPathTargetNode).void }
+ def visit_constant_path_target_node(node); end
+
+ # Visit a ConstantPathWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantPathWriteNode).void }
+ def visit_constant_path_write_node(node); end
+
+ # Visit a ConstantReadNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantReadNode).void }
+ def visit_constant_read_node(node); end
+
+ # Visit a ConstantTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantTargetNode).void }
+ def visit_constant_target_node(node); end
+
+ # Visit a ConstantWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ConstantWriteNode).void }
+ def visit_constant_write_node(node); end
+
+ # Visit a DefNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::DefNode).void }
+ def visit_def_node(node); end
+
+ # Visit a DefinedNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::DefinedNode).void }
+ def visit_defined_node(node); end
+
+ # Visit a ElseNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ElseNode).void }
+ def visit_else_node(node); end
+
+ # Visit a EmbeddedStatementsNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::EmbeddedStatementsNode).void }
+ def visit_embedded_statements_node(node); end
+
+ # Visit a EmbeddedVariableNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::EmbeddedVariableNode).void }
+ def visit_embedded_variable_node(node); end
+
+ # Visit a EnsureNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::EnsureNode).void }
+ def visit_ensure_node(node); end
+
+ # Visit a FalseNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::FalseNode).void }
+ def visit_false_node(node); end
+
+ # Visit a FindPatternNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::FindPatternNode).void }
+ def visit_find_pattern_node(node); end
+
+ # Visit a FlipFlopNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::FlipFlopNode).void }
+ def visit_flip_flop_node(node); end
+
+ # Visit a FloatNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::FloatNode).void }
+ def visit_float_node(node); end
+
+ # Visit a ForNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ForNode).void }
+ def visit_for_node(node); end
+
+ # Visit a ForwardingArgumentsNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ForwardingArgumentsNode).void }
+ def visit_forwarding_arguments_node(node); end
+
+ # Visit a ForwardingParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ForwardingParameterNode).void }
+ def visit_forwarding_parameter_node(node); end
+
+ # Visit a ForwardingSuperNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ForwardingSuperNode).void }
+ def visit_forwarding_super_node(node); end
+
+ # Visit a GlobalVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::GlobalVariableAndWriteNode).void }
+ def visit_global_variable_and_write_node(node); end
+
+ # Visit a GlobalVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::GlobalVariableOperatorWriteNode).void }
+ def visit_global_variable_operator_write_node(node); end
+
+ # Visit a GlobalVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::GlobalVariableOrWriteNode).void }
+ def visit_global_variable_or_write_node(node); end
+
+ # Visit a GlobalVariableReadNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::GlobalVariableReadNode).void }
+ def visit_global_variable_read_node(node); end
+
+ # Visit a GlobalVariableTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::GlobalVariableTargetNode).void }
+ def visit_global_variable_target_node(node); end
+
+ # Visit a GlobalVariableWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::GlobalVariableWriteNode).void }
+ def visit_global_variable_write_node(node); end
+
+ # Visit a HashNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::HashNode).void }
+ def visit_hash_node(node); end
+
+ # Visit a HashPatternNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::HashPatternNode).void }
+ def visit_hash_pattern_node(node); end
+
+ # Visit a IfNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::IfNode).void }
+ def visit_if_node(node); end
+
+ # Visit a ImaginaryNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ImaginaryNode).void }
+ def visit_imaginary_node(node); end
+
+ # Visit a ImplicitNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ImplicitNode).void }
+ def visit_implicit_node(node); end
+
+ # Visit a ImplicitRestNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ImplicitRestNode).void }
+ def visit_implicit_rest_node(node); end
+
+ # Visit a InNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InNode).void }
+ def visit_in_node(node); end
+
+ # Visit a IndexAndWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::IndexAndWriteNode).void }
+ def visit_index_and_write_node(node); end
+
+ # Visit a IndexOperatorWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::IndexOperatorWriteNode).void }
+ def visit_index_operator_write_node(node); end
+
+ # Visit a IndexOrWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::IndexOrWriteNode).void }
+ def visit_index_or_write_node(node); end
+
+ # Visit a IndexTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::IndexTargetNode).void }
+ def visit_index_target_node(node); end
+
+ # Visit a InstanceVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InstanceVariableAndWriteNode).void }
+ def visit_instance_variable_and_write_node(node); end
+
+ # Visit a InstanceVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InstanceVariableOperatorWriteNode).void }
+ def visit_instance_variable_operator_write_node(node); end
+
+ # Visit a InstanceVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InstanceVariableOrWriteNode).void }
+ def visit_instance_variable_or_write_node(node); end
+
+ # Visit a InstanceVariableReadNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InstanceVariableReadNode).void }
+ def visit_instance_variable_read_node(node); end
+
+ # Visit a InstanceVariableTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InstanceVariableTargetNode).void }
+ def visit_instance_variable_target_node(node); end
+
+ # Visit a InstanceVariableWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InstanceVariableWriteNode).void }
+ def visit_instance_variable_write_node(node); end
+
+ # Visit a IntegerNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::IntegerNode).void }
+ def visit_integer_node(node); end
+
+ # Visit a InterpolatedMatchLastLineNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InterpolatedMatchLastLineNode).void }
+ def visit_interpolated_match_last_line_node(node); end
+
+ # Visit a InterpolatedRegularExpressionNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InterpolatedRegularExpressionNode).void }
+ def visit_interpolated_regular_expression_node(node); end
+
+ # Visit a InterpolatedStringNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InterpolatedStringNode).void }
+ def visit_interpolated_string_node(node); end
+
+ # Visit a InterpolatedSymbolNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InterpolatedSymbolNode).void }
+ def visit_interpolated_symbol_node(node); end
+
+ # Visit a InterpolatedXStringNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::InterpolatedXStringNode).void }
+ def visit_interpolated_x_string_node(node); end
+
+ # Visit a KeywordHashNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::KeywordHashNode).void }
+ def visit_keyword_hash_node(node); end
+
+ # Visit a KeywordRestParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::KeywordRestParameterNode).void }
+ def visit_keyword_rest_parameter_node(node); end
+
+ # Visit a LambdaNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::LambdaNode).void }
+ def visit_lambda_node(node); end
+
+ # Visit a LocalVariableAndWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::LocalVariableAndWriteNode).void }
+ def visit_local_variable_and_write_node(node); end
+
+ # Visit a LocalVariableOperatorWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::LocalVariableOperatorWriteNode).void }
+ def visit_local_variable_operator_write_node(node); end
+
+ # Visit a LocalVariableOrWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::LocalVariableOrWriteNode).void }
+ def visit_local_variable_or_write_node(node); end
+
+ # Visit a LocalVariableReadNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::LocalVariableReadNode).void }
+ def visit_local_variable_read_node(node); end
+
+ # Visit a LocalVariableTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::LocalVariableTargetNode).void }
+ def visit_local_variable_target_node(node); end
+
+ # Visit a LocalVariableWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::LocalVariableWriteNode).void }
+ def visit_local_variable_write_node(node); end
+
+ # Visit a MatchLastLineNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::MatchLastLineNode).void }
+ def visit_match_last_line_node(node); end
+
+ # Visit a MatchPredicateNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::MatchPredicateNode).void }
+ def visit_match_predicate_node(node); end
+
+ # Visit a MatchRequiredNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::MatchRequiredNode).void }
+ def visit_match_required_node(node); end
+
+ # Visit a MatchWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::MatchWriteNode).void }
+ def visit_match_write_node(node); end
+
+ # Visit a MissingNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::MissingNode).void }
+ def visit_missing_node(node); end
+
+ # Visit a ModuleNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ModuleNode).void }
+ def visit_module_node(node); end
+
+ # Visit a MultiTargetNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::MultiTargetNode).void }
+ def visit_multi_target_node(node); end
+
+ # Visit a MultiWriteNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::MultiWriteNode).void }
+ def visit_multi_write_node(node); end
+
+ # Visit a NextNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::NextNode).void }
+ def visit_next_node(node); end
+
+ # Visit a NilNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::NilNode).void }
+ def visit_nil_node(node); end
+
+ # Visit a NoKeywordsParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::NoKeywordsParameterNode).void }
+ def visit_no_keywords_parameter_node(node); end
+
+ # Visit a NumberedParametersNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::NumberedParametersNode).void }
+ def visit_numbered_parameters_node(node); end
+
+ # Visit a NumberedReferenceReadNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::NumberedReferenceReadNode).void }
+ def visit_numbered_reference_read_node(node); end
+
+ # Visit a OptionalKeywordParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::OptionalKeywordParameterNode).void }
+ def visit_optional_keyword_parameter_node(node); end
+
+ # Visit a OptionalParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::OptionalParameterNode).void }
+ def visit_optional_parameter_node(node); end
+
+ # Visit a OrNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::OrNode).void }
+ def visit_or_node(node); end
+
+ # Visit a ParametersNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ParametersNode).void }
+ def visit_parameters_node(node); end
+
+ # Visit a ParenthesesNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ParenthesesNode).void }
+ def visit_parentheses_node(node); end
+
+ # Visit a PinnedExpressionNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::PinnedExpressionNode).void }
+ def visit_pinned_expression_node(node); end
+
+ # Visit a PinnedVariableNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::PinnedVariableNode).void }
+ def visit_pinned_variable_node(node); end
+
+ # Visit a PostExecutionNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::PostExecutionNode).void }
+ def visit_post_execution_node(node); end
+
+ # Visit a PreExecutionNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::PreExecutionNode).void }
+ def visit_pre_execution_node(node); end
+
+ # Visit a ProgramNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ProgramNode).void }
+ def visit_program_node(node); end
+
+ # Visit a RangeNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RangeNode).void }
+ def visit_range_node(node); end
+
+ # Visit a RationalNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RationalNode).void }
+ def visit_rational_node(node); end
+
+ # Visit a RedoNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RedoNode).void }
+ def visit_redo_node(node); end
+
+ # Visit a RegularExpressionNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RegularExpressionNode).void }
+ def visit_regular_expression_node(node); end
+
+ # Visit a RequiredKeywordParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RequiredKeywordParameterNode).void }
+ def visit_required_keyword_parameter_node(node); end
+
+ # Visit a RequiredParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RequiredParameterNode).void }
+ def visit_required_parameter_node(node); end
+
+ # Visit a RescueModifierNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RescueModifierNode).void }
+ def visit_rescue_modifier_node(node); end
+
+ # Visit a RescueNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RescueNode).void }
+ def visit_rescue_node(node); end
+
+ # Visit a RestParameterNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RestParameterNode).void }
+ def visit_rest_parameter_node(node); end
+
+ # Visit a RetryNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::RetryNode).void }
+ def visit_retry_node(node); end
+
+ # Visit a ReturnNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::ReturnNode).void }
+ def visit_return_node(node); end
+
+ # Visit a SelfNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::SelfNode).void }
+ def visit_self_node(node); end
+
+ # Visit a SingletonClassNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::SingletonClassNode).void }
+ def visit_singleton_class_node(node); end
+
+ # Visit a SourceEncodingNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::SourceEncodingNode).void }
+ def visit_source_encoding_node(node); end
+
+ # Visit a SourceFileNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::SourceFileNode).void }
+ def visit_source_file_node(node); end
+
+ # Visit a SourceLineNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::SourceLineNode).void }
+ def visit_source_line_node(node); end
+
+ # Visit a SplatNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::SplatNode).void }
+ def visit_splat_node(node); end
+
+ # Visit a StatementsNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::StatementsNode).void }
+ def visit_statements_node(node); end
+
+ # Visit a StringNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::StringNode).void }
+ def visit_string_node(node); end
+
+ # Visit a SuperNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::SuperNode).void }
+ def visit_super_node(node); end
+
+ # Visit a SymbolNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::SymbolNode).void }
+ def visit_symbol_node(node); end
+
+ # Visit a TrueNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::TrueNode).void }
+ def visit_true_node(node); end
+
+ # Visit a UndefNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::UndefNode).void }
+ def visit_undef_node(node); end
+
+ # Visit a UnlessNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::UnlessNode).void }
+ def visit_unless_node(node); end
+
+ # Visit a UntilNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::UntilNode).void }
+ def visit_until_node(node); end
+
+ # Visit a WhenNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::WhenNode).void }
+ def visit_when_node(node); end
+
+ # Visit a WhileNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::WhileNode).void }
+ def visit_while_node(node); end
+
+ # Visit a XStringNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::XStringNode).void }
+ def visit_x_string_node(node); end
+
+ # Visit a YieldNode node
+ #
+ # source://prism//lib/prism/visitor.rb#26
+ sig { params(node: Prism::YieldNode).void }
+ def visit_yield_node(node); end
+end
+
+# Represents the use of the `when` keyword within a case statement.
+#
+# case true
+# when true
+# ^^^^^^^^^
+# end
+#
+# source://prism//lib/prism/node.rb#16765
+class Prism::WhenNode < ::Prism::Node
+ # def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void
+ #
+ # @return [WhenNode] a new instance of WhenNode
+ #
+ # source://prism//lib/prism/node.rb#16776
+ sig do
+ params(
+ keyword_loc: Prism::Location,
+ conditions: T::Array[Prism::Node],
+ statements: T.nilable(Prism::StatementsNode),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(keyword_loc, conditions, statements, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#16784
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16789
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#16802
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16794
+ def compact_child_nodes; end
+
+ # attr_reader conditions: Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16770
+ sig { returns(T::Array[Prism::Node]) }
+ def conditions; end
+
+ # def copy: (**params) -> WhenNode
+ #
+ # source://prism//lib/prism/node.rb#16807
+ sig { params(params: T.untyped).returns(Prism::WhenNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16789
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#16820
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#16830
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#16825
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#16767
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#16773
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16857
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16867
+ def type; end
+ end
+end
+
+# Represents the use of the `while` keyword, either in the block form or the modifier form.
+#
+# bar while foo
+# ^^^^^^^^^^^^^
+#
+# while foo do bar end
+# ^^^^^^^^^^^^^^^^^^^^
+#
+# source://prism//lib/prism/node.rb#16879
+class Prism::WhileNode < ::Prism::Node
+ # def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void
+ #
+ # @return [WhileNode] a new instance of WhileNode
+ #
+ # source://prism//lib/prism/node.rb#16896
+ sig do
+ params(
+ flags: Integer,
+ keyword_loc: Prism::Location,
+ closing_loc: T.nilable(Prism::Location),
+ predicate: Prism::Node,
+ statements: T.nilable(Prism::StatementsNode),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, keyword_loc, closing_loc, predicate, statements, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#16906
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def begin_modifier?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#16953
+ sig { returns(T::Boolean) }
+ def begin_modifier?; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16915
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#16963
+ sig { returns(T.nilable(String)) }
+ def closing; end
+
+ # attr_reader closing_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#16887
+ sig { returns(T.nilable(Prism::Location)) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#16928
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#16920
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> WhileNode
+ #
+ # source://prism//lib/prism/node.rb#16933
+ sig { params(params: T.untyped).returns(Prism::WhileNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#16915
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#16948
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#16968
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#16958
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#16884
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # attr_reader predicate: Node
+ #
+ # source://prism//lib/prism/node.rb#16890
+ sig { returns(Prism::Node) }
+ def predicate; end
+
+ # source://prism//lib/prism/node.rb#16910
+ def set_newline_flag(newline_marked); end
+
+ # attr_reader statements: StatementsNode?
+ #
+ # source://prism//lib/prism/node.rb#16893
+ sig { returns(T.nilable(Prism::StatementsNode)) }
+ def statements; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#16999
+ def type; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#16881
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#17009
+ def type; end
+ end
+end
+
+# Represents an xstring literal with no interpolation.
+#
+# `foo`
+# ^^^^^
+#
+# source://prism//lib/prism/node.rb#17018
+class Prism::XStringNode < ::Prism::Node
+ include ::Prism::HeredocQuery
+
+ # def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
+ #
+ # @return [XStringNode] a new instance of XStringNode
+ #
+ # source://prism//lib/prism/node.rb#17035
+ sig do
+ params(
+ flags: Integer,
+ opening_loc: Prism::Location,
+ content_loc: Prism::Location,
+ closing_loc: Prism::Location,
+ unescaped: String,
+ location: Prism::Location
+ ).void
+ end
+ def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#17045
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#17050
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def closing: () -> String
+ #
+ # source://prism//lib/prism/node.rb#17105
+ sig { returns(String) }
+ def closing; end
+
+ # attr_reader closing_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#17029
+ sig { returns(Prism::Location) }
+ def closing_loc; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#17060
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#17055
+ def compact_child_nodes; end
+
+ # def content: () -> String
+ #
+ # source://prism//lib/prism/node.rb#17100
+ sig { returns(String) }
+ def content; end
+
+ # attr_reader content_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#17026
+ sig { returns(Prism::Location) }
+ def content_loc; end
+
+ # def copy: (**params) -> XStringNode
+ #
+ # source://prism//lib/prism/node.rb#17065
+ sig { params(params: T.untyped).returns(Prism::XStringNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#17050
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#17080
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def forced_binary_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#17090
+ sig { returns(T::Boolean) }
+ def forced_binary_encoding?; end
+
+ # def forced_utf8_encoding?: () -> bool
+ #
+ # @return [Boolean]
+ #
+ # source://prism//lib/prism/node.rb#17085
+ sig { returns(T::Boolean) }
+ def forced_utf8_encoding?; end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#17110
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def opening: () -> String
+ #
+ # source://prism//lib/prism/node.rb#17095
+ sig { returns(String) }
+ def opening; end
+
+ # attr_reader opening_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#17023
+ sig { returns(Prism::Location) }
+ def opening_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#17135
+ def type; end
+
+ # attr_reader unescaped: String
+ #
+ # source://prism//lib/prism/node.rb#17032
+ sig { returns(String) }
+ def unescaped; end
+
+ private
+
+ # Returns the value of attribute flags.
+ #
+ # source://prism//lib/prism/node.rb#17020
+ sig { returns(Integer) }
+ def flags; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#17145
+ def type; end
+ end
+end
+
+# Represents the use of the `yield` keyword.
+#
+# yield 1
+# ^^^^^^^
+#
+# source://prism//lib/prism/node.rb#17154
+class Prism::YieldNode < ::Prism::Node
+ # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void
+ #
+ # @return [YieldNode] a new instance of YieldNode
+ #
+ # source://prism//lib/prism/node.rb#17168
+ sig do
+ params(
+ keyword_loc: Prism::Location,
+ lparen_loc: T.nilable(Prism::Location),
+ arguments: T.nilable(Prism::ArgumentsNode),
+ rparen_loc: T.nilable(Prism::Location),
+ location: Prism::Location
+ ).void
+ end
+ def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, location); end
+
+ # def accept: (visitor: Visitor) -> void
+ #
+ # source://prism//lib/prism/node.rb#17177
+ sig { params(visitor: Prism::Visitor).void }
+ def accept(visitor); end
+
+ # attr_reader arguments: ArgumentsNode?
+ #
+ # source://prism//lib/prism/node.rb#17162
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
+ def arguments; end
+
+ # def child_nodes: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#17182
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def child_nodes; end
+
+ # def comment_targets: () -> Array[Node | Location]
+ #
+ # source://prism//lib/prism/node.rb#17194
+ def comment_targets; end
+
+ # def compact_child_nodes: () -> Array[Node]
+ #
+ # source://prism//lib/prism/node.rb#17187
+ def compact_child_nodes; end
+
+ # def copy: (**params) -> YieldNode
+ #
+ # source://prism//lib/prism/node.rb#17199
+ sig { params(params: T.untyped).returns(Prism::YieldNode) }
+ def copy(**params); end
+
+ # def child_nodes: () -> Array[nil | Node]
+ # def deconstruct: () -> Array[nil | Node]
+ #
+ # source://prism//lib/prism/node.rb#17182
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
+ def deconstruct; end
+
+ # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
+ #
+ # source://prism//lib/prism/node.rb#17213
+ sig do
+ params(
+ keys: T::Array[Symbol]
+ ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))])
+ end
+ def deconstruct_keys(keys); end
+
+ # def inspect(inspector: NodeInspector) -> String
+ #
+ # source://prism//lib/prism/node.rb#17233
+ def inspect(inspector = T.unsafe(nil)); end
+
+ # def keyword: () -> String
+ #
+ # source://prism//lib/prism/node.rb#17218
+ sig { returns(String) }
+ def keyword; end
+
+ # attr_reader keyword_loc: Location
+ #
+ # source://prism//lib/prism/node.rb#17156
+ sig { returns(Prism::Location) }
+ def keyword_loc; end
+
+ # def lparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#17223
+ sig { returns(T.nilable(String)) }
+ def lparen; end
+
+ # attr_reader lparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#17159
+ sig { returns(T.nilable(Prism::Location)) }
+ def lparen_loc; end
+
+ # def rparen: () -> String?
+ #
+ # source://prism//lib/prism/node.rb#17228
+ sig { returns(T.nilable(String)) }
+ def rparen; end
+
+ # attr_reader rparen_loc: Location?
+ #
+ # source://prism//lib/prism/node.rb#17165
+ sig { returns(T.nilable(Prism::Location)) }
+ def rparen_loc; end
+
+ # Sometimes you want to check an instance of a node against a list of
+ # classes to see what kind of behavior to perform. Usually this is done by
+ # calling `[cls1, cls2].include?(node.class)` or putting the node into a
+ # case statement and doing `case node; when cls1; when cls2; end`. Both of
+ # these approaches are relatively slow because of the constant lookups,
+ # method calls, and/or array allocations.
+ #
+ # Instead, you can call #type, which will return to you a symbol that you
+ # can use for comparison. This is faster than the other approaches because
+ # it uses a single integer comparison, but also because if you're on CRuby
+ # you can take advantage of the fact that case statements with all symbol
+ # keys will use a jump table.
+ #
+ # def type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#17261
+ def type; end
+
+ class << self
+ # Similar to #type, this method returns a symbol that you can use for
+ # splitting on the type of the node without having to do a long === chain.
+ # Note that like #type, it will still be slower than using == for a single
+ # class, but should be faster in a case statement or an array comparison.
+ #
+ # def self.type: () -> Symbol
+ #
+ # source://prism//lib/prism/node.rb#17271
+ def type; end
+ end
+end
diff --git a/sorbet/rbi/gems/psych@5.1.2.rbi b/sorbet/rbi/gems/psych@5.1.2.rbi
new file mode 100644
index 00000000..5d651c68
--- /dev/null
+++ b/sorbet/rbi/gems/psych@5.1.2.rbi
@@ -0,0 +1,1768 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `psych` gem.
+# Please instead update this file by running `bin/tapioca gem psych`.
+
+# source://psych//lib/psych/core_ext.rb#2
+class Object < ::BasicObject
+ include ::Kernel
+ include ::PP::ObjectMixin
+
+ # call-seq: to_yaml(options = {})
+ #
+ # Convert an object to YAML. See Psych.dump for more information on the
+ # available +options+.
+ #
+ # source://psych//lib/psych/core_ext.rb#12
+ def to_yaml(options = T.unsafe(nil)); end
+
+ class << self
+ # source://psych//lib/psych/core_ext.rb#3
+ def yaml_tag(url); end
+ end
+end
+
+# = Overview
+#
+# Psych is a YAML parser and emitter.
+# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML]
+# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing
+# and emitting capabilities. In addition to wrapping libyaml, Psych also
+# knows how to serialize and de-serialize most Ruby objects to and from
+# the YAML format.
+#
+# = I NEED TO PARSE OR EMIT YAML RIGHT NOW!
+#
+# # Parse some YAML
+# Psych.load("--- foo") # => "foo"
+#
+# # Emit some YAML
+# Psych.dump("foo") # => "--- foo\n...\n"
+# { :a => 'b'}.to_yaml # => "---\n:a: b\n"
+#
+# Got more time on your hands? Keep on reading!
+#
+# == YAML Parsing
+#
+# Psych provides a range of interfaces for parsing a YAML document ranging from
+# low level to high level, depending on your parsing needs. At the lowest
+# level, is an event based parser. Mid level is access to the raw YAML AST,
+# and at the highest level is the ability to unmarshal YAML to Ruby objects.
+#
+# == YAML Emitting
+#
+# Psych provides a range of interfaces ranging from low to high level for
+# producing YAML documents. Very similar to the YAML parsing interfaces, Psych
+# provides at the lowest level, an event based system, mid-level is building
+# a YAML AST, and the highest level is converting a Ruby object straight to
+# a YAML document.
+#
+# == High-level API
+#
+# === Parsing
+#
+# The high level YAML parser provided by Psych simply takes YAML as input and
+# returns a Ruby data structure. For information on using the high level parser
+# see Psych.load
+#
+# ==== Reading from a string
+#
+# Psych.safe_load("--- a") # => 'a'
+# Psych.safe_load("---\n - a\n - b") # => ['a', 'b']
+# # From a trusted string:
+# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42
+#
+# ==== Reading from a file
+#
+# Psych.safe_load_file("data.yml", permitted_classes: [Date])
+# Psych.load_file("trusted_database.yml")
+#
+# ==== Exception handling
+#
+# begin
+# # The second argument changes only the exception contents
+# Psych.parse("--- `", "file.txt")
+# rescue Psych::SyntaxError => ex
+# ex.file # => 'file.txt'
+# ex.message # => "(file.txt): found character that cannot start any token"
+# end
+#
+# === Emitting
+#
+# The high level emitter has the easiest interface. Psych simply takes a Ruby
+# data structure and converts it to a YAML document. See Psych.dump for more
+# information on dumping a Ruby data structure.
+#
+# ==== Writing to a string
+#
+# # Dump an array, get back a YAML string
+# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
+#
+# # Dump an array to an IO object
+# Psych.dump(['a', 'b'], StringIO.new) # => #
+#
+# # Dump an array with indentation set
+# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n"
+#
+# # Dump an array to an IO with indentation set
+# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
+#
+# ==== Writing to a file
+#
+# Currently there is no direct API for dumping Ruby structure to file:
+#
+# File.open('database.yml', 'w') do |file|
+# file.write(Psych.dump(['a', 'b']))
+# end
+#
+# == Mid-level API
+#
+# === Parsing
+#
+# Psych provides access to an AST produced from parsing a YAML document. This
+# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can
+# be examined and manipulated freely. Please see Psych::parse_stream,
+# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with
+# YAML syntax trees.
+#
+# ==== Reading from a string
+#
+# # Returns Psych::Nodes::Stream
+# Psych.parse_stream("---\n - a\n - b")
+#
+# # Returns Psych::Nodes::Document
+# Psych.parse("---\n - a\n - b")
+#
+# ==== Reading from a file
+#
+# # Returns Psych::Nodes::Stream
+# Psych.parse_stream(File.read('database.yml'))
+#
+# # Returns Psych::Nodes::Document
+# Psych.parse_file('database.yml')
+#
+# ==== Exception handling
+#
+# begin
+# # The second argument changes only the exception contents
+# Psych.parse("--- `", "file.txt")
+# rescue Psych::SyntaxError => ex
+# ex.file # => 'file.txt'
+# ex.message # => "(file.txt): found character that cannot start any token"
+# end
+#
+# === Emitting
+#
+# At the mid level is building an AST. This AST is exactly the same as the AST
+# used when parsing a YAML document. Users can build an AST by hand and the
+# AST knows how to emit itself as a YAML document. See Psych::Nodes,
+# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building
+# a YAML AST.
+#
+# ==== Writing to a string
+#
+# # We need Psych::Nodes::Stream (not Psych::Nodes::Document)
+# stream = Psych.parse_stream("---\n - a\n - b")
+#
+# stream.to_yaml # => "---\n- a\n- b\n"
+#
+# ==== Writing to a file
+#
+# # We need Psych::Nodes::Stream (not Psych::Nodes::Document)
+# stream = Psych.parse_stream(File.read('database.yml'))
+#
+# File.open('database.yml', 'w') do |file|
+# file.write(stream.to_yaml)
+# end
+#
+# == Low-level API
+#
+# === Parsing
+#
+# The lowest level parser should be used when the YAML input is already known,
+# and the developer does not want to pay the price of building an AST or
+# automatic detection and conversion to Ruby objects. See Psych::Parser for
+# more information on using the event based parser.
+#
+# ==== Reading to Psych::Nodes::Stream structure
+#
+# parser = Psych::Parser.new(TreeBuilder.new) # => #
+# parser = Psych.parser # it's an alias for the above
+#
+# parser.parse("---\n - a\n - b") # => #
+# parser.handler # => #
+# parser.handler.root # => #
+#
+# ==== Receiving an events stream
+#
+# recorder = Psych::Handlers::Recorder.new
+# parser = Psych::Parser.new(recorder)
+#
+# parser.parse("---\n - a\n - b")
+# recorder.events # => [list of [event, args] lists]
+# # event is one of: Psych::Handler::EVENTS
+# # args are the arguments passed to the event
+#
+# === Emitting
+#
+# The lowest level emitter is an event based system. Events are sent to a
+# Psych::Emitter object. That object knows how to convert the events to a YAML
+# document. This interface should be used when document format is known in
+# advance or speed is a concern. See Psych::Emitter for more information.
+#
+# ==== Writing to a Ruby structure
+#
+# Psych.parser.parse("--- a") # => #
+#
+# parser.handler.first # => #
+# parser.handler.first.to_ruby # => ["a"]
+#
+# parser.handler.root.first # => #
+# parser.handler.root.first.to_ruby # => "a"
+#
+# # You can instantiate an Emitter manually
+# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first)
+# # => "a"
+#
+# source://psych//lib/psych/versions.rb#3
+module Psych
+ class << self
+ # source://psych//lib/psych.rb#682
+ def add_builtin_type(type_tag, &block); end
+
+ # :stopdoc:
+ #
+ # source://psych//lib/psych.rb#676
+ def add_domain_type(domain, type_tag, &block); end
+
+ # source://psych//lib/psych.rb#692
+ def add_tag(tag, klass); end
+
+ # source://psych//lib/psych.rb#708
+ def config; end
+
+ # source://psych//lib/psych.rb#720
+ def domain_types; end
+
+ # source://psych//lib/psych.rb#732
+ def domain_types=(value); end
+
+ # call-seq:
+ # Psych.dump(o) -> string of yaml
+ # Psych.dump(o, options) -> string of yaml
+ # Psych.dump(o, io) -> io object passed in
+ # Psych.dump(o, io, options) -> io object passed in
+ #
+ # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in
+ # to control the output format. If an IO object is passed in, the YAML will
+ # be dumped to that IO object.
+ #
+ # Currently supported options are:
+ #
+ # [:indentation] Number of space characters used to indent.
+ # Acceptable value should be in 0..9 range,
+ # otherwise option is ignored.
+ #
+ # Default: 2.
+ # [:line_width] Max character to wrap line at.
+ #
+ # Default: 0 (meaning "wrap at 81").
+ # [:canonical] Write "canonical" YAML form (very verbose, yet
+ # strictly formal).
+ #
+ # Default: false.
+ # [:header] Write %YAML [version] at the beginning of document.
+ #
+ # Default: false.
+ #
+ # Example:
+ #
+ # # Dump an array, get back a YAML string
+ # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
+ #
+ # # Dump an array to an IO object
+ # Psych.dump(['a', 'b'], StringIO.new) # => #
+ #
+ # # Dump an array with indentation set
+ # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n"
+ #
+ # # Dump an array to an IO with indentation set
+ # Psych.dump(['a', ['b']], StringIO.new, indentation: 3)
+ #
+ # source://psych//lib/psych.rb#505
+ def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end
+
+ # Dump a list of objects as separate documents to a document stream.
+ #
+ # Example:
+ #
+ # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n"
+ #
+ # source://psych//lib/psych.rb#595
+ def dump_stream(*objects); end
+
+ # source://psych//lib/psych.rb#716
+ def dump_tags; end
+
+ # source://psych//lib/psych.rb#728
+ def dump_tags=(value); end
+
+ # Load +yaml+ in to a Ruby data structure. If multiple documents are
+ # provided, the object contained in the first document will be returned.
+ # +filename+ will be used in the exception message if any exception
+ # is raised while parsing. If +yaml+ is empty, it returns
+ # the specified +fallback+ return value, which defaults to +false+.
+ #
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
+ #
+ # Example:
+ #
+ # Psych.load("--- a") # => 'a'
+ # Psych.load("---\n - a\n - b") # => ['a', 'b']
+ #
+ # begin
+ # Psych.load("--- `", filename: "file.txt")
+ # rescue Psych::SyntaxError => ex
+ # ex.file # => 'file.txt'
+ # ex.message # => "(file.txt): found character that cannot start any token"
+ # end
+ #
+ # When the optional +symbolize_names+ keyword argument is set to a
+ # true value, returns symbols for keys in Hash objects (default: strings).
+ #
+ # Psych.load("---\n foo: bar") # => {"foo"=>"bar"}
+ # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
+ #
+ # Raises a TypeError when `yaml` parameter is NilClass. This method is
+ # similar to `safe_load` except that `Symbol` objects are allowed by default.
+ #
+ # source://psych//lib/psych.rb#368
+ def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
+
+ # Loads the document contained in +filename+. Returns the yaml contained in
+ # +filename+ as a Ruby object, or if the file is empty, it returns
+ # the specified +fallback+ return value, which defaults to +false+.
+ # See load for options.
+ #
+ # source://psych//lib/psych.rb#669
+ def load_file(filename, **kwargs); end
+
+ # Load multiple documents given in +yaml+. Returns the parsed documents
+ # as a list. If a block is given, each document will be converted to Ruby
+ # and passed to the block during parsing
+ #
+ # Example:
+ #
+ # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar']
+ #
+ # list = []
+ # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby|
+ # list << ruby
+ # end
+ # list # => ['foo', 'bar']
+ #
+ # source://psych//lib/psych.rb#626
+ def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end
+
+ # source://psych//lib/psych.rb#712
+ def load_tags; end
+
+ # source://psych//lib/psych.rb#724
+ def load_tags=(value); end
+
+ # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document.
+ # +filename+ is used in the exception message if a Psych::SyntaxError is
+ # raised.
+ #
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
+ #
+ # Example:
+ #
+ # Psych.parse("---\n - a\n - b") # => #
+ #
+ # begin
+ # Psych.parse("--- `", filename: "file.txt")
+ # rescue Psych::SyntaxError => ex
+ # ex.file # => 'file.txt'
+ # ex.message # => "(file.txt): found character that cannot start any token"
+ # end
+ #
+ # See Psych::Nodes for more information about YAML AST.
+ #
+ # source://psych//lib/psych.rb#398
+ def parse(yaml, filename: T.unsafe(nil)); end
+
+ # Parse a file at +filename+. Returns the Psych::Nodes::Document.
+ #
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
+ #
+ # source://psych//lib/psych.rb#410
+ def parse_file(filename, fallback: T.unsafe(nil)); end
+
+ # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream.
+ # This method can handle multiple YAML documents contained in +yaml+.
+ # +filename+ is used in the exception message if a Psych::SyntaxError is
+ # raised.
+ #
+ # If a block is given, a Psych::Nodes::Document node will be yielded to the
+ # block as it's being parsed.
+ #
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
+ #
+ # Example:
+ #
+ # Psych.parse_stream("---\n - a\n - b") # => #
+ #
+ # Psych.parse_stream("--- a\n--- b") do |node|
+ # node # => #
+ # end
+ #
+ # begin
+ # Psych.parse_stream("--- `", filename: "file.txt")
+ # rescue Psych::SyntaxError => ex
+ # ex.file # => 'file.txt'
+ # ex.message # => "(file.txt): found character that cannot start any token"
+ # end
+ #
+ # Raises a TypeError when NilClass is passed.
+ #
+ # See Psych::Nodes for more information about YAML AST.
+ #
+ # source://psych//lib/psych.rb#452
+ def parse_stream(yaml, filename: T.unsafe(nil), &block); end
+
+ # Returns a default parser
+ #
+ # source://psych//lib/psych.rb#419
+ def parser; end
+
+ # source://psych//lib/psych.rb#688
+ def remove_type(type_tag); end
+
+ # call-seq:
+ # Psych.safe_dump(o) -> string of yaml
+ # Psych.safe_dump(o, options) -> string of yaml
+ # Psych.safe_dump(o, io) -> io object passed in
+ # Psych.safe_dump(o, io, options) -> io object passed in
+ #
+ # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in
+ # to control the output format. If an IO object is passed in, the YAML will
+ # be dumped to that IO object. By default, only the following
+ # classes are allowed to be serialized:
+ #
+ # * TrueClass
+ # * FalseClass
+ # * NilClass
+ # * Integer
+ # * Float
+ # * String
+ # * Array
+ # * Hash
+ #
+ # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+
+ # keyword argument. They are additive. For example, to allow Date serialization:
+ #
+ # Psych.safe_dump(yaml, permitted_classes: [Date])
+ #
+ # Now the Date class can be dumped in addition to the classes listed above.
+ #
+ # A Psych::DisallowedClass exception will be raised if the object contains a
+ # class that isn't in the +permitted_classes+ list.
+ #
+ # Currently supported options are:
+ #
+ # [:indentation] Number of space characters used to indent.
+ # Acceptable value should be in 0..9 range,
+ # otherwise option is ignored.
+ #
+ # Default: 2.
+ # [:line_width] Max character to wrap line at.
+ #
+ # Default: 0 (meaning "wrap at 81").
+ # [:canonical] Write "canonical" YAML form (very verbose, yet
+ # strictly formal).
+ #
+ # Default: false.
+ # [:header] Write %YAML [version] at the beginning of document.
+ #
+ # Default: false.
+ #
+ # Example:
+ #
+ # # Dump an array, get back a YAML string
+ # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n"
+ #
+ # # Dump an array to an IO object
+ # Psych.safe_dump(['a', 'b'], StringIO.new) # => #
+ #
+ # # Dump an array with indentation set
+ # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n"
+ #
+ # # Dump an array to an IO with indentation set
+ # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3)
+ #
+ # source://psych//lib/psych.rb#578
+ def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end
+
+ # Safely load the yaml string in +yaml+. By default, only the following
+ # classes are allowed to be deserialized:
+ #
+ # * TrueClass
+ # * FalseClass
+ # * NilClass
+ # * Integer
+ # * Float
+ # * String
+ # * Array
+ # * Hash
+ #
+ # Recursive data structures are not allowed by default. Arbitrary classes
+ # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are
+ # additive. For example, to allow Date deserialization:
+ #
+ # Psych.safe_load(yaml, permitted_classes: [Date])
+ #
+ # Now the Date class can be loaded in addition to the classes listed above.
+ #
+ # Aliases can be explicitly allowed by changing the +aliases+ keyword argument.
+ # For example:
+ #
+ # x = []
+ # x << x
+ # yaml = Psych.dump x
+ # Psych.safe_load yaml # => raises an exception
+ # Psych.safe_load yaml, aliases: true # => loads the aliases
+ #
+ # A Psych::DisallowedClass exception will be raised if the yaml contains a
+ # class that isn't in the +permitted_classes+ list.
+ #
+ # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases
+ # but the +aliases+ keyword argument is set to false.
+ #
+ # +filename+ will be used in the exception message if any exception is raised
+ # while parsing.
+ #
+ # When the optional +symbolize_names+ keyword argument is set to a
+ # true value, returns symbols for keys in Hash objects (default: strings).
+ #
+ # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"}
+ # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
+ #
+ # source://psych//lib/psych.rb#322
+ def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
+
+ # Safely loads the document contained in +filename+. Returns the yaml contained in
+ # +filename+ as a Ruby object, or if the file is empty, it returns
+ # the specified +fallback+ return value, which defaults to +false+.
+ # See safe_load for options.
+ #
+ # source://psych//lib/psych.rb#658
+ def safe_load_file(filename, **kwargs); end
+
+ # Dump Ruby +object+ to a JSON string.
+ #
+ # source://psych//lib/psych.rb#605
+ def to_json(object); end
+
+ # Load +yaml+ in to a Ruby data structure. If multiple documents are
+ # provided, the object contained in the first document will be returned.
+ # +filename+ will be used in the exception message if any exception
+ # is raised while parsing. If +yaml+ is empty, it returns
+ # the specified +fallback+ return value, which defaults to +false+.
+ #
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
+ #
+ # Example:
+ #
+ # Psych.unsafe_load("--- a") # => 'a'
+ # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b']
+ #
+ # begin
+ # Psych.unsafe_load("--- `", filename: "file.txt")
+ # rescue Psych::SyntaxError => ex
+ # ex.file # => 'file.txt'
+ # ex.message # => "(file.txt): found character that cannot start any token"
+ # end
+ #
+ # When the optional +symbolize_names+ keyword argument is set to a
+ # true value, returns symbols for keys in Hash objects (default: strings).
+ #
+ # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"}
+ # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
+ #
+ # Raises a TypeError when `yaml` parameter is NilClass
+ #
+ # NOTE: This method *should not* be used to parse untrusted documents, such as
+ # YAML documents that are supplied via user input. Instead, please use the
+ # load method or the safe_load method.
+ #
+ # source://psych//lib/psych.rb#271
+ def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
+
+ # Load the document contained in +filename+. Returns the yaml contained in
+ # +filename+ as a Ruby object, or if the file is empty, it returns
+ # the specified +fallback+ return value, which defaults to +false+.
+ #
+ # NOTE: This method *should not* be used to parse untrusted documents, such as
+ # YAML documents that are supplied via user input. Instead, please use the
+ # safe_load_file method.
+ #
+ # source://psych//lib/psych.rb#647
+ def unsafe_load_file(filename, **kwargs); end
+ end
+end
+
+# Subclasses `BadAlias` for backwards compatibility
+#
+# source://psych//lib/psych/exception.rb#10
+class Psych::AliasesNotEnabled < ::Psych::BadAlias
+ # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled
+ #
+ # source://psych//lib/psych/exception.rb#11
+ def initialize; end
+end
+
+# Subclasses `BadAlias` for backwards compatibility
+#
+# source://psych//lib/psych/exception.rb#17
+class Psych::AnchorNotDefined < ::Psych::BadAlias
+ # @return [AnchorNotDefined] a new instance of AnchorNotDefined
+ #
+ # source://psych//lib/psych/exception.rb#18
+ def initialize(anchor_name); end
+end
+
+# source://psych//lib/psych/class_loader.rb#6
+class Psych::ClassLoader
+ # @return [ClassLoader] a new instance of ClassLoader
+ #
+ # source://psych//lib/psych/class_loader.rb#21
+ def initialize; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def big_decimal; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def complex; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def date; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def date_time; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def exception; end
+
+ # source://psych//lib/psych/class_loader.rb#25
+ def load(klassname); end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def object; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def psych_omap; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def psych_set; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def range; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def rational; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def regexp; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def struct; end
+
+ # source://psych//lib/psych/class_loader.rb#39
+ def symbol; end
+
+ # source://psych//lib/psych/class_loader.rb#31
+ def symbolize(sym); end
+
+ private
+
+ # source://psych//lib/psych/class_loader.rb#47
+ def find(klassname); end
+
+ # source://psych//lib/psych/class_loader.rb#51
+ def resolve(klassname); end
+end
+
+# source://psych//lib/psych/class_loader.rb#76
+class Psych::ClassLoader::Restricted < ::Psych::ClassLoader
+ # @return [Restricted] a new instance of Restricted
+ #
+ # source://psych//lib/psych/class_loader.rb#77
+ def initialize(classes, symbols); end
+
+ # source://psych//lib/psych/class_loader.rb#83
+ def symbolize(sym); end
+
+ private
+
+ # source://psych//lib/psych/class_loader.rb#95
+ def find(klassname); end
+end
+
+# If an object defines +encode_with+, then an instance of Psych::Coder will
+# be passed to the method when the object is being serialized. The Coder
+# automatically assumes a Psych::Nodes::Mapping is being emitted. Other
+# objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are
+# called, respectively.
+#
+# source://psych//lib/psych/coder.rb#9
+class Psych::Coder
+ # @return [Coder] a new instance of Coder
+ #
+ # source://psych//lib/psych/coder.rb#13
+ def initialize(tag); end
+
+ # source://psych//lib/psych/coder.rb#84
+ def [](k); end
+
+ # source://psych//lib/psych/coder.rb#78
+ def []=(k, v); end
+
+ # source://psych//lib/psych/coder.rb#78
+ def add(k, v); end
+
+ # Returns the value of attribute implicit.
+ #
+ # source://psych//lib/psych/coder.rb#10
+ def implicit; end
+
+ # Sets the attribute implicit
+ #
+ # @param value the value to set the attribute implicit to.
+ #
+ # source://psych//lib/psych/coder.rb#10
+ def implicit=(_arg0); end
+
+ # Emit a map. The coder will be yielded to the block.
+ #
+ # @yield [_self]
+ # @yieldparam _self [Psych::Coder] the object that the method was called on
+ #
+ # source://psych//lib/psych/coder.rb#34
+ def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end
+
+ # Emit a map with +value+
+ #
+ # source://psych//lib/psych/coder.rb#73
+ def map=(map); end
+
+ # Returns the value of attribute object.
+ #
+ # source://psych//lib/psych/coder.rb#10
+ def object; end
+
+ # Sets the attribute object
+ #
+ # @param value the value to set the attribute object to.
+ #
+ # source://psych//lib/psych/coder.rb#10
+ def object=(_arg0); end
+
+ # Emit a sequence with +map+ and +tag+
+ #
+ # source://psych//lib/psych/coder.rb#54
+ def represent_map(tag, map); end
+
+ # Emit an arbitrary object +obj+ and +tag+
+ #
+ # source://psych//lib/psych/coder.rb#60
+ def represent_object(tag, obj); end
+
+ # Emit a scalar with +value+ and +tag+
+ #
+ # source://psych//lib/psych/coder.rb#42
+ def represent_scalar(tag, value); end
+
+ # Emit a sequence with +list+ and +tag+
+ #
+ # source://psych//lib/psych/coder.rb#48
+ def represent_seq(tag, list); end
+
+ # source://psych//lib/psych/coder.rb#24
+ def scalar(*args); end
+
+ # Emit a scalar with +value+
+ #
+ # source://psych//lib/psych/coder.rb#67
+ def scalar=(value); end
+
+ # Returns the value of attribute seq.
+ #
+ # source://psych//lib/psych/coder.rb#11
+ def seq; end
+
+ # Emit a sequence of +list+
+ #
+ # source://psych//lib/psych/coder.rb#90
+ def seq=(list); end
+
+ # Returns the value of attribute style.
+ #
+ # source://psych//lib/psych/coder.rb#10
+ def style; end
+
+ # Sets the attribute style
+ #
+ # @param value the value to set the attribute style to.
+ #
+ # source://psych//lib/psych/coder.rb#10
+ def style=(_arg0); end
+
+ # Returns the value of attribute tag.
+ #
+ # source://psych//lib/psych/coder.rb#10
+ def tag; end
+
+ # Sets the attribute tag
+ #
+ # @param value the value to set the attribute tag to.
+ #
+ # source://psych//lib/psych/coder.rb#10
+ def tag=(_arg0); end
+
+ # Returns the value of attribute type.
+ #
+ # source://psych//lib/psych/coder.rb#11
+ def type; end
+end
+
+# source://psych//lib/psych/exception.rb#23
+class Psych::DisallowedClass < ::Psych::Exception
+ # @return [DisallowedClass] a new instance of DisallowedClass
+ #
+ # source://psych//lib/psych/exception.rb#24
+ def initialize(action, klass_name); end
+end
+
+# Psych::Handler is an abstract base class that defines the events used
+# when dealing with Psych::Parser. Clients who want to use Psych::Parser
+# should implement a class that inherits from Psych::Handler and define
+# events that they can handle.
+#
+# Psych::Handler defines all events that Psych::Parser can possibly send to
+# event handlers.
+#
+# See Psych::Parser for more details
+#
+# source://psych//lib/psych/handler.rb#13
+class Psych::Handler
+ # Called when an alias is found to +anchor+. +anchor+ will be the name
+ # of the anchor found.
+ #
+ # === Example
+ #
+ # Here we have an example of an array that references itself in YAML:
+ #
+ # --- &ponies
+ # - first element
+ # - *ponies
+ #
+ # &ponies is the anchor, *ponies is the alias. In this case, alias is
+ # called with "ponies".
+ #
+ # source://psych//lib/psych/handler.rb#110
+ def alias(anchor); end
+
+ # Called when an empty event happens. (Which, as far as I can tell, is
+ # never).
+ #
+ # source://psych//lib/psych/handler.rb#236
+ def empty; end
+
+ # Called with the document ends. +implicit+ is a boolean value indicating
+ # whether or not the document has an implicit ending.
+ #
+ # === Example
+ #
+ # Given the following YAML:
+ #
+ # ---
+ # hello world
+ #
+ # +implicit+ will be true. Given this YAML:
+ #
+ # ---
+ # hello world
+ # ...
+ #
+ # +implicit+ will be false.
+ #
+ # source://psych//lib/psych/handler.rb#93
+ def end_document(implicit); end
+
+ # Called when a map ends
+ #
+ # source://psych//lib/psych/handler.rb#230
+ def end_mapping; end
+
+ # Called when a sequence ends.
+ #
+ # source://psych//lib/psych/handler.rb#191
+ def end_sequence; end
+
+ # Called when the YAML stream ends
+ #
+ # source://psych//lib/psych/handler.rb#241
+ def end_stream; end
+
+ # Called before each event with line/column information.
+ #
+ # source://psych//lib/psych/handler.rb#246
+ def event_location(start_line, start_column, end_line, end_column); end
+
+ # Called when a scalar +value+ is found. The scalar may have an
+ # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+
+ #
+ # +value+ is the string value of the scalar
+ # +anchor+ is an associated anchor or nil
+ # +tag+ is an associated tag or nil
+ # +plain+ is a boolean value
+ # +quoted+ is a boolean value
+ # +style+ is an integer indicating the string style
+ #
+ # See the constants in Psych::Nodes::Scalar for the possible values of
+ # +style+
+ #
+ # === Example
+ #
+ # Here is a YAML document that exercises most of the possible ways this
+ # method can be called:
+ #
+ # ---
+ # - !str "foo"
+ # - &anchor fun
+ # - many
+ # lines
+ # - |
+ # many
+ # newlines
+ #
+ # The above YAML document contains a list with four strings. Here are
+ # the parameters sent to this method in the same order:
+ #
+ # # value anchor tag plain quoted style
+ # ["foo", nil, "!str", false, false, 3 ]
+ # ["fun", "anchor", nil, true, false, 1 ]
+ # ["many lines", nil, nil, true, false, 1 ]
+ # ["many\nnewlines\n", nil, nil, false, true, 4 ]
+ #
+ # source://psych//lib/psych/handler.rb#150
+ def scalar(value, anchor, tag, plain, quoted, style); end
+
+ # Called when the document starts with the declared +version+,
+ # +tag_directives+, if the document is +implicit+.
+ #
+ # +version+ will be an array of integers indicating the YAML version being
+ # dealt with, +tag_directives+ is a list of tuples indicating the prefix
+ # and suffix of each tag, and +implicit+ is a boolean indicating whether
+ # the document is started implicitly.
+ #
+ # === Example
+ #
+ # Given the following YAML:
+ #
+ # %YAML 1.1
+ # %TAG ! tag:tenderlovemaking.com,2009:
+ # --- !squee
+ #
+ # The parameters for start_document must be this:
+ #
+ # version # => [1, 1]
+ # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]]
+ # implicit # => false
+ #
+ # source://psych//lib/psych/handler.rb#72
+ def start_document(version, tag_directives, implicit); end
+
+ # Called when a map starts.
+ #
+ # +anchor+ is the anchor associated with the map or +nil+.
+ # +tag+ is the tag associated with the map or +nil+.
+ # +implicit+ is a boolean indicating whether or not the map was implicitly
+ # started.
+ # +style+ is an integer indicating the mapping style.
+ #
+ # See the constants in Psych::Nodes::Mapping for the possible values of
+ # +style+.
+ #
+ # === Example
+ #
+ # Here is a YAML document that exercises most of the possible ways this
+ # method can be called:
+ #
+ # ---
+ # k: !!map { hello: world }
+ # v: &pewpew
+ # hello: world
+ #
+ # The above YAML document consists of three maps, an outer map that contains
+ # two inner maps. Below is a matrix of the parameters sent in order to
+ # represent these three maps:
+ #
+ # # anchor tag implicit style
+ # [nil, nil, true, 1 ]
+ # [nil, "tag:yaml.org,2002:map", false, 2 ]
+ # ["pewpew", nil, true, 1 ]
+ #
+ # source://psych//lib/psych/handler.rb#225
+ def start_mapping(anchor, tag, implicit, style); end
+
+ # Called when a sequence is started.
+ #
+ # +anchor+ is the anchor associated with the sequence or nil.
+ # +tag+ is the tag associated with the sequence or nil.
+ # +implicit+ a boolean indicating whether or not the sequence was implicitly
+ # started.
+ # +style+ is an integer indicating the list style.
+ #
+ # See the constants in Psych::Nodes::Sequence for the possible values of
+ # +style+.
+ #
+ # === Example
+ #
+ # Here is a YAML document that exercises most of the possible ways this
+ # method can be called:
+ #
+ # ---
+ # - !!seq [
+ # a
+ # ]
+ # - &pewpew
+ # - b
+ #
+ # The above YAML document consists of three lists, an outer list that
+ # contains two inner lists. Here is a matrix of the parameters sent
+ # to represent these lists:
+ #
+ # # anchor tag implicit style
+ # [nil, nil, true, 1 ]
+ # [nil, "tag:yaml.org,2002:seq", false, 2 ]
+ # ["pewpew", nil, true, 1 ]
+ #
+ # source://psych//lib/psych/handler.rb#186
+ def start_sequence(anchor, tag, implicit, style); end
+
+ # Called with +encoding+ when the YAML stream starts. This method is
+ # called once per stream. A stream may contain multiple documents.
+ #
+ # See the constants in Psych::Parser for the possible values of +encoding+.
+ #
+ # source://psych//lib/psych/handler.rb#47
+ def start_stream(encoding); end
+
+ # Is this handler a streaming handler?
+ #
+ # @return [Boolean]
+ #
+ # source://psych//lib/psych/handler.rb#251
+ def streaming?; end
+end
+
+# Configuration options for dumping YAML.
+#
+# source://psych//lib/psych/handler.rb#16
+class Psych::Handler::DumperOptions
+ # @return [DumperOptions] a new instance of DumperOptions
+ #
+ # source://psych//lib/psych/handler.rb#19
+ def initialize; end
+
+ # Returns the value of attribute canonical.
+ #
+ # source://psych//lib/psych/handler.rb#17
+ def canonical; end
+
+ # Sets the attribute canonical
+ #
+ # @param value the value to set the attribute canonical to.
+ #
+ # source://psych//lib/psych/handler.rb#17
+ def canonical=(_arg0); end
+
+ # Returns the value of attribute indentation.
+ #
+ # source://psych//lib/psych/handler.rb#17
+ def indentation; end
+
+ # Sets the attribute indentation
+ #
+ # @param value the value to set the attribute indentation to.
+ #
+ # source://psych//lib/psych/handler.rb#17
+ def indentation=(_arg0); end
+
+ # Returns the value of attribute line_width.
+ #
+ # source://psych//lib/psych/handler.rb#17
+ def line_width; end
+
+ # Sets the attribute line_width
+ #
+ # @param value the value to set the attribute line_width to.
+ #
+ # source://psych//lib/psych/handler.rb#17
+ def line_width=(_arg0); end
+end
+
+# source://psych//lib/psych/json/stream.rb#7
+class Psych::JSON::Stream < ::Psych::Visitors::JSONTree
+ include ::Psych::Streaming
+ extend ::Psych::Streaming::ClassMethods
+end
+
+# YAML event parser class. This class parses a YAML document and calls
+# events on the handler that is passed to the constructor. The events can
+# be used for things such as constructing a YAML AST or deserializing YAML
+# documents. It can even be fed back to Psych::Emitter to emit the same
+# document that was parsed.
+#
+# See Psych::Handler for documentation on the events that Psych::Parser emits.
+#
+# Here is an example that prints out ever scalar found in a YAML document:
+#
+# # Handler for detecting scalar values
+# class ScalarHandler < Psych::Handler
+# def scalar value, anchor, tag, plain, quoted, style
+# puts value
+# end
+# end
+#
+# parser = Psych::Parser.new(ScalarHandler.new)
+# parser.parse(yaml_document)
+#
+# Here is an example that feeds the parser back in to Psych::Emitter. The
+# YAML document is read from STDIN and written back out to STDERR:
+#
+# parser = Psych::Parser.new(Psych::Emitter.new($stderr))
+# parser.parse($stdin)
+#
+# Psych uses Psych::Parser in combination with Psych::TreeBuilder to
+# construct an AST of the parsed YAML document.
+#
+# source://psych//lib/psych/parser.rb#33
+class Psych::Parser
+ # Creates a new Psych::Parser instance with +handler+. YAML events will
+ # be called on +handler+. See Psych::Parser for more details.
+ #
+ # @return [Parser] a new instance of Parser
+ #
+ # source://psych//lib/psych/parser.rb#47
+ def initialize(handler = T.unsafe(nil)); end
+
+ # Set the encoding for this parser to +encoding+
+ #
+ # source://psych//lib/psych/parser.rb#41
+ def external_encoding=(_arg0); end
+
+ # The handler on which events will be called
+ #
+ # source://psych//lib/psych/parser.rb#38
+ def handler; end
+
+ # The handler on which events will be called
+ #
+ # source://psych//lib/psych/parser.rb#38
+ def handler=(_arg0); end
+
+ # call-seq:
+ # parser.parse(yaml)
+ #
+ # Parse the YAML document contained in +yaml+. Events will be called on
+ # the handler set on the parser instance.
+ #
+ # See Psych::Parser and Psych::Parser#handler
+ #
+ # source://psych//lib/psych/parser.rb#61
+ def parse(yaml, path = T.unsafe(nil)); end
+end
+
+# Scan scalars for built in types
+#
+# source://psych//lib/psych/scalar_scanner.rb#6
+class Psych::ScalarScanner
+ # Create a new scanner
+ #
+ # @return [ScalarScanner] a new instance of ScalarScanner
+ #
+ # source://psych//lib/psych/scalar_scanner.rb#30
+ def initialize(class_loader, strict_integer: T.unsafe(nil)); end
+
+ # Returns the value of attribute class_loader.
+ #
+ # source://psych//lib/psych/scalar_scanner.rb#27
+ def class_loader; end
+
+ # Parse and return an int from +string+
+ #
+ # source://psych//lib/psych/scalar_scanner.rb#109
+ def parse_int(string); end
+
+ # Parse and return a Time from +string+
+ #
+ # source://psych//lib/psych/scalar_scanner.rb#115
+ def parse_time(string); end
+
+ # Tokenize +string+ returning the Ruby object
+ #
+ # source://psych//lib/psych/scalar_scanner.rb#37
+ def tokenize(string); end
+end
+
+# Same as above, but allows commas.
+# Not to YML spec, but kept for backwards compatibility
+#
+# source://psych//lib/psych/scalar_scanner.rb#22
+Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp)
+
+# Taken from http://yaml.org/type/int.html
+#
+# source://psych//lib/psych/scalar_scanner.rb#15
+Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp)
+
+# Psych::Stream is a streaming YAML emitter. It will not buffer your YAML,
+# but send it straight to an IO.
+#
+# Here is an example use:
+#
+# stream = Psych::Stream.new($stdout)
+# stream.start
+# stream.push({:foo => 'bar'})
+# stream.finish
+#
+# YAML will be immediately emitted to $stdout with no buffering.
+#
+# Psych::Stream#start will take a block and ensure that Psych::Stream#finish
+# is called, so you can do this form:
+#
+# stream = Psych::Stream.new($stdout)
+# stream.start do |em|
+# em.push(:foo => 'bar')
+# end
+#
+# source://psych//lib/psych/stream.rb#24
+class Psych::Stream < ::Psych::Visitors::YAMLTree
+ include ::Psych::Streaming
+ extend ::Psych::Streaming::ClassMethods
+end
+
+# source://psych//lib/psych/stream.rb#25
+class Psych::Stream::Emitter < ::Psych::Emitter
+ # source://psych//lib/psych/stream.rb#26
+ def end_document(implicit_end = T.unsafe(nil)); end
+
+ # @return [Boolean]
+ #
+ # source://psych//lib/psych/stream.rb#30
+ def streaming?; end
+end
+
+# source://psych//lib/psych/streaming.rb#3
+module Psych::Streaming
+ # Start streaming using +encoding+
+ #
+ # source://psych//lib/psych/streaming.rb#18
+ def start(encoding = T.unsafe(nil)); end
+
+ private
+
+ # source://psych//lib/psych/streaming.rb#25
+ def register(target, obj); end
+end
+
+# source://psych//lib/psych/streaming.rb#4
+module Psych::Streaming::ClassMethods
+ # Create a new streaming emitter. Emitter will print to +io+. See
+ # Psych::Stream for an example.
+ #
+ # source://psych//lib/psych/streaming.rb#8
+ def new(io); end
+end
+
+# source://psych//lib/psych/syntax_error.rb#5
+class Psych::SyntaxError < ::Psych::Exception
+ # @return [SyntaxError] a new instance of SyntaxError
+ #
+ # source://psych//lib/psych/syntax_error.rb#8
+ def initialize(file, line, col, offset, problem, context); end
+
+ # Returns the value of attribute column.
+ #
+ # source://psych//lib/psych/syntax_error.rb#6
+ def column; end
+
+ # Returns the value of attribute context.
+ #
+ # source://psych//lib/psych/syntax_error.rb#6
+ def context; end
+
+ # Returns the value of attribute file.
+ #
+ # source://psych//lib/psych/syntax_error.rb#6
+ def file; end
+
+ # Returns the value of attribute line.
+ #
+ # source://psych//lib/psych/syntax_error.rb#6
+ def line; end
+
+ # Returns the value of attribute offset.
+ #
+ # source://psych//lib/psych/syntax_error.rb#6
+ def offset; end
+
+ # Returns the value of attribute problem.
+ #
+ # source://psych//lib/psych/syntax_error.rb#6
+ def problem; end
+end
+
+# This class works in conjunction with Psych::Parser to build an in-memory
+# parse tree that represents a YAML document.
+#
+# == Example
+#
+# parser = Psych::Parser.new Psych::TreeBuilder.new
+# parser.parse('--- foo')
+# tree = parser.handler.root
+#
+# See Psych::Handler for documentation on the event methods used in this
+# class.
+#
+# source://psych//lib/psych/tree_builder.rb#17
+class Psych::TreeBuilder < ::Psych::Handler
+ # Create a new TreeBuilder instance
+ #
+ # @return [TreeBuilder] a new instance of TreeBuilder
+ #
+ # source://psych//lib/psych/tree_builder.rb#22
+ def initialize; end
+
+ # source://psych//lib/psych/tree_builder.rb#103
+ def alias(anchor); end
+
+ # Handles end_document events with +version+, +tag_directives+,
+ # and +implicit+ styling.
+ #
+ # See Psych::Handler#start_document
+ #
+ # source://psych//lib/psych/tree_builder.rb#77
+ def end_document(implicit_end = T.unsafe(nil)); end
+
+ # source://psych//lib/psych/tree_builder.rb#52
+ def end_mapping; end
+
+ # source://psych//lib/psych/tree_builder.rb#52
+ def end_sequence; end
+
+ # source://psych//lib/psych/tree_builder.rb#90
+ def end_stream; end
+
+ # source://psych//lib/psych/tree_builder.rb#33
+ def event_location(start_line, start_column, end_line, end_column); end
+
+ # Returns the root node for the built tree
+ #
+ # source://psych//lib/psych/tree_builder.rb#19
+ def root; end
+
+ # source://psych//lib/psych/tree_builder.rb#96
+ def scalar(value, anchor, tag, plain, quoted, style); end
+
+ # Handles start_document events with +version+, +tag_directives+,
+ # and +implicit+ styling.
+ #
+ # See Psych::Handler#start_document
+ #
+ # source://psych//lib/psych/tree_builder.rb#65
+ def start_document(version, tag_directives, implicit); end
+
+ # source://psych//lib/psych/tree_builder.rb#45
+ def start_mapping(anchor, tag, implicit, style); end
+
+ # source://psych//lib/psych/tree_builder.rb#45
+ def start_sequence(anchor, tag, implicit, style); end
+
+ # source://psych//lib/psych/tree_builder.rb#84
+ def start_stream(encoding); end
+
+ private
+
+ # source://psych//lib/psych/tree_builder.rb#116
+ def pop; end
+
+ # source://psych//lib/psych/tree_builder.rb#111
+ def push(value); end
+
+ # source://psych//lib/psych/tree_builder.rb#132
+ def set_end_location(node); end
+
+ # source://psych//lib/psych/tree_builder.rb#122
+ def set_location(node); end
+
+ # source://psych//lib/psych/tree_builder.rb#127
+ def set_start_location(node); end
+end
+
+# The version of Psych you are using
+#
+# source://psych//lib/psych/versions.rb#5
+Psych::VERSION = T.let(T.unsafe(nil), String)
+
+# source://psych//lib/psych/visitors/depth_first.rb#4
+class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor
+ # @return [DepthFirst] a new instance of DepthFirst
+ #
+ # source://psych//lib/psych/visitors/depth_first.rb#5
+ def initialize(block); end
+
+ private
+
+ # source://psych//lib/psych/visitors/depth_first.rb#11
+ def nary(o); end
+
+ # source://psych//lib/psych/visitors/depth_first.rb#20
+ def terminal(o); end
+
+ # source://psych//lib/psych/visitors/depth_first.rb#20
+ def visit_Psych_Nodes_Alias(o); end
+
+ # source://psych//lib/psych/visitors/depth_first.rb#11
+ def visit_Psych_Nodes_Document(o); end
+
+ # source://psych//lib/psych/visitors/depth_first.rb#11
+ def visit_Psych_Nodes_Mapping(o); end
+
+ # source://psych//lib/psych/visitors/depth_first.rb#20
+ def visit_Psych_Nodes_Scalar(o); end
+
+ # source://psych//lib/psych/visitors/depth_first.rb#11
+ def visit_Psych_Nodes_Sequence(o); end
+
+ # source://psych//lib/psych/visitors/depth_first.rb#11
+ def visit_Psych_Nodes_Stream(o); end
+end
+
+# source://psych//lib/psych/visitors/yaml_tree.rb#540
+class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree
+ # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree
+ #
+ # source://psych//lib/psych/visitors/yaml_tree.rb#552
+ def initialize(emitter, ss, options); end
+
+ # source://psych//lib/psych/visitors/yaml_tree.rb#565
+ def accept(target); end
+
+ # source://psych//lib/psych/visitors/yaml_tree.rb#577
+ def visit_Symbol(sym); end
+end
+
+# source://psych//lib/psych/visitors/yaml_tree.rb#541
+Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash)
+
+# This class walks a YAML AST, converting each node to Ruby
+#
+# source://psych//lib/psych/visitors/to_ruby.rb#14
+class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor
+ # @return [ToRuby] a new instance of ToRuby
+ #
+ # source://psych//lib/psych/visitors/to_ruby.rb#23
+ def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#34
+ def accept(target); end
+
+ # Returns the value of attribute class_loader.
+ #
+ # source://psych//lib/psych/visitors/to_ruby.rb#21
+ def class_loader; end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#327
+ def visit_Psych_Nodes_Alias(o); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#319
+ def visit_Psych_Nodes_Document(o); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#165
+ def visit_Psych_Nodes_Mapping(o); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#129
+ def visit_Psych_Nodes_Scalar(o); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#133
+ def visit_Psych_Nodes_Sequence(o); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#323
+ def visit_Psych_Nodes_Stream(o); end
+
+ private
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#395
+ def deduplicate(key); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#51
+ def deserialize(o); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#412
+ def init_with(o, h, node); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#404
+ def merge_key(hash, key, val); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#333
+ def register(node, object); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#338
+ def register_empty(object); end
+
+ # Convert +klassname+ to a Class
+ #
+ # source://psych//lib/psych/visitors/to_ruby.rb#425
+ def resolve_class(klassname); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#407
+ def revive(klass, node); end
+
+ # source://psych//lib/psych/visitors/to_ruby.rb#344
+ def revive_hash(hash, o, tagged = T.unsafe(nil)); end
+
+ class << self
+ # source://psych//lib/psych/visitors/to_ruby.rb#15
+ def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
+ end
+end
+
+# source://psych//lib/psych/visitors/visitor.rb#4
+class Psych::Visitors::Visitor
+ # source://psych//lib/psych/visitors/visitor.rb#5
+ def accept(target); end
+
+ private
+
+ # source://psych//lib/psych/visitors/visitor.rb#19
+ def dispatch; end
+
+ # source://psych//lib/psych/visitors/visitor.rb#29
+ def visit(target); end
+
+ class << self
+ # @api private
+ #
+ # source://psych//lib/psych/visitors/visitor.rb#12
+ def dispatch_cache; end
+ end
+end
+
+# YAMLTree builds a YAML ast given a Ruby object. For example:
+#
+# builder = Psych::Visitors::YAMLTree.new
+# builder << { :foo => 'bar' }
+# builder.tree # => # ['a', 'b', 'c']
#
- # source://rake//lib/rake/file_utils.rb#128
+ # source://rake//lib/rake/file_utils.rb#126
def split_all(path); end
private
@@ -75,14 +75,14 @@ module FileUtils
# source://rake//lib/rake/file_utils.rb#61
def create_shell_runner(cmd); end
- # source://rake//lib/rake/file_utils.rb#86
+ # source://rake//lib/rake/file_utils.rb#84
def set_verbose_option(options); end
- # source://rake//lib/rake/file_utils.rb#73
+ # source://rake//lib/rake/file_utils.rb#71
def sh_show_command(cmd); end
end
-# source://rake//lib/rake/file_utils.rb#108
+# source://rake//lib/rake/file_utils.rb#106
FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array)
# Path to the currently running Ruby program
@@ -195,13 +195,13 @@ class Rake::Application
# Add a file to the list of files to be imported.
#
- # source://rake//lib/rake/application.rb#777
+ # source://rake//lib/rake/application.rb#801
def add_import(fn); end
# Add a loader to handle imported files ending in the extension
# +ext+.
#
- # source://rake//lib/rake/application.rb#139
+ # source://rake//lib/rake/application.rb#161
def add_loader(ext, loader); end
# Collect the list of tasks on the command line. If no tasks are
@@ -213,13 +213,13 @@ class Rake::Application
# recognised command-line options, which OptionParser.parse will
# have taken care of already.
#
- # source://rake//lib/rake/application.rb#758
+ # source://rake//lib/rake/application.rb#782
def collect_command_line_tasks(args); end
# Default task name ("default").
# (May be overridden by subclasses)
#
- # source://rake//lib/rake/application.rb#772
+ # source://rake//lib/rake/application.rb#796
def default_task_name; end
# Warn about deprecated usage.
@@ -227,75 +227,75 @@ class Rake::Application
# Example:
# Rake.application.deprecate("import", "Rake.import", caller.first)
#
- # source://rake//lib/rake/application.rb#258
+ # source://rake//lib/rake/application.rb#282
def deprecate(old_usage, new_usage, call_site); end
- # source://rake//lib/rake/application.rb#222
+ # source://rake//lib/rake/application.rb#244
def display_cause_details(ex); end
# Display the error message that caused the exception.
#
- # source://rake//lib/rake/application.rb#206
+ # source://rake//lib/rake/application.rb#228
def display_error_message(ex); end
- # source://rake//lib/rake/application.rb#245
+ # source://rake//lib/rake/application.rb#269
def display_exception_backtrace(ex); end
- # source://rake//lib/rake/application.rb#214
+ # source://rake//lib/rake/application.rb#236
def display_exception_details(ex); end
- # source://rake//lib/rake/application.rb#229
+ # source://rake//lib/rake/application.rb#251
def display_exception_details_seen; end
- # source://rake//lib/rake/application.rb#237
+ # source://rake//lib/rake/application.rb#259
def display_exception_message_details(ex); end
# Display the tasks and prerequisites
#
- # source://rake//lib/rake/application.rb#381
+ # source://rake//lib/rake/application.rb#405
def display_prerequisites; end
# Display the tasks and comments.
#
- # source://rake//lib/rake/application.rb#298
+ # source://rake//lib/rake/application.rb#322
def display_tasks_and_comments; end
# Calculate the dynamic width of the
#
- # source://rake//lib/rake/application.rb#349
+ # source://rake//lib/rake/application.rb#373
def dynamic_width; end
- # source://rake//lib/rake/application.rb#353
+ # source://rake//lib/rake/application.rb#377
def dynamic_width_stty; end
- # source://rake//lib/rake/application.rb#357
+ # source://rake//lib/rake/application.rb#381
def dynamic_width_tput; end
# Exit the program because of an unhandled exception.
# (may be overridden by subclasses)
#
- # source://rake//lib/rake/application.rb#201
+ # source://rake//lib/rake/application.rb#223
def exit_because_of_exception(ex); end
- # source://rake//lib/rake/application.rb#678
+ # source://rake//lib/rake/application.rb#702
def find_rakefile_location; end
# Read and handle the command line options. Returns the command line
# arguments that we didn't understand, which should (in theory) be just
# task names and env vars.
#
- # source://rake//lib/rake/application.rb#644
+ # source://rake//lib/rake/application.rb#668
def handle_options(argv); end
# @return [Boolean]
#
- # source://rake//lib/rake/application.rb#233
+ # source://rake//lib/rake/application.rb#255
def has_cause?(ex); end
# True if one of the files in RAKEFILES is in the current directory.
# If a match is found, it is copied into @rakefile.
#
- # source://rake//lib/rake/application.rb#274
+ # source://rake//lib/rake/application.rb#298
def have_rakefile; end
# Initialize the command line parameters and app name.
@@ -305,17 +305,17 @@ class Rake::Application
# Invokes a task with arguments that are extracted from +task_string+
#
- # source://rake//lib/rake/application.rb#157
+ # source://rake//lib/rake/application.rb#179
def invoke_task(task_string); end
# Load the pending list of imported files.
#
- # source://rake//lib/rake/application.rb#782
+ # source://rake//lib/rake/application.rb#806
def load_imports; end
# Find the rakefile and then load it and any pending imports.
#
- # source://rake//lib/rake/application.rb#102
+ # source://rake//lib/rake/application.rb#124
def load_rakefile; end
# The name of the application (typically 'rake')
@@ -325,7 +325,7 @@ class Rake::Application
# Application options from the command line
#
- # source://rake//lib/rake/application.rb#145
+ # source://rake//lib/rake/application.rb#167
def options; end
# The original directory where rake was invoked.
@@ -333,16 +333,16 @@ class Rake::Application
# source://rake//lib/rake/application.rb#27
def original_dir; end
- # source://rake//lib/rake/application.rb#163
+ # source://rake//lib/rake/application.rb#185
def parse_task_string(string); end
- # source://rake//lib/rake/application.rb#690
+ # source://rake//lib/rake/application.rb#714
def print_rakefile_directory(location); end
# Similar to the regular Ruby +require+ command, but will check
# for *.rake files in addition to *.rb files.
#
- # source://rake//lib/rake/application.rb#664
+ # source://rake//lib/rake/application.rb#688
def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end
# Name of the actual rakefile used.
@@ -350,10 +350,10 @@ class Rake::Application
# source://rake//lib/rake/application.rb#30
def rakefile; end
- # source://rake//lib/rake/application.rb#798
+ # source://rake//lib/rake/application.rb#822
def rakefile_location(backtrace = T.unsafe(nil)); end
- # source://rake//lib/rake/application.rb#695
+ # source://rake//lib/rake/application.rb#719
def raw_load_rakefile; end
# Run the Rake application. The run method performs the following
@@ -372,26 +372,26 @@ class Rake::Application
# Run the given block with the thread startup and shutdown.
#
- # source://rake//lib/rake/application.rb#122
+ # source://rake//lib/rake/application.rb#144
def run_with_threads; end
- # source://rake//lib/rake/application.rb#807
+ # source://rake//lib/rake/application.rb#831
def set_default_options; end
# Provide standard exception handling for the given block.
#
- # source://rake//lib/rake/application.rb#185
+ # source://rake//lib/rake/application.rb#207
def standard_exception_handling; end
# A list of all the standard options used in rake, suitable for
# passing to OptionParser.
#
- # source://rake//lib/rake/application.rb#402
+ # source://rake//lib/rake/application.rb#426
def standard_rake_options; end
# The directory path containing the system wide rakefiles.
#
- # source://rake//lib/rake/application.rb#727
+ # source://rake//lib/rake/application.rb#751
def system_dir; end
# Number of columns on the terminal
@@ -404,17 +404,17 @@ class Rake::Application
# source://rake//lib/rake/application.rb#33
def terminal_columns=(_arg0); end
- # source://rake//lib/rake/application.rb#337
+ # source://rake//lib/rake/application.rb#361
def terminal_width; end
# Return the thread pool used for multithreaded processing.
#
- # source://rake//lib/rake/application.rb#150
+ # source://rake//lib/rake/application.rb#172
def thread_pool; end
# Run the top level tasks of a Rake application.
#
- # source://rake//lib/rake/application.rb#109
+ # source://rake//lib/rake/application.rb#131
def top_level; end
# List of the top level task names (task names from the command line).
@@ -422,10 +422,10 @@ class Rake::Application
# source://rake//lib/rake/application.rb#36
def top_level_tasks; end
- # source://rake//lib/rake/application.rb#388
+ # source://rake//lib/rake/application.rb#412
def trace(*strings); end
- # source://rake//lib/rake/application.rb#370
+ # source://rake//lib/rake/application.rb#394
def truncate(string, width); end
# We will truncate output if we are outputting to a TTY or if we've been
@@ -433,7 +433,7 @@ class Rake::Application
#
# @return [Boolean]
#
- # source://rake//lib/rake/application.rb#293
+ # source://rake//lib/rake/application.rb#317
def truncate_output?; end
# Override the detected TTY output state (mostly for testing)
@@ -445,41 +445,44 @@ class Rake::Application
#
# @return [Boolean]
#
- # source://rake//lib/rake/application.rb#287
+ # source://rake//lib/rake/application.rb#311
def tty_output?; end
# @return [Boolean]
#
- # source://rake//lib/rake/application.rb#361
+ # source://rake//lib/rake/application.rb#385
def unix?; end
# @return [Boolean]
#
- # source://rake//lib/rake/application.rb#366
+ # source://rake//lib/rake/application.rb#390
def windows?; end
private
- # source://rake//lib/rake/application.rb#721
+ # source://rake//lib/rake/application.rb#745
def glob(path, &block); end
# Does the exception have a task invocation chain?
#
# @return [Boolean]
#
- # source://rake//lib/rake/application.rb#267
+ # source://rake//lib/rake/application.rb#291
def has_chain?(exception); end
- # source://rake//lib/rake/application.rb#620
+ # source://rake//lib/rake/application.rb#102
+ def load_debug_at_stop_feature; end
+
+ # source://rake//lib/rake/application.rb#644
def select_tasks_to_show(options, show_tasks, value); end
- # source://rake//lib/rake/application.rb#627
+ # source://rake//lib/rake/application.rb#651
def select_trace_output(options, trace_option, value); end
- # source://rake//lib/rake/application.rb#393
+ # source://rake//lib/rake/application.rb#417
def sort_options(options); end
- # source://rake//lib/rake/application.rb#744
+ # source://rake//lib/rake/application.rb#768
def standard_system_dir; end
end
@@ -591,7 +594,7 @@ module Rake::DSL
#
# Example:
# desc "Run the Unit Tests"
- # task test: [:build]
+ # task test: [:build] do
# # ... run tests
# end
#
@@ -745,7 +748,7 @@ module Rake::DSL
# source://rake//lib/rake/file_utils_ext.rb#34
def rmtree(*args, **options, &block); end
- # source://rake//lib/rake/file_utils.rb#100
+ # source://rake//lib/rake/file_utils.rb#98
def ruby(*args, **options, &block); end
# Declare a rule for auto-tasks.
@@ -758,7 +761,7 @@ module Rake::DSL
# source://rake//lib/rake/dsl_definition.rb#151
def rule(*args, &block); end
- # source://rake//lib/rake/file_utils.rb#112
+ # source://rake//lib/rake/file_utils.rb#110
def safe_ln(*args, **options); end
# source://rake//lib/rake/file_utils_ext.rb#34
@@ -767,7 +770,7 @@ module Rake::DSL
# source://rake//lib/rake/file_utils.rb#43
def sh(*cmd, &block); end
- # source://rake//lib/rake/file_utils.rb#128
+ # source://rake//lib/rake/file_utils.rb#126
def split_all(path); end
# source://rake//lib/rake/file_utils_ext.rb#34
@@ -1580,7 +1583,7 @@ class Rake::FileTask < ::Rake::Task
# Time stamp for file task.
#
- # source://rake//lib/rake/file_task.rb#21
+ # source://rake//lib/rake/file_task.rb#25
def timestamp; end
private
@@ -1589,14 +1592,14 @@ class Rake::FileTask < ::Rake::Task
#
# @return [Boolean]
#
- # source://rake//lib/rake/file_task.rb#32
+ # source://rake//lib/rake/file_task.rb#36
def out_of_date?(stamp); end
class << self
# Apply the scope to the task name according to the rules for this kind
# of task. File based tasks ignore the scope when creating the name.
#
- # source://rake//lib/rake/file_task.rb#49
+ # source://rake//lib/rake/file_task.rb#53
def scope_name(scope, task_name); end
end
end
@@ -2854,14 +2857,14 @@ class Rake::ThreadHistoryDisplay
def threads; end
end
-# source://rake//lib/rake/thread_pool.rb#7
+# source://rake//lib/rake/thread_pool.rb#8
class Rake::ThreadPool
# Creates a ThreadPool object. The +thread_count+ parameter is the size
# of the pool.
#
# @return [ThreadPool] a new instance of ThreadPool
#
- # source://rake//lib/rake/thread_pool.rb#11
+ # source://rake//lib/rake/thread_pool.rb#12
def initialize(thread_count); end
# Creates a future executed by the +ThreadPool+.
diff --git a/sorbet/rbi/gems/rbi@0.0.17.rbi b/sorbet/rbi/gems/rbi@0.1.6.rbi
similarity index 91%
rename from sorbet/rbi/gems/rbi@0.0.17.rbi
rename to sorbet/rbi/gems/rbi@0.1.6.rbi
index 29a1e5ca..ec3c48ec 100644
--- a/sorbet/rbi/gems/rbi@0.0.17.rbi
+++ b/sorbet/rbi/gems/rbi@0.1.6.rbi
@@ -7,33 +7,6 @@
# source://rbi//lib/rbi/loc.rb#4
module RBI; end
-# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
-#
-# source://rbi//lib/rbi/parser.rb#133
-class RBI::ASTVisitor
- abstract!
-
- # @abstract
- #
- # source://rbi//lib/rbi/parser.rb#145
- sig { abstract.params(node: T.nilable(::AST::Node)).void }
- def visit(node); end
-
- # source://rbi//lib/rbi/parser.rb#140
- sig { params(nodes: T::Array[::AST::Node]).void }
- def visit_all(nodes); end
-
- private
-
- # source://rbi//lib/rbi/parser.rb#155
- sig { params(node: ::AST::Node).returns(::String) }
- def parse_expr(node); end
-
- # source://rbi//lib/rbi/parser.rb#150
- sig { params(node: ::AST::Node).returns(::String) }
- def parse_name(node); end
-end
-
# source://rbi//lib/rbi/model.rb#968
class RBI::Arg < ::RBI::Node
# source://rbi//lib/rbi/model.rb#980
@@ -106,11 +79,6 @@ class RBI::Attr < ::RBI::NodeWithComments
sig { returns(T::Array[::Symbol]) }
def names; end
- # @return [Array]
- #
- # source://rbi//lib/rbi/model.rb#356
- def names=(_arg0); end
-
# source://rbi//lib/rbi/printer.rb#375
sig { override.returns(T::Boolean) }
def oneline?; end
@@ -411,32 +379,6 @@ class RBI::Const < ::RBI::NodeWithComments
def value; end
end
-# source://rbi//lib/rbi/parser.rb#627
-class RBI::ConstBuilder < ::RBI::ASTVisitor
- # source://rbi//lib/rbi/parser.rb#634
- sig { void }
- def initialize; end
-
- # source://rbi//lib/rbi/parser.rb#631
- sig { returns(T::Array[::String]) }
- def names; end
-
- # @return [Array]
- #
- # source://rbi//lib/rbi/parser.rb#631
- def names=(_arg0); end
-
- # source://rbi//lib/rbi/parser.rb#653
- sig { override.params(node: T.nilable(::AST::Node)).void }
- def visit(node); end
-
- class << self
- # source://rbi//lib/rbi/parser.rb#643
- sig { params(node: T.nilable(::AST::Node)).returns(T.nilable(::String)) }
- def visit(node); end
- end
-end
-
# source://rbi//lib/rbi/model.rb#816
class RBI::Extend < ::RBI::Mixin
include ::RBI::Indexable
@@ -866,7 +808,7 @@ end
# source://rbi//lib/rbi/loc.rb#5
class RBI::Loc
- # source://rbi//lib/rbi/loc.rb#23
+ # source://rbi//lib/rbi/loc.rb#38
sig do
params(
file: T.nilable(::String),
@@ -880,39 +822,39 @@ class RBI::Loc
# @return [Integer, nil]
#
- # source://rbi//lib/rbi/loc.rb#12
+ # source://rbi//lib/rbi/loc.rb#27
def begin_column; end
- # source://rbi//lib/rbi/loc.rb#12
+ # source://rbi//lib/rbi/loc.rb#27
sig { returns(T.nilable(::Integer)) }
def begin_line; end
# @return [Integer, nil]
#
- # source://rbi//lib/rbi/loc.rb#12
+ # source://rbi//lib/rbi/loc.rb#27
def end_column; end
# @return [Integer, nil]
#
- # source://rbi//lib/rbi/loc.rb#12
+ # source://rbi//lib/rbi/loc.rb#27
def end_line; end
- # source://rbi//lib/rbi/loc.rb#9
+ # source://rbi//lib/rbi/loc.rb#24
sig { returns(T.nilable(::String)) }
def file; end
- # source://rbi//lib/rbi/loc.rb#37
+ # source://rbi//lib/rbi/loc.rb#56
sig { returns(T.nilable(::String)) }
def source; end
- # source://rbi//lib/rbi/loc.rb#32
+ # source://rbi//lib/rbi/loc.rb#47
sig { returns(::String) }
def to_s; end
class << self
- # source://rbi//lib/rbi/parser.rb#748
- sig { params(file: ::String, ast_loc: T.any(::Parser::Source::Map, ::Parser::Source::Range)).returns(::RBI::Loc) }
- def from_ast_loc(file, ast_loc); end
+ # source://rbi//lib/rbi/loc.rb#12
+ sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) }
+ def from_prism(file, prism_location); end
end
end
@@ -1093,11 +1035,6 @@ class RBI::Mixin < ::RBI::NodeWithComments
# source://rbi//lib/rbi/model.rb#777
sig { returns(T::Array[::String]) }
def names; end
-
- # @return [Array]
- #
- # source://rbi//lib/rbi/model.rb#777
- def names=(_arg0); end
end
# source://rbi//lib/rbi/model.rb#190
@@ -1332,43 +1269,204 @@ end
# source://rbi//lib/rbi/parser.rb#53
class RBI::Parser
- # source://rbi//lib/rbi/parser.rb#64
- sig { void }
- def initialize; end
-
- # source://rbi//lib/rbi/parser.rb#101
+ # source://rbi//lib/rbi/parser.rb#88
sig { params(path: ::String).returns(::RBI::Tree) }
def parse_file(path); end
- # source://rbi//lib/rbi/parser.rb#96
+ # source://rbi//lib/rbi/parser.rb#83
sig { params(string: ::String).returns(::RBI::Tree) }
def parse_string(string); end
private
- # source://rbi//lib/rbi/parser.rb#108
- sig { params(content: ::String, file: ::String).returns(::RBI::Tree) }
- def parse(content, file:); end
+ # source://rbi//lib/rbi/parser.rb#95
+ sig { params(source: ::String, file: ::String).returns(::RBI::Tree) }
+ def parse(source, file:); end
class << self
- # source://rbi//lib/rbi/parser.rb#78
+ # source://rbi//lib/rbi/parser.rb#65
sig { params(path: ::String).returns(::RBI::Tree) }
def parse_file(path); end
- # source://rbi//lib/rbi/parser.rb#83
+ # source://rbi//lib/rbi/parser.rb#70
sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
def parse_files(paths); end
- # source://rbi//lib/rbi/parser.rb#73
+ # source://rbi//lib/rbi/parser.rb#60
sig { params(string: ::String).returns(::RBI::Tree) }
def parse_string(string); end
- # source://rbi//lib/rbi/parser.rb#89
+ # source://rbi//lib/rbi/parser.rb#76
sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
def parse_strings(strings); end
end
end
+# source://rbi//lib/rbi/parser.rb#791
+class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor
+ # source://rbi//lib/rbi/parser.rb#798
+ sig { params(content: ::String, file: ::String).void }
+ def initialize(content, file:); end
+
+ # source://rbi//lib/rbi/parser.rb#795
+ sig { returns(::RBI::Sig) }
+ def current; end
+
+ # source://rbi//lib/rbi/parser.rb#850
+ sig { override.params(node: ::Prism::AssocNode).void }
+ def visit_assoc_node(node); end
+
+ # source://rbi//lib/rbi/parser.rb#805
+ sig { override.params(node: ::Prism::CallNode).void }
+ def visit_call_node(node); end
+end
+
+# source://rbi//lib/rbi/parser.rb#153
+class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor
+ # source://rbi//lib/rbi/parser.rb#163
+ sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void }
+ def initialize(source, comments:, file:); end
+
+ # source://rbi//lib/rbi/parser.rb#160
+ sig { returns(T.nilable(::Prism::Node)) }
+ def last_node; end
+
+ # source://rbi//lib/rbi/parser.rb#157
+ sig { returns(::RBI::Tree) }
+ def tree; end
+
+ # source://rbi//lib/rbi/parser.rb#299
+ sig { params(node: ::Prism::CallNode).void }
+ def visit_call_node(node); end
+
+ # source://rbi//lib/rbi/parser.rb#176
+ sig { override.params(node: ::Prism::ClassNode).void }
+ def visit_class_node(node); end
+
+ # source://rbi//lib/rbi/parser.rb#208
+ sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void }
+ def visit_constant_assign(node); end
+
+ # source://rbi//lib/rbi/parser.rb#201
+ sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
+ def visit_constant_path_write_node(node); end
+
+ # source://rbi//lib/rbi/parser.rb#194
+ sig { override.params(node: ::Prism::ConstantWriteNode).void }
+ def visit_constant_write_node(node); end
+
+ # source://rbi//lib/rbi/parser.rb#241
+ sig { override.params(node: ::Prism::DefNode).void }
+ def visit_def_node(node); end
+
+ # source://rbi//lib/rbi/parser.rb#255
+ sig { override.params(node: ::Prism::ModuleNode).void }
+ def visit_module_node(node); end
+
+ # source://rbi//lib/rbi/parser.rb#272
+ sig { override.params(node: ::Prism::ProgramNode).void }
+ def visit_program_node(node); end
+
+ # source://rbi//lib/rbi/parser.rb#283
+ sig { override.params(node: ::Prism::SingletonClassNode).void }
+ def visit_singleton_class_node(node); end
+
+ private
+
+ # Collect all the remaining comments within a node
+ #
+ # source://rbi//lib/rbi/parser.rb#467
+ sig { params(node: ::Prism::Node).void }
+ def collect_dangling_comments(node); end
+
+ # Collect all the remaining comments after visiting the tree
+ #
+ # source://rbi//lib/rbi/parser.rb#485
+ sig { void }
+ def collect_orphan_comments; end
+
+ # source://rbi//lib/rbi/parser.rb#508
+ sig { returns(::RBI::Tree) }
+ def current_scope; end
+
+ # source://rbi//lib/rbi/parser.rb#513
+ sig { returns(T::Array[::RBI::Sig]) }
+ def current_sigs; end
+
+ # source://rbi//lib/rbi/parser.rb#520
+ sig { returns(T::Array[::RBI::Comment]) }
+ def current_sigs_comments; end
+
+ # source://rbi//lib/rbi/parser.rb#527
+ sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) }
+ def node_comments(node); end
+
+ # source://rbi//lib/rbi/parser.rb#545
+ sig { params(node: ::Prism::Comment).returns(::RBI::Comment) }
+ def parse_comment(node); end
+
+ # source://rbi//lib/rbi/parser.rb#574
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) }
+ def parse_params(node); end
+
+ # source://rbi//lib/rbi/parser.rb#550
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) }
+ def parse_send_args(node); end
+
+ # source://rbi//lib/rbi/parser.rb#648
+ sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) }
+ def parse_sig(node); end
+
+ # source://rbi//lib/rbi/parser.rb#658
+ sig do
+ params(
+ node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)
+ ).returns(T.nilable(::RBI::Struct))
+ end
+ def parse_struct(node); end
+
+ # source://rbi//lib/rbi/parser.rb#708
+ sig { params(send: ::Prism::CallNode).void }
+ def parse_tstruct_field(send); end
+
+ # source://rbi//lib/rbi/parser.rb#745
+ sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) }
+ def parse_visibility(name, node); end
+
+ # source://rbi//lib/rbi/parser.rb#759
+ sig { void }
+ def separate_header_comments; end
+
+ # source://rbi//lib/rbi/parser.rb#769
+ sig { void }
+ def set_root_tree_loc; end
+
+ # source://rbi//lib/rbi/parser.rb#783
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
+ def type_variable_definition?(node); end
+end
+
+# source://rbi//lib/rbi/parser.rb#122
+class RBI::Parser::Visitor < ::Prism::Visitor
+ # source://rbi//lib/rbi/parser.rb#126
+ sig { params(source: ::String, file: ::String).void }
+ def initialize(source, file:); end
+
+ private
+
+ # source://rbi//lib/rbi/parser.rb#136
+ sig { params(node: ::Prism::Node).returns(::RBI::Loc) }
+ def node_loc(node); end
+
+ # source://rbi//lib/rbi/parser.rb#141
+ sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) }
+ def node_string(node); end
+
+ # source://rbi//lib/rbi/parser.rb#148
+ sig { params(node: ::Prism::Node).returns(::String) }
+ def node_string!(node); end
+end
+
# source://rbi//lib/rbi/printer.rb#5
class RBI::Printer < ::RBI::Visitor
# source://rbi//lib/rbi/printer.rb#28
@@ -1722,7 +1820,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct
def to_s; end
class << self
- # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11219/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -1939,7 +2037,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
def to_s; end
class << self
- # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11219/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -2223,31 +2321,6 @@ class RBI::Sig < ::RBI::Node
def sig_modifiers; end
end
-# source://rbi//lib/rbi/parser.rb#668
-class RBI::SigBuilder < ::RBI::ASTVisitor
- # source://rbi//lib/rbi/parser.rb#675
- sig { void }
- def initialize; end
-
- # source://rbi//lib/rbi/parser.rb#672
- sig { returns(::RBI::Sig) }
- def current; end
-
- # source://rbi//lib/rbi/parser.rb#692
- sig { override.params(node: T.nilable(::AST::Node)).void }
- def visit(node); end
-
- # source://rbi//lib/rbi/parser.rb#702
- sig { params(node: ::AST::Node).void }
- def visit_send(node); end
-
- class << self
- # source://rbi//lib/rbi/parser.rb#684
- sig { params(node: ::AST::Node).returns(::RBI::Sig) }
- def build(node); end
- end
-end
-
# source://rbi//lib/rbi/model.rb#1098
class RBI::SigParam < ::RBI::NodeWithComments
# source://rbi//lib/rbi/model.rb#1113
@@ -2597,7 +2670,7 @@ class RBI::Tree < ::RBI::NodeWithComments
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#38
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#38
sig do
params(
name: ::String,
@@ -2607,19 +2680,19 @@ class RBI::Tree < ::RBI::NodeWithComments
end
def create_class(name, superclass_name: T.unsafe(nil), &block); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#45
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#45
sig { params(name: ::String, value: ::String).void }
def create_constant(name, value:); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#55
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#55
sig { params(name: ::String).void }
def create_extend(name); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#50
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#50
sig { params(name: ::String).void }
def create_include(name); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#89
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#89
sig do
params(
name: ::String,
@@ -2632,19 +2705,19 @@ class RBI::Tree < ::RBI::NodeWithComments
end
def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#60
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#60
sig { params(name: ::String).void }
def create_mixes_in_class_methods(name); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#25
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#25
sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
def create_module(name, &block); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#9
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#9
sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
def create_path(constant, &block); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#74
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#74
sig do
params(
name: ::String,
@@ -2706,138 +2779,15 @@ class RBI::Tree < ::RBI::NodeWithComments
private
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#116
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#116
sig { params(node: ::RBI::Node).returns(::RBI::Node) }
def create_node(node); end
- # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#111
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#111
sig { returns(T::Hash[::String, ::RBI::Node]) }
def nodes_cache; end
end
-# source://rbi//lib/rbi/parser.rb#160
-class RBI::TreeBuilder < ::RBI::ASTVisitor
- # source://rbi//lib/rbi/parser.rb#176
- sig do
- params(
- file: ::String,
- comments: T::Array[::Parser::Source::Comment],
- nodes_comments_assoc: T::Hash[::Parser::Source::Map, T::Array[::Parser::Source::Comment]]
- ).void
- end
- def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end
-
- # source://rbi//lib/rbi/parser.rb#167
- sig { returns(T.nilable(::AST::Node)) }
- def last_node; end
-
- # source://rbi//lib/rbi/parser.rb#191
- sig { void }
- def post_process; end
-
- # source://rbi//lib/rbi/parser.rb#164
- sig { returns(::RBI::Tree) }
- def tree; end
-
- # source://rbi//lib/rbi/parser.rb#197
- sig { override.params(node: T.nilable(::Object)).void }
- def visit(node); end
-
- private
-
- # source://rbi//lib/rbi/parser.rb#573
- sig { void }
- def assoc_dangling_comments; end
-
- # source://rbi//lib/rbi/parser.rb#554
- sig { returns(::RBI::Tree) }
- def current_scope; end
-
- # source://rbi//lib/rbi/parser.rb#559
- sig { returns(T::Array[::RBI::Sig]) }
- def current_sigs; end
-
- # source://rbi//lib/rbi/parser.rb#566
- sig { returns(T::Array[::RBI::Comment]) }
- def current_sigs_comments; end
-
- # source://rbi//lib/rbi/parser.rb#542
- sig { params(node: ::AST::Node).returns(T::Array[::RBI::Comment]) }
- def node_comments(node); end
-
- # source://rbi//lib/rbi/parser.rb#537
- sig { params(node: ::AST::Node).returns(::RBI::Loc) }
- def node_loc(node); end
-
- # source://rbi//lib/rbi/parser.rb#410
- sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) }
- def parse_block(node); end
-
- # source://rbi//lib/rbi/parser.rb#254
- sig { params(node: ::AST::Node).returns(::RBI::Node) }
- def parse_const_assign(node); end
-
- # source://rbi//lib/rbi/parser.rb#270
- sig { params(node: ::AST::Node).returns(::RBI::Method) }
- def parse_def(node); end
-
- # source://rbi//lib/rbi/parser.rb#512
- sig { params(node: ::AST::Node).returns(::RBI::TEnumBlock) }
- def parse_enum(node); end
-
- # source://rbi//lib/rbi/parser.rb#297
- sig { params(node: ::AST::Node).returns(::RBI::Param) }
- def parse_param(node); end
-
- # source://rbi//lib/rbi/parser.rb#529
- sig { params(node: ::AST::Node).returns(::RBI::RequiresAncestor) }
- def parse_requires_ancestor(node); end
-
- # source://rbi//lib/rbi/parser.rb#234
- sig { params(node: ::AST::Node).returns(::RBI::Scope) }
- def parse_scope(node); end
-
- # source://rbi//lib/rbi/parser.rb#325
- sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) }
- def parse_send(node); end
-
- # source://rbi//lib/rbi/parser.rb#393
- sig { params(node: ::AST::Node).returns(T::Array[::RBI::Arg]) }
- def parse_send_args(node); end
-
- # source://rbi//lib/rbi/parser.rb#505
- sig { params(node: ::AST::Node).returns(::RBI::Sig) }
- def parse_sig(node); end
-
- # source://rbi//lib/rbi/parser.rb#432
- sig { params(node: ::AST::Node).returns(::RBI::Struct) }
- def parse_struct(node); end
-
- # source://rbi//lib/rbi/parser.rb#489
- sig { params(node: ::AST::Node).returns([::String, ::String, T.nilable(::String)]) }
- def parse_tstruct_prop(node); end
-
- # source://rbi//lib/rbi/parser.rb#478
- sig { params(node: ::AST::Node).returns(::RBI::TypeMember) }
- def parse_type_variable(node); end
-
- # source://rbi//lib/rbi/parser.rb#591
- sig { void }
- def separate_header_comments; end
-
- # source://rbi//lib/rbi/parser.rb#613
- sig { void }
- def set_root_tree_loc; end
-
- # source://rbi//lib/rbi/parser.rb#426
- sig { params(node: ::AST::Node).returns(T::Boolean) }
- def struct_definition?(node); end
-
- # source://rbi//lib/rbi/parser.rb#471
- sig { params(node: ::AST::Node).returns(T::Boolean) }
- def type_variable_definition?(node); end
-end
-
# source://rbi//lib/rbi/model.rb#1320
class RBI::TypeMember < ::RBI::NodeWithComments
include ::RBI::Indexable
diff --git a/sorbet/rbi/gems/regexp_parser@2.8.1.rbi b/sorbet/rbi/gems/regexp_parser@2.8.3.rbi
similarity index 98%
rename from sorbet/rbi/gems/regexp_parser@2.8.1.rbi
rename to sorbet/rbi/gems/regexp_parser@2.8.3.rbi
index e10d9b8d..8068e546 100644
--- a/sorbet/rbi/gems/regexp_parser@2.8.1.rbi
+++ b/sorbet/rbi/gems/regexp_parser@2.8.3.rbi
@@ -2590,17 +2590,17 @@ Regexp::Parser::VERSION = T.let(T.unsafe(nil), String)
class Regexp::Scanner
# Emits an array with the details of the scanned pattern
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2388
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2406
def emit(type, token, text); end
# only public for #||= to work on ruby <= 2.5
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2413
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2431
def literal_run; end
# only public for #||= to work on ruby <= 2.5
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2413
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2431
def literal_run=(_arg0); end
# @raise [PrematureEndError]
@@ -2613,168 +2613,168 @@ class Regexp::Scanner
# Appends one or more characters to the literal buffer, to be emitted later
# by a call to emit_literal.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2450
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2468
def append_literal(data, ts, te); end
# Returns the value of attribute block.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def block; end
# Sets the attribute block
#
# @param value the value to set the attribute block to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def block=(_arg0); end
# Returns the value of attribute char_pos.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def char_pos; end
# Sets the attribute char_pos
#
# @param value the value to set the attribute char_pos to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def char_pos=(_arg0); end
# Returns the value of attribute collect_tokens.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def collect_tokens; end
# Sets the attribute collect_tokens
#
# @param value the value to set the attribute collect_tokens to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def collect_tokens=(_arg0); end
# Returns the value of attribute conditional_stack.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def conditional_stack; end
# Sets the attribute conditional_stack
#
# @param value the value to set the attribute conditional_stack to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def conditional_stack=(_arg0); end
# Copy from ts to te from data as text
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2444
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2462
def copy(data, ts, te); end
# Emits the literal run collected by calls to the append_literal method.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2455
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2473
def emit_literal; end
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2490
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2508
def emit_meta_control_sequence(data, ts, te, token); end
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2461
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2479
def emit_options(text); end
# Returns the value of attribute free_spacing.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def free_spacing; end
# Sets the attribute free_spacing
#
# @param value the value to set the attribute free_spacing to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def free_spacing=(_arg0); end
# @return [Boolean]
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2423
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2441
def free_spacing?(input_object, options); end
# Returns the value of attribute group_depth.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def group_depth; end
# Sets the attribute group_depth
#
# @param value the value to set the attribute group_depth to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def group_depth=(_arg0); end
# @return [Boolean]
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2453
def in_group?; end
# @return [Boolean]
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2439
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2457
def in_set?; end
# Returns the value of attribute prev_token.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def prev_token; end
# Sets the attribute prev_token
#
# @param value the value to set the attribute prev_token to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def prev_token=(_arg0); end
# Returns the value of attribute set_depth.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def set_depth; end
# Sets the attribute set_depth
#
# @param value the value to set the attribute set_depth to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def set_depth=(_arg0); end
# Returns the value of attribute spacing_stack.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def spacing_stack; end
# Sets the attribute spacing_stack
#
# @param value the value to set the attribute spacing_stack to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def spacing_stack=(_arg0); end
# Returns the value of attribute tokens.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def tokens; end
# Sets the attribute tokens
#
# @param value the value to set the attribute tokens to.
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2417
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2435
def tokens=(_arg0); end
class << self
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2374
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2392
def long_prop_map; end
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2378
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2396
def parse_prop_map(name); end
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2382
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2400
def posix_classes; end
# Scans the given regular expression text, or Regexp object and collects the
@@ -2789,7 +2789,7 @@ class Regexp::Scanner
# lazy-load property maps when first needed
#
- # source://regexp_parser//lib/regexp_parser/scanner.rb#2370
+ # source://regexp_parser//lib/regexp_parser/scanner.rb#2388
def short_prop_map; end
end
end
diff --git a/sorbet/rbi/gems/reline@0.3.4.rbi b/sorbet/rbi/gems/reline@0.4.1.rbi
similarity index 100%
rename from sorbet/rbi/gems/reline@0.3.4.rbi
rename to sorbet/rbi/gems/reline@0.4.1.rbi
diff --git a/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi
similarity index 99%
rename from sorbet/rbi/gems/rubocop-ast@1.29.0.rbi
rename to sorbet/rbi/gems/rubocop-ast@1.30.0.rbi
index dedb2925..c2d15673 100644
--- a/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi
+++ b/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi
@@ -275,7 +275,7 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node
#
# @return [Array]
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#42
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60
def argument_list; end
# The arguments of this block.
@@ -285,63 +285,81 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node
#
# @return [Array]
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#30
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#48
def arguments; end
# Checks whether this block takes any arguments.
#
# @return [Boolean] whether this `block` node takes any arguments
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#67
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#85
def arguments?; end
# The body of this block.
#
# @return [Node, nil] the body of the `block` node or `nil`
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#53
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#71
def body; end
# Checks whether the `block` literal is delimited by curly braces.
#
# @return [Boolean] whether the `block` literal is enclosed in braces
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#74
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#92
def braces?; end
# The closing delimiter for this `block` literal.
#
# @return [String] the closing delimiter for the `block` literal
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#102
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#120
def closing_delimiter; end
# The delimiters for this `block` literal.
#
# @return [Array] the delimiters for the `block` literal
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#88
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#106
def delimiters; end
+ # A shorthand for getting the first argument of this block.
+ # Equivalent to `arguments.first`.
+ #
+ # @return [Node, nil] the first argument of this block,
+ # or `nil` if there are no arguments
+ #
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#29
+ def first_argument; end
+
# Checks whether the `block` literal is delimited by `do`-`end` keywords.
#
# @return [Boolean] whether the `block` literal is enclosed in `do`-`end`
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#81
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#99
def keywords?; end
# Checks whether this `block` literal belongs to a lambda.
#
# @return [Boolean] whether the `block` literal belongs to a lambda
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#125
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#143
def lambda?; end
+ # A shorthand for getting the last argument of this block.
+ # Equivalent to `arguments.last`.
+ #
+ # @return [Node, nil] the last argument of this block,
+ # or `nil` if there are no arguments
+ #
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#38
+ def last_argument; end
+
# The name of the dispatched method as a symbol.
#
# @return [Symbol] the name of the dispatched method
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#78
def method_name; end
# Checks whether this is a multiline block. This is overridden here
@@ -349,14 +367,14 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node
#
# @return [Boolean] whether the `block` literal is on a several lines
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#118
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#136
def multiline?; end
# The opening delimiter for this `block` literal.
#
# @return [String] the opening delimiter for the `block` literal
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#95
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#113
def opening_delimiter; end
# The `send` node associated with this block.
@@ -371,21 +389,21 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node
#
# @return [Boolean] whether the `block` literal is on a single line
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#110
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#128
def single_line?; end
# Checks whether this node body is a void context.
#
# @return [Boolean] whether the `block` node body is a void context
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#132
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#150
def void_context?; end
private
# Numbered arguments of this `numblock`.
#
- # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#139
+ # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#157
def numbered_arguments; end
end
@@ -1716,7 +1734,7 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node
# source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#80
def modifier_form?; end
- # Chacks whether the `if` node has nested `if` nodes in any of its
+ # Checks whether the `if` node has nested `if` nodes in any of its
# branches.
#
# @note This performs a shallow search.
@@ -4823,116 +4841,116 @@ class RuboCop::AST::NodePattern::Parser < ::Racc::Parser
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19
def initialize(builder = T.unsafe(nil)); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#333
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#335
def _reduce_10(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#339
def _reduce_11(val, _values); end
# reduce 12 omitted
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#345
def _reduce_13(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#349
def _reduce_14(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#353
def _reduce_15(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#357
def _reduce_16(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#361
def _reduce_17(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#365
def _reduce_18(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#369
def _reduce_19(val, _values); end
# reduce 1 omitted
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#303
def _reduce_2(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#373
def _reduce_20(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#377
def _reduce_21(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#381
def _reduce_22(val, _values); end
# reduce 24 omitted
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#389
def _reduce_25(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#395
def _reduce_26(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#307
def _reduce_3(val, _values); end
# reduce 32 omitted
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#415
def _reduce_33(val, _values); end
# reduce 36 omitted
#
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#425
def _reduce_37(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#429
def _reduce_38(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#433
def _reduce_39(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#311
def _reduce_4(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#437
def _reduce_40(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#441
def _reduce_41(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#445
def _reduce_42(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#449
def _reduce_43(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#453
def _reduce_44(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#457
def _reduce_45(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#461
def _reduce_46(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#315
def _reduce_5(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#319
def _reduce_6(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#323
def _reduce_7(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#327
def _reduce_8(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#331
def _reduce_9(val, _values); end
- # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465
def _reduce_none(val, _values); end
# source://forwardable/1.3.3/forwardable.rb#231
@@ -4992,10 +5010,10 @@ RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer
# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227
RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array)
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#293
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#295
RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass)
-# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#244
RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
# Overrides Parser to use `WithMeta` variants and provide additional methods
@@ -5185,6 +5203,9 @@ RuboCop::AST::NodePattern::Sets::SET_FILE_DIR = T.let(T.unsafe(nil), Set)
# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
RuboCop::AST::NodePattern::Sets::SET_FILE_FILETEST = T.let(T.unsafe(nil), Set)
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
+RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE = T.let(T.unsafe(nil), Set)
+
# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set)
@@ -5311,6 +5332,9 @@ RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set)
# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT = T.let(T.unsafe(nil), Set)
+# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
+RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT_INEXACTSTRUCT = T.let(T.unsafe(nil), Set)
+
# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set)
diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi
similarity index 77%
rename from sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi
rename to sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi
index 787dd0ab..1d487f3a 100644
--- a/sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi
+++ b/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi
@@ -105,6 +105,60 @@ RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::MSG = T.let(T.unsafe(nil)
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb#23
RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::WITHOUT_BLOCK_MSG = T.let(T.unsafe(nil), String)
+# Checks for the a mistaken variant of the "obsolete memoization pattern" that used to be required
+# on every call, causing the memoized value to be discarded and recomputed on every call.
+#
+# This cop will correct it to read from the ivar instead of `nil`, which will memoize it correctly.
+#
+# The result of this correction will be the "obsolete memoization pattern", which can further be corrected by
+# the `Sorbet/ObsoleteStrictMemoization` cop.
+#
+# See `Sorbet/ObsoleteStrictMemoization` for more details.
+#
+# @example
+# # bad
+# sig { returns(Foo) }
+# def foo
+# # This `nil` is likely a mistake, causing the memoized value to be discarded and recomputed on every call.
+# @foo = T.let(nil, T.nilable(Foo))
+# @foo ||= some_computation
+# end
+#
+# # good
+# sig { returns(Foo) }
+# def foo
+# # This will now memoize the value as was likely intended, so `some_computation` is only ever called once.
+# # ⚠️If `some_computation` has side effects, this might be a breaking change!
+# @foo = T.let(@foo, T.nilable(Foo))
+# @foo ||= some_computation
+# end
+# @see Sorbet/ObsoleteStrictMemoization
+#
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#42
+class RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::MatchRange
+ include ::RuboCop::Cop::Alignment
+ include ::RuboCop::Cop::LineLengthHelp
+ include ::RuboCop::Cop::Sorbet::TargetSorbetVersion
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#55
+ def buggy_legacy_memoization_pattern?(param0 = T.unsafe(nil)); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#66
+ def on_begin(node); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#77
+ def relevant_file?(file); end
+end
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb#51
+RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String)
+
# Ensures that callback conditionals are bound to the right type
# so that they are type checked properly.
#
@@ -161,18 +215,19 @@ RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(ni
# # good
# sig { void }
#
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#22
-class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#19
+class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Cop
include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#26
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#24
def offending_node(param0); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#37
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#35
def on_signature(node); end
end
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#30
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#28
RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String)
# Disallows the calls that are used to get constants fom Strings
@@ -215,10 +270,7 @@ end
# Checks for blank lines after signatures.
#
-# It also suggests an autocorrect
-#
# @example
-#
# # bad
# sig { void }
#
@@ -228,22 +280,30 @@ end
# sig { void }
# def foo; end
#
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#23
-class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Sorbet::SignatureCop
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#17
+class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
+ extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#33
- def autocorrect(node); end
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#34
+ def on_signature(sig); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#26
- def on_signature(node); end
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#25
+ def sig_or_signable_method_definition?(param0 = T.unsafe(nil)); end
private
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#48
- def next_method(node); end
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#57
+ def lines_between(node1, node2, buffer: T.unsafe(nil)); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#53
+ def next_sibling(node); end
end
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#22
+RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String)
+
# Checks that the Sorbet sigil comes as the first magic comment in the file.
#
# The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal.
@@ -321,8 +381,10 @@ RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil),
# * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped')
# * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped')
#
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#29
-class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::SignatureCop
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#27
+class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Cop
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
+
# @return [EnforceSignatures] a new instance of EnforceSignatures
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#30
@@ -504,37 +566,36 @@ RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T
# ```
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#29
-class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop
- # @return [ForbidIncludeConstLiteral] a new instance of ForbidIncludeConstLiteral
- #
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#41
- def initialize(*_arg0); end
-
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#60
- def autocorrect(node); end
+class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#35
- def not_lit_const_include?(param0 = T.unsafe(nil)); end
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#36
+ def dynamic_inclusion?(param0 = T.unsafe(nil)); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#46
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#40
def on_send(node); end
- # Returns the value of attribute used_names.
+ private
+
+ # @return [Boolean]
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32
- def used_names; end
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#52
+ def neither_const_nor_self?(node); end
- # Sets the attribute used_names
+ # Returns true if the node is within a module declaration that is not anonymous.
#
- # @param value the value to set the attribute used_names to.
+ # @return [Boolean]
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32
- def used_names=(_arg0); end
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#57
+ def within_onymous_module?(node); end
end
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#30
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32
RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String)
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#33
+RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
# Makes sure that RBI files are always located under the defined allowed paths.
#
# Options:
@@ -595,6 +656,167 @@ end
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#29
RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String)
+# Disallow using `T::Struct` and `T::Props`.
+#
+# @example
+#
+# # bad
+# class MyStruct < T::Struct
+# const :foo, String
+# prop :bar, Integer, default: 0
+#
+# def some_method; end
+# end
+#
+# # good
+# class MyStruct
+# extend T::Sig
+#
+# sig { returns(String) }
+# attr_reader :foo
+#
+# sig { returns(Integer) }
+# attr_accessor :bar
+#
+# sig { params(foo: String, bar: Integer) }
+# def initialize(foo:, bar: 0)
+# @foo = foo
+# @bar = bar
+# end
+#
+# def some_method; end
+# end
+#
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#38
+class RuboCop::Cop::Sorbet::ForbidTStruct < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::Alignment
+ include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::CommentsHelp
+ extend ::RuboCop::Cop::AutoCorrector
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#164
+ def on_class(node); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#205
+ def on_send(node); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#162
+ def t_props?(param0 = T.unsafe(nil)); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#157
+ def t_struct?(param0 = T.unsafe(nil)); end
+
+ private
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#213
+ def initialize_method(indent, props); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#226
+ def previous_line_blank?(node); end
+end
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#47
+RuboCop::Cop::Sorbet::ForbidTStruct::MSG_PROPS = T.let(T.unsafe(nil), String)
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#46
+RuboCop::Cop::Sorbet::ForbidTStruct::MSG_STRUCT = T.let(T.unsafe(nil), String)
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#104
+class RuboCop::Cop::Sorbet::ForbidTStruct::Property
+ # @return [Property] a new instance of Property
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#107
+ def initialize(node, kind, name, type, default:, factory:); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#123
+ def attr_accessor; end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#119
+ def attr_sig; end
+
+ # Returns the value of attribute default.
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105
+ def default; end
+
+ # Returns the value of attribute factory.
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105
+ def factory; end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#144
+ def initialize_assign; end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#131
+ def initialize_param; end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#127
+ def initialize_sig_param; end
+
+ # Returns the value of attribute kind.
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105
+ def kind; end
+
+ # Returns the value of attribute name.
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105
+ def name; end
+
+ # @return [Boolean]
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#151
+ def nilable?; end
+
+ # Returns the value of attribute node.
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105
+ def node; end
+
+ # Returns the value of attribute type.
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#105
+ def type; end
+end
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#44
+RuboCop::Cop::Sorbet::ForbidTStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
+# This class walks down the class body of a T::Struct and collects all the properties that will need to be
+# translated into `attr_reader` and `attr_accessor` methods.
+#
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#51
+class RuboCop::Cop::Sorbet::ForbidTStruct::TStructWalker
+ include ::RuboCop::AST::Traversal
+ extend ::RuboCop::AST::NodePattern::Macros
+
+ # @return [TStructWalker] a new instance of TStructWalker
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#57
+ def initialize; end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#63
+ def extend_t_sig?(param0 = T.unsafe(nil)); end
+
+ # Returns the value of attribute has_extend_t_sig.
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#55
+ def has_extend_t_sig; end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#72
+ def on_send(node); end
+
+ # Returns the value of attribute props.
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#55
+ def props; end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_struct.rb#68
+ def t_struct_prop?(param0 = T.unsafe(nil)); end
+end
+
# Disallows using `T.unsafe` anywhere.
#
# @example
@@ -647,6 +869,38 @@ RuboCop::Cop::Sorbet::ForbidTUntyped::MSG = T.let(T.unsafe(nil), String)
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#22
RuboCop::Cop::Sorbet::ForbidTUntyped::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+# Disallows defining type aliases that contain shapes
+#
+# @example
+#
+# # bad
+# Foo = T.type_alias { { foo: Integer } }
+#
+# # good
+# class Foo
+# extend T::Sig
+#
+# sig { params(foo: Integer).void }
+# def initialize(foo)
+# @foo = foo
+# end
+# end
+#
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#24
+class RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes < ::RuboCop::Cop::Base
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#36
+ def on_block(node); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#36
+ def on_numblock(node); end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#28
+ def shape_type_alias?(param0 = T.unsafe(nil)); end
+end
+
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb#25
+RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes::MSG = T.let(T.unsafe(nil), String)
+
# Disallows use of `T.untyped` or `T.nilable(T.untyped)`
# as a prop type for `T::Struct` or `T::ImmutableStruct`.
#
@@ -777,14 +1031,16 @@ RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsaf
# sig { params(b: String, a: Integer).void }
# def foo(b:, a: 1); end
#
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23
-class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::SignatureCop
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#24
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#20
+class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Cop
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23
def on_signature(node); end
private
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#35
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#34
def check_order_for_kwoptargs(parameters); end
end
@@ -920,40 +1176,63 @@ RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String)
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#28
class RuboCop::Cop::Sorbet::RedundantExtendTSig < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#35
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#36
def extend_t_sig?(param0 = T.unsafe(nil)); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#39
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#40
def on_send(node); end
end
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#31
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#32
RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#32
+# 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)
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#15
-class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::SignatureCop
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#59
+# Checks for the correct order of sig builder methods:
+# - abstract, override, or overridable
+# - type_parameters
+# - params
+# - returns, or void
+# - soft, checked, or on_failure
+#
+# # bad
+# sig { returns(Integer).params(x: Integer) }
+#
+# # good
+# sig { params(x: Integer).returns(Integer) }
+#
+# @example
+# # bad
+# sig { void.abstract }
+#
+# # good
+# sig { abstract.void }
+#
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#31
+class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Cop
+ include ::RuboCop::Cop::Sorbet::SignatureHelp
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#77
def autocorrect(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#35
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#53
def on_signature(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#31
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#49
def root_call(param0); end
private
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#101
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#119
def call_chain(sig_child_node); end
# @return [Boolean]
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#97
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#115
def can_autocorrect?; end
# This method exists to reparse the current node with modern features enabled.
@@ -961,40 +1240,40 @@ class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::Signat
# "index sends" (i.e. `[]` calls) back to index accessors (i.e. as `foo[bar]``).
# Otherwise, we would get the unparsed node as `foo.[](bar)`.
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#88
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#106
def node_reparsed_with_modern_features(node); end
end
# Create a subclass of AST Builder that has modern features turned on
#
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#77
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#95
class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#16
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#34
RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash)
-# Abstract cop specific to Sorbet signatures
+# Mixin for writing cops for signatures, providing a `signature?` node matcher and an `on_signature` trigger.
#
-# You can subclass it to use the `on_signature` trigger and the `signature?` node matcher.
-#
-# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#11
-class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#33
+# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#7
+module RuboCop::Cop::Sorbet::SignatureHelp
+ extend ::RuboCop::AST::NodePattern::Macros
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#29
def on_block(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#33
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#29
def on_numblock(node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#39
- def on_signature(_); end
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#35
+ def on_signature(_node); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#15
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#11
def signature?(param0 = T.unsafe(nil)); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#24
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#20
def with_runtime?(param0 = T.unsafe(nil)); end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#29
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#25
def without_runtime?(param0 = T.unsafe(nil)); end
end
@@ -1051,13 +1330,18 @@ module RuboCop::Cop::Sorbet::TargetSorbetVersion
# @return [Boolean]
#
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#24
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#28
def enabled_for_sorbet_static_version?; end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#40
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#44
def read_sorbet_static_version_from_bundler_lock_file; end
- # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#31
+ # @return [Boolean]
+ #
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#24
+ def sorbet_enabled?; end
+
+ # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#35
def target_sorbet_static_version_from_bundler_lock_file; end
class << self
@@ -1070,7 +1354,7 @@ end
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#13
module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods
- # The version of the Sorbet static type checker required by this cop
+ # Sets the version of the Sorbet static type checker required by this cop
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#15
def minimum_target_sorbet_static_version(version); end
@@ -1078,7 +1362,7 @@ module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods
# @return [Boolean]
#
# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#19
- def support_target_sorbet_static_version?(version); end
+ def supports_target_sorbet_static_version?(version); end
end
# Makes the Sorbet `true` sigil mandatory in all files.
diff --git a/sorbet/rbi/gems/rubocop@1.56.1.rbi b/sorbet/rbi/gems/rubocop@1.58.0.rbi
similarity index 97%
rename from sorbet/rbi/gems/rubocop@1.56.1.rbi
rename to sorbet/rbi/gems/rubocop@1.58.0.rbi
index fc8167e0..ed762b1d 100644
--- a/sorbet/rbi/gems/rubocop@1.56.1.rbi
+++ b/sorbet/rbi/gems/rubocop@1.58.0.rbi
@@ -166,77 +166,77 @@ end
class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#21
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22
def run; end
private
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#97
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#98
def add_formatter; end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#105
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#106
def add_inheritance_from_auto_generated_file(config_file); end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#101
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#102
def execute_runner; end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#126
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#127
def existing_configuration(config_file); end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#59
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#60
def line_length_cop(config); end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#47
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48
def line_length_enabled?(config); end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#55
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#56
def max_line_length(config); end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#30
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#31
def maybe_run_line_length_cop; end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#148
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153
def options_config_in_root?; end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#63
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#64
def options_has_only_flag?; end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#139
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#144
def relative_path_to_todo_from_options_config; end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#90
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91
def reset_config_and_auto_gen_file; end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#81
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#82
def run_all_cops(line_length_contents); end
# Do an initial run with only Layout/LineLength so that cops that
@@ -245,23 +245,23 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base
#
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#70
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#71
def run_line_length_cop; end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#51
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#52
def same_max_line_length?(config1, config2); end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#42
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#43
def skip_line_length_cop(reason); end
# @api private
#
- # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#132
+ # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#133
def write_config_file(file_name, file_string, rubocop_yml_contents); end
end
@@ -272,29 +272,34 @@ RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(
# @api private
#
-# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#14
+# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15
RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String)
# @api private
#
-# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18
+# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19
RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String)
# @api private
#
-# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#17
+# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18
RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String)
# @api private
#
-# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19
+# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20
RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED = T.let(T.unsafe(nil), String)
# @api private
#
-# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15
+# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#16
RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String)
+# @api private
+#
+# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#13
+RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String)
+
# @api private
#
# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#12
@@ -1645,23 +1650,23 @@ class RuboCop::ConfigObsoletion
# @api private
# @return [ConfigObsoletion] a new instance of ConfigObsoletion
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#33
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#35
def initialize(config); end
# @api private
# @raise [ValidationError]
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#39
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#41
def reject_obsolete!; end
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#19
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#21
def rules; end
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#19
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#21
def warnings; end
private
@@ -1670,7 +1675,7 @@ class RuboCop::ConfigObsoletion
#
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#69
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#72
def load_cop_rules(rules); end
# Parameter rules may apply to multiple cops and multiple parameters
@@ -1679,7 +1684,7 @@ class RuboCop::ConfigObsoletion
#
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#82
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#85
def load_parameter_rules(rules); end
# Default rules for obsoletions are in config/obsoletion.yml
@@ -1687,28 +1692,28 @@ class RuboCop::ConfigObsoletion
#
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#50
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#52
def load_rules; end
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#95
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#98
def obsoletions; end
class << self
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#22
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#24
def files; end
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#22
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#24
def files=(_arg0); end
# @api private
#
- # source://rubocop//lib/rubocop/config_obsoletion.rb#24
+ # source://rubocop//lib/rubocop/config_obsoletion.rb#26
def legacy_cop_names; end
end
end
@@ -1861,6 +1866,11 @@ class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::Cop
def feature_loaded?; end
end
+# @api private
+#
+# source://rubocop//lib/rubocop/config_obsoletion.rb#18
+RuboCop::ConfigObsoletion::LOAD_RULES_CACHE = T.let(T.unsafe(nil), Hash)
+
# @api private
#
# source://rubocop//lib/rubocop/config_obsoletion.rb#14
@@ -2741,25 +2751,25 @@ module RuboCop::Cop::AutocorrectLogic
# source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#46
def disable_offense(offense_range); end
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#111
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#113
def disable_offense_at_end_of_line(range, eol_comment); end
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#115
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#117
def disable_offense_before_and_after(range_by_lines); end
# source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#56
def disable_offense_with_eol_or_surround_comment(range); end
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#107
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#109
def max_line_length; end
# Expand the given range to include all of any lines it covers. Does not
# include newline at end of the last line.
#
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#97
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#99
def range_by_lines(range); end
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#88
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#90
def range_of_first_line(range); end
# source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#67
@@ -4989,7 +4999,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter
# Legacy
#
- # source://parser/3.2.2.3/lib/parser/source/tree_rewriter.rb#252
+ # source://parser/3.2.2.4/lib/parser/source/tree_rewriter.rb#252
def rewrite; end
# Swaps sources at the given ranges.
@@ -6523,61 +6533,61 @@ module RuboCop::Cop::HashShorthandSyntax
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#122
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#125
def brackets?(method_dispatch_node); end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#152
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#155
def breakdown_value_types_of_hash(hash_node); end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#99
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#102
def def_node_that_require_parentheses(node); end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#179
def each_omittable_value_pair(hash_value_type_breakdown, &block); end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#175
def each_omitted_value_pair(hash_value_type_breakdown, &block); end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#77
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#80
def enforced_shorthand_syntax; end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#114
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#117
def find_ancestor_method_dispatch_node(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#164
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167
def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#171
def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#71
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#74
def ignore_hash_shorthand_syntax?(pair_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#66
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#69
def ignore_mixed_hash_shorthand_syntax?(hash_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#137
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#140
def last_expression?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#145
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148
def method_dispatch_as_argument?(method_dispatch_node); end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#180
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#183
def mixed_shorthand_syntax_check(hash_value_type_breakdown); end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#196
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199
def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end
# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49
@@ -6585,22 +6595,22 @@ module RuboCop::Cop::HashShorthandSyntax
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#84
def require_hash_value?(hash_key_source, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#90
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93
def require_hash_value_for_around_hash_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#129
def use_element_of_hash_literal_as_receiver?(ancestor, parent); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#131
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#134
def use_modifier_form_without_parenthesized_method_call?(ancestor); end
end
@@ -6613,12 +6623,12 @@ RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil),
# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11
RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#206
+# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#209
class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#215
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#218
def first_argument; end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#219
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#222
def last_argument; end
# Returns the value of attribute node
@@ -6632,7 +6642,7 @@ class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct
# @return [Object] the newly set value
def node=(_); end
- # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#207
+ # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#210
def selector; end
class << self
@@ -8490,11 +8500,6 @@ class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base
private
- # @return [Boolean]
- #
- # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#137
- def ampersand_dot?(node); end
-
# source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49
def autocorrect(corrector, dot, node); end
@@ -8717,7 +8722,23 @@ end
# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#67
RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String)
-# Enforces empty line after guard clause
+# Enforces empty line after guard clause.
+#
+# This cop allows `# :nocov:` directive after guard clause because
+# SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`:
+#
+# [source,ruby]
+# ----
+# def foo
+# # :nocov:
+# return if condition
+# # :nocov:
+# bar
+# end
+# ----
+#
+# Refer to SimpleCov's documentation for more details:
+# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code
#
# @example
#
@@ -8750,90 +8771,106 @@ RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String)
# end
# end
#
-# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#38
+# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#54
class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
extend ::RuboCop::PathUtil
extend ::RuboCop::Cop::Util
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#46
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#63
def on_if(node); end
private
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#65
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#84
def autocorrect(corrector, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#87
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#106
def contains_guard_clause?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#80
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#99
def correct_style?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#160
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#181
def heredoc?(node); end
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#153
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#174
def heredoc_line(node, heredoc_node); end
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#129
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#148
def last_heredoc_argument(node); end
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#143
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#162
def last_heredoc_argument_node(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#172
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#199
def multiple_statements_on_line?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#98
- def next_line_empty?(line); end
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#121
+ def next_line_allowed_directive_comment?(line); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#91
- def next_line_empty_or_enable_directive_comment?(line); end
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#117
+ def next_line_empty?(line); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#102
- def next_line_enable_directive_comment?(line); end
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#110
+ def next_line_empty_or_allowed_directive_comment?(line); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#108
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#127
def next_line_rescue_or_ensure?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#122
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#141
def next_sibling_empty_or_guard_clause?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#113
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#132
def next_sibling_parent_empty_or_else?(node); end
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#164
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#191
def offense_location(node); end
+
+ # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`:
+ # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code
+ #
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#208
+ def simplecov_directive_comment?(comment); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#185
+ def use_heredoc_in_condition?(condition); end
end
-# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#44
+# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#60
RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer)
-# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#43
+# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#59
RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String)
+# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#61
+RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp)
+
# Checks for a newline after the final magic comment.
#
# @example
@@ -10091,13 +10128,13 @@ class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#161
def alignment_node(node); end
- # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#172
+ # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#178
def alignment_node_for_variable_style(node); end
# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#142
def asgn_variable_align_with(outer_node, inner_node); end
- # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#190
+ # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#196
def assignment_or_operator_method(node); end
# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#116
@@ -10212,13 +10249,13 @@ class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#176
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#170
def align_column(asgn_token); end
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#153
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#147
def align_equal_sign(corrector, token, align_to); end
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#143
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#137
def align_equal_signs(range, corrector); end
# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#52
@@ -10226,46 +10263,46 @@ class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#109
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#103
def aligned_tok?(token); end
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#165
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#159
def all_relevant_assignment_lines(line_number); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#185
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#179
def allow_for_trailing_comments?; end
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#78
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#72
def check_assignment(token); end
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#87
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#81
def check_other(token1, token2, ast); end
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#68
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#62
def check_tokens(ast, token1, token2); end
# @yield [range_between(start_pos, end_pos)]
#
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#97
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#91
def extra_space_range(token1, token2); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#139
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#133
def force_equal_sign_alignment?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#117
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#111
def ignored_range?(ast, start_pos); end
# Returns an array of ranges that should not be reported. It's the
# extra spaces between the keys and values in a multiline hash,
# since those are handled by the Layout/HashAlignment cop.
#
- # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#124
+ # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#118
def ignored_ranges(ast); end
end
@@ -10518,7 +10555,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin
# # element are on separate lines is indented one step (two spaces) more
# # than the position inside the opening parenthesis.
#
-# #bad
+# # bad
# array = [
# :value
# ]
@@ -10526,7 +10563,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin
# :no_difference
# ])
#
-# #good
+# # good
# array = [
# :value
# ]
@@ -10539,7 +10576,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin
# # separate lines is indented the same as an array literal which is not
# # defined inside a method call.
#
-# #bad
+# # bad
# # consistent
# array = [
# :value
@@ -10548,7 +10585,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin
# :its_like_this
# ])
#
-# #good
+# # good
# array = [
# :value
# ]
@@ -10559,13 +10596,13 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin
# # The `align_brackets` style enforces that the opening and closing
# # brackets are indented to the same position.
#
-# #bad
+# # bad
# # align_brackets
# and_now_for_something = [
# :completely_different
# ]
#
-# #good
+# # good
# # align_brackets
# and_now_for_something = [
# :completely_different
@@ -11632,71 +11669,72 @@ class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Alignment
include ::RuboCop::Cop::Heredoc
extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#33
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#36
def on_heredoc(node); end
private
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#117
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#120
def adjust_minus(corrector, node); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#112
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115
def adjust_squiggly(corrector, node); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#141
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#144
def base_indent_level(node); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#152
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#155
def heredoc_body(node); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#156
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159
def heredoc_end(node); end
# Returns '~', '-' or nil
#
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#148
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#151
def heredoc_indent_type(node); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#123
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126
def indented_body(node); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#130
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#133
def indented_end(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#88
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#91
def line_too_long?(node); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#100
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103
def longest_line(lines); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#108
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111
def max_line_length; end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#66
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#69
def message(heredoc_indent_type); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#54
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#57
def register_offense(node, heredoc_indent_type); end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#76
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79
def type_message(indentation_width, current_indent_type); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#104
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#107
def unlimited_heredoc_length?; end
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#84
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#87
def width_message(indentation_width); end
end
-# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#29
+# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#32
RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#31
+# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#34
RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String)
# Checks for inconsistent indentation.
@@ -12356,35 +12394,38 @@ class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#105
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#113
def autocorrect(corrector, offense_range, insert_pos, spaces); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#101
- def continuation?(line); end
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#106
+ def continuation?(line, line_num, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#138
def enforced_style_leading?; end
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#79
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#76
+ def investigate(first_line, second_line, end_of_first_line); end
+
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#84
def investigate_leading_style(first_line, second_line, end_of_first_line); end
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#90
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#95
def investigate_trailing_style(first_line, second_line, end_of_first_line); end
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#110
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#118
def leading_offense_range(end_of_first_line, matches); end
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#122
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130
def message(_range); end
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#75
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#72
def raw_lines(node); end
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#116
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#124
def trailing_offense_range(end_of_first_line, matches); end
end
@@ -13550,10 +13591,13 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas
# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#101
def extra_indentation(given_style, parent); end
- # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#222
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#226
+ def find_multiline_block_chain_node(node); end
+
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#237
def first_call_has_a_dot(node); end
- # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#213
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#217
def get_dot_right_above(node); end
# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#113
@@ -13567,12 +13611,12 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas
# @yield [operation_rhs.first_argument]
#
- # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#232
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#247
def operation_rhs(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#242
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#257
def operator_rhs?(node, receiver); end
# a
@@ -14228,21 +14272,26 @@ class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28
+ # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32
def on_send(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#51
+ # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#55
def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end
- # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#35
+ # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#39
def offending_range(node); end
- # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#57
+ # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#61
def selector_range(node); end
+
+ class << self
+ # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28
+ def autocorrect_incompatible_with; end
+ end
end
# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#26
@@ -14849,149 +14898,166 @@ RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.uns
#
# # good
# a ** b
+# @example EnforcedStyleForRationalLiterals: no_space (default)
+# # bad
+# 1 / 48r
+#
+# # good
+# 1/48r
+# @example EnforcedStyleForRationalLiterals: space
+# # bad
+# 1/48r
+#
+# # good
+# 1 / 48r
#
-# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#53
+# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#67
class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base
include ::RuboCop::Cop::PrecedingFollowingAlignment
include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::RationalLiteral
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133
def on_and(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117
def on_and_asgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117
def on_assignment(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133
def on_binary(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#111
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#125
def on_casgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133
def on_class(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117
def on_cvasgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117
def on_gvasgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#78
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#92
def on_if(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117
def on_ivasgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117
def on_lvasgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117
def on_masgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#135
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#149
def on_match_pattern(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141
def on_op_asgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133
def on_or(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117
def on_or_asgn(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#70
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#84
def on_pair(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#85
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#99
def on_resbody(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#66
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#80
def on_sclass(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#93
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#107
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141
def on_special_asgn(node); end
private
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#238
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#256
def align_hash_cop_config; end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#181
- def autocorrect(corrector, range); end
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#195
+ def autocorrect(corrector, range, right_operand); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#165
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179
def check_operator(type, operator, right_operand); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#191
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#209
def enclose_operator_with_space(corrector, range); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#218
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#236
def excess_leading_space?(type, operator, with_space); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#233
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#251
def excess_trailing_space?(right_operand, with_space); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#250
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#274
def force_equal_sign_alignment?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#242
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#260
def hash_table_style?; end
# @yield [msg]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#176
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#190
def offense(type, operator, with_space, right_operand); end
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#204
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#222
def offense_message(type, operator, with_space, right_operand); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#161
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#175
def operator_with_regular_syntax?(send_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#155
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#169
def regular_operator?(send_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254
- def should_not_have_surrounding_space?(operator); end
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#278
+ def should_not_have_surrounding_space?(operator, right_operand); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#246
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#264
def space_around_exponent_operator?; end
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#268
+ def space_around_slash_operator?(right_operand); end
+
class << self
- # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#62
+ # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#76
def autocorrect_incompatible_with; end
end
end
-# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#60
+# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#74
RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#59
+# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#73
RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array)
# Checks that block braces have or don't have a space before the opening
@@ -16766,22 +16832,22 @@ RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String)
#
# @example
# # bad
-# if some_var = true
+# if some_var = value
# do_something
# end
#
# # good
-# if some_var == true
+# if some_var == value
# do_something
# end
# @example AllowSafeAssignment: true (default)
# # good
-# if (some_var = true)
+# if (some_var = value)
# do_something
# end
# @example AllowSafeAssignment: false
# # bad
-# if (some_var = true)
+# if (some_var = value)
# do_something
# end
#
@@ -17269,31 +17335,39 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String)
#
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#67
class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#70
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#71
def on_send(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#95
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117
+ def assumed_argument?(node); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#96
def assumed_usage_context?(node); end
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#102
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#106
def chained_method_name(send_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#89
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90
def debugger_method?(send_node); end
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#83
def debugger_methods; end
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#79
def message(node); end
end
+# source://rubocop//lib/rubocop/cop/lint/debugger.rb#69
+RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array)
+
# source://rubocop//lib/rubocop/cop/lint/debugger.rb#68
RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String)
@@ -18293,7 +18367,7 @@ RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String)
# Checks for blocks without a body.
# Such empty blocks are typically an oversight or we should provide a comment
-# be clearer what we're aiming for.
+# to clarify what we're aiming for.
#
# Empty lambdas and procs are ignored by default.
#
@@ -18998,13 +19072,9 @@ 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.
#
-# @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
#
# # good
# (x - 0.1).abs < Float::EPSILON
@@ -19016,38 +19086,51 @@ 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/
#
-# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#31
+# @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#40
+ # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#79
+ # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89
def check_numeric_returning_method(node); end
- # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#63
+ # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73
def check_send(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#47
+ # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#53
def float?(node); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#68
+ def literal_zero?(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#34
+# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38
RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36
+# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40
RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set)
-# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35
+# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39
RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#32
+# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36
RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38
+# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42
RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Identifies Float literals which are, like, really really really
@@ -19821,6 +19904,57 @@ end
# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#38
RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String)
+# Checks for literal assignments in the conditions of `if`, `while`, and `until`.
+# It emulates the following Ruby warning:
+#
+# [source,console]
+# ----
+# $ ruby -we 'if x = true; end'
+# -e:1: warning: found `= literal' in conditional, should be ==
+# ----
+#
+# As a lint cop, it cannot be determined if `==` is appropriate as intended,
+# therefore this cop does not provide autocorrection.
+#
+# @example
+#
+# # bad
+# if x = 42
+# do_something
+# end
+#
+# # good
+# if x == 42
+# do_something
+# end
+#
+# # good
+# if x = y
+# do_something
+# end
+#
+# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#35
+class RuboCop::Cop::Lint::LiteralAssignmentInCondition < ::RuboCop::Cop::Base
+ # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39
+ def on_if(node); end
+
+ # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39
+ def on_until(node); end
+
+ # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39
+ def on_while(node); end
+
+ private
+
+ # @yield [node]
+ #
+ # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#56
+ def traverse_node(node, &block); end
+end
+
+# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#36
+RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), String)
+
# Checks for interpolated literals.
#
# @example
@@ -20615,89 +20749,91 @@ RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String)
#
# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#44
class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base
- include ::RuboCop::Cop::Alignment
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#75
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#76
def explicit_not_force?(param0); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#70
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#71
def force?(param0); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#79
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#80
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#65
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#66
def receiver_and_method_name(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#60
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#61
def send_exist_node(param0); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#96
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#97
def allowable_use_with_if?(if_node); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#120
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#121
def autocorrect(corrector, node, range); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#131
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#132
def autocorrect_replace_method(corrector, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#148
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#151
def force_method?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#156
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#159
def force_method_name?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#152
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#155
def force_option?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#90
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#91
def if_node_child?(node); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#111
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#112
def message_change_force_method(node); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#115
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#116
def message_remove_file_exist_check(node); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#100
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#101
def register_offense(node, exist_node); end
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#138
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#139
def replacement_method(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51
+# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50
RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52
+# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51
RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50
+# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#49
RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#48
+# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#47
RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53
+# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54
+RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array)
+
+# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52
RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54
+# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53
RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#56
+# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#55
RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# `Dir[...]` and `Dir.glob(...)` do not make any guarantees about
@@ -20754,10 +20890,10 @@ RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(ni
class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#174
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#172
def loop_variable(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#157
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#155
def method_require?(param0 = T.unsafe(nil)); end
# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#65
@@ -20769,19 +20905,19 @@ class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#77
def on_numblock(node); end
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#147
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#145
def unsorted_dir_block?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#152
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#150
def unsorted_dir_each?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#168
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#166
def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#162
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#160
def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#179
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#177
def var_is_required?(param0, param1); end
private
@@ -20801,12 +20937,12 @@ class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#138
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#136
def unsorted_dir_loop?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#142
+ # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#140
def unsorted_dir_pass?(node); end
end
@@ -21836,48 +21972,52 @@ RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let
# # good
# require 'unloaded_feature'
#
-# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#34
+# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38
class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#61
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57
def pp_const?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#47
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#51
def redundant_require_statement?(param0 = T.unsafe(nil)); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#87
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#91
def need_to_require_pp?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#76
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#80
def redundant_feature?(feature_name); end
end
-# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38
+# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#42
RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#41
+# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#45
RuboCop::Cop::Lint::RedundantRequireStatement::PRETTY_PRINT_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#39
+# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#43
RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#40
+# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#44
RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array)
# Checks for redundant safe navigation calls.
-# `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, and `equal?` methods
-# are checked by default. These are customizable with `AllowedMethods` option.
+# Use cases where a constant, named in camel case for classes and modules is `nil` are rare,
+# and an offense is not detected when the receiver is a snake case constant.
+#
+# For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`,
+# and `equal?` methods are checked by default.
+# These are customizable with `AllowedMethods` option.
#
# The `AllowedMethods` option specifies nil-safe methods,
# in other words, it is a method that is allowed to skip safe navigation.
@@ -21889,6 +22029,9 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
#
# @example
# # bad
+# CamelCaseConst&.do_something
+#
+# # bad
# do_something if attrs&.respond_to?(:[])
#
# # good
@@ -21900,12 +22043,31 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
# end
#
# # good
+# CamelCaseConst.do_something
+#
+# # good
# while node.is_a?(BeginNode)
# node = node.parent
# end
#
# # good - without `&.` this will always return `true`
# foo&.respond_to?(:to_a)
+#
+# # bad - for `nil`s conversion methods return default values for the type
+# foo&.to_h || {}
+# foo&.to_h { |k, v| [k, v] } || {}
+# foo&.to_a || []
+# foo&.to_i || 0
+# foo&.to_f || 0.0
+# foo&.to_s || ''
+#
+# # good
+# foo.to_h
+# foo.to_h { |k, v| [k, v] }
+# foo.to_a
+# foo.to_i
+# foo.to_f
+# foo.to_s
# @example AllowedMethods: [nil_safe_method]
# # bad
# do_something if attrs&.nil_safe_method(:[])
@@ -21914,37 +22076,49 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
# do_something if attrs.nil_safe_method(:[])
# do_something if attrs&.not_nil_safe_method(:[])
#
-# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#51
+# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#77
class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedMethods
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#65
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#95
+ def conversion_with_default?(param0 = T.unsafe(nil)); end
+
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#107
def on_csend(node); end
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#61
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#117
+ def on_or(node); end
+
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#90
def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#75
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#134
def check?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#144
def condition?(parent, node); end
end
-# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#56
+# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#82
RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#58
+# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#83
+RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String)
+
+# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85
RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set)
+# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87
+RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp)
+
# Checks for unneeded usages of splat expansion
#
# @example
@@ -22614,20 +22788,25 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base
# @param send_node [RuboCop::AST::SendNode]
# @return [String]
#
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#63
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62
def add_safe_navigation_operator(offense_range:, send_node:); end
# @param corrector [RuboCop::Cop::Corrector]
# @param offense_range [Parser::Source::Range]
# @param send_node [RuboCop::AST::SendNode]
#
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#82
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81
def autocorrect(corrector, offense_range:, send_node:); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#92
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90
def brackets?(send_node); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94
+ def require_parentheses?(send_node); end
end
# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33
@@ -22780,55 +22959,74 @@ RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String)
# foo = foo
# foo, bar = foo, bar
# Foo = Foo
+# hash['foo'] = hash['foo']
+# obj.attr = obj.attr
#
# # good
# foo = bar
# foo, bar = bar, foo
# Foo = Bar
+# hash['foo'] = hash['bar']
+# obj.attr = obj.attr2
+#
+# # good (method calls possibly can return different results)
+# hash[foo] = hash[foo]
#
-# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#19
+# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#26
class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69
def on_and_asgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#41
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#57
def on_casgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36
+ def on_csend(node); end
+
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45
def on_cvasgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45
def on_gvasgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45
def on_ivasgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45
def on_lvasgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#49
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#65
def on_masgn(node); end
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#53
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69
def on_or_asgn(node); end
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36
+ def on_send(node); end
+
private
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#103
+ def handle_attribute_assignment(node); end
+
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#92
+ def handle_key_assignment(node); end
+
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#61
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#77
def multiple_self_assignment?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#71
+ # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#87
def rhs_matches_lhs?(rhs, lhs); end
end
-# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#22
+# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29
RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash)
-# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#20
+# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#27
RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String)
# Checks for `send`, `public_send`, and `__send__` methods
@@ -23352,6 +23550,7 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String)
# 'underscored_string'.to_sym
# :'underscored_symbol'
# 'hyphenated-string'.to_sym
+# "string_#{interpolation}".to_sym
#
# # good
# :string
@@ -23359,6 +23558,7 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String)
# :underscored_string
# :underscored_symbol
# :'hyphenated-string'
+# :"string_#{interpolation}"
# @example EnforcedStyle: strict (default)
#
# # bad
@@ -23394,60 +23594,60 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String)
# b: 2
# }
#
-# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#66
+# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#68
class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::SymbolHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#100
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#105
def on_hash(node); end
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#78
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#83
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#88
def on_sym(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#142
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#147
def correct_hash_key(node); end
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#161
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#166
def correct_inconsistent_hash_keys(keys); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#134
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#139
def in_alias?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#138
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#143
def in_percent_literal_array?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#121
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#126
def properly_quoted?(source, value); end
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#117
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#122
def register_offense(node, correction:, message: T.unsafe(nil)); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#130
+ # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#135
def requires_quotes?(sym_node); end
end
-# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#71
+# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#73
RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#72
+# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74
RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74
+# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76
RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Repacks Parser's diagnostics/errors
@@ -24703,12 +24903,18 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String)
# scope.
# The basic idea for this cop was from the warning of `ruby -cw`:
#
-# assigned but unused variable - foo
+# [source,console]
+# ----
+# assigned but unused variable - foo
+# ----
#
# Currently this cop has advanced logic that detects unreferenced
# reassignments and properly handles varied cases such as branch, loop,
# rescue, ensure, etc.
#
+# NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables
+# can lead to a syntax error, so this case is not autocorrected.
+#
# @example
#
# # bad
@@ -24726,70 +24932,83 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String)
# do_something(some_var)
# end
#
-# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#39
+# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45
class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56
def after_leaving_scope(scope, _variable_table); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#135
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162
def autocorrect(corrector, assignment); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#54
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103
+ def chained_assignment?(node); end
+
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61
def check_for_unused_assignments(variable); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#119
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146
def collect_variable_like_names(scope); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#74
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79
def message_for_useless_assignment(assignment); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#80
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107
def message_specification(assignment, variable); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#90
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117
def multiple_assignment_message(variable_name); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85
+ def offense_range(assignment); end
+
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122
def operator_assignment_message(scope, assignment); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#152
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179
def remove_exception_assignment_part(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#176
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203
def remove_local_variable_assignment_part(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192
def remove_trailing_character_from_operator(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#161
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188
def rename_variable_with_underscore(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#169
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196
def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end
# TODO: More precise handling (rescue, ensure, nested begin, etc.)
#
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#109
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136
def return_value_node_of_scope(scope); end
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#102
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93
+ def sequential_assignment?(node); end
+
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129
def similar_name_message(variable); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#128
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155
def variable_like_method_invocation?(node); end
class << self
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#46
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52
def joining_forces; end
end
end
-# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#44
+# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50
RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String)
# Checks for useless `else` in `begin..end` without `rescue`.
@@ -25200,6 +25419,16 @@ RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Checks for operators, variables, literals, lambda, proc and nonmutating
# methods used in void context.
#
+# `each` blocks are allowed to prevent false positives.
+# For example, the expression inside the `each` block below.
+# It's not void, especially when the receiver is an `Enumerator`:
+#
+# [source,ruby]
+# ----
+# enumerator = [1, 2, 3].filter
+# enumerator.each { |item| item >= 2 } #=> [2, 3]
+# ----
+#
# @example CheckForMethodsWithNoSideEffects: false (default)
# # bad
# def some_method
@@ -25234,101 +25463,109 @@ RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# do_something(some_array)
# end
#
-# source://rubocop//lib/rubocop/cop/lint/void.rb#43
+# source://rubocop//lib/rubocop/cop/lint/void.rb#53
class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/lint/void.rb#80
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#92
def on_begin(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#71
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#82
def on_block(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#80
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#92
def on_kwbegin(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#71
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#82
def on_numblock(node); end
private
- # source://rubocop//lib/rubocop/cop/lint/void.rb#194
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#212
def autocorrect_nonmutating_send(corrector, node, suggestion); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#190
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#208
def autocorrect_void_expression(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#178
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#196
def autocorrect_void_op(corrector, node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#87
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#99
def check_begin(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#93
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#108
def check_expression(expr); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#128
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#146
def check_literal(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#152
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#170
def check_nonmutating(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#136
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#154
def check_self(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#113
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#128
def check_var(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#144
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#162
def check_void_expression(node); end
- # source://rubocop//lib/rubocop/cop/lint/void.rb#104
- def check_void_op(node); end
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#118
+ def check_void_op(node, &block); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/lint/void.rb#170
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#221
+ def entirely_literal?(node); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/lint/void.rb#188
def in_void_context?(node); end
end
-# source://rubocop//lib/rubocop/cop/lint/void.rb#55
+# source://rubocop//lib/rubocop/cop/lint/void.rb#66
RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#52
+# source://rubocop//lib/rubocop/cop/lint/void.rb#60
+RuboCop::Cop::Lint::Void::CONST_MSG = T.let(T.unsafe(nil), String)
+
+# source://rubocop//lib/rubocop/cop/lint/void.rb#63
RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#50
+# source://rubocop//lib/rubocop/cop/lint/void.rb#61
RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#66
+# source://rubocop//lib/rubocop/cop/lint/void.rb#77
RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#68
+# source://rubocop//lib/rubocop/cop/lint/void.rb#79
RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#59
+# source://rubocop//lib/rubocop/cop/lint/void.rb#70
RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#53
+# source://rubocop//lib/rubocop/cop/lint/void.rb#64
RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#57
+# source://rubocop//lib/rubocop/cop/lint/void.rb#68
RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#48
+# source://rubocop//lib/rubocop/cop/lint/void.rb#58
RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#51
+# source://rubocop//lib/rubocop/cop/lint/void.rb#62
RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#56
+# source://rubocop//lib/rubocop/cop/lint/void.rb#67
RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#49
+# source://rubocop//lib/rubocop/cop/lint/void.rb#59
RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/lint/void.rb#58
+# source://rubocop//lib/rubocop/cop/lint/void.rb#69
RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array)
# Common functionality for obtaining source ranges from regexp matches
@@ -25591,13 +25828,12 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String)
# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct
# will be counted as one line regardless of its actual size.
#
+# NOTE: This cop does not apply for `Struct` definitions.
#
# NOTE: The `ExcludedMethods` configuration is deprecated and only kept
# for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns`
# instead. By default, there are no methods to allowed.
#
-# NOTE: This cop does not apply for `Struct` definitions.
-#
# @example CountAsOne: ['array', 'heredoc', 'method_call']
#
# something do
@@ -25723,18 +25959,18 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array
class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base
include ::RuboCop::Cop::CodeLength
- # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47
+ # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#52
def on_casgn(node); end
# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42
def on_class(node); end
- # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42
+ # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46
def on_sclass(node); end
private
- # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#65
+ # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#70
def message(length, max_length); end
end
@@ -26609,18 +26845,21 @@ end
#
# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#7
module RuboCop::Cop::MultilineExpressionIndentation
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14
+ def on_csend(node); end
+
# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#131
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#132
def argument_in_method_call(node, kind); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#187
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#188
def assignment_rhs(node); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#64
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#65
def check(range, node, lhs, rhs); end
# The correct indentation of `node` is usually `IndentationWidth`, with
@@ -26640,62 +26879,62 @@ module RuboCop::Cop::MultilineExpressionIndentation
# bar # normal indentation, not special
# ```
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#54
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#55
def correct_indentation(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#159
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#160
def disqualified_rhs?(candidate, ancestor); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#203
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#204
def grouped_expression?(node); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#72
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#73
def incorrect_style_detected(range, node, lhs, rhs); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#84
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#85
def indentation(node); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#121
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#122
def indented_keyword_expression(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#207
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#208
def inside_arg_list_parentheses?(node, ancestor); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#98
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#99
def keyword_message_tail(node); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#106
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#107
def kw_node_with_special_indentation(node); end
- # In a chain of method calls, we regard the top send node as the base
+ # In a chain of method calls, we regard the top call node as the base
# for indentation of all lines following the first. For example:
# a.
# b c { block }. <-- b is indented relative to a
# d <-- d is indented relative to a
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#31
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#32
def left_hand_side(lhs); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#197
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#198
def not_for_this_cop?(node); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#88
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#89
def operation_description(node, rhs); end
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#145
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#146
def part_of_assignment_rhs(node, candidate); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#183
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#184
def part_of_block_body?(candidate, block_node); end
# Returns true if `node` is a conditional whose `body` and `condition`
@@ -26703,29 +26942,29 @@ module RuboCop::Cop::MultilineExpressionIndentation
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#216
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217
def postfix_conditional?(node); end
# The []= operator and setters (a.b = c) are parsed as :send nodes.
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#175
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#176
def valid_method_rhs_candidate?(candidate, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#164
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#165
def valid_rhs?(candidate, ancestor); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#179
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#180
def valid_rhs_candidate?(candidate, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#220
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#221
def within_node?(inner, outer); end
end
@@ -29072,7 +29311,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#95
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93
def aligned_assignment?(range, line); end
# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70
@@ -29080,12 +29319,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#89
- def aligned_dot?(range, line); end
-
- # @return [Boolean]
- #
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#107
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105
def aligned_identical?(range, line); end
# @return [Boolean]
@@ -29115,10 +29349,10 @@ module RuboCop::Cop::PrecedingFollowingAlignment
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#100
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#98
def aligned_with_append_operator?(range, line); end
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#111
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#109
def aligned_with_assignment(token, line_range); end
# @return [Boolean]
@@ -29152,16 +29386,16 @@ module RuboCop::Cop::PrecedingFollowingAlignment
# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10
def allow_for_alignment?; end
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#129
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#127
def assignment_lines; end
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#133
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#131
def assignment_tokens; end
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#149
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#147
def relevant_assignment_lines(line_range); end
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#176
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#174
def remove_optarg_equals(asgn_tokens, processed_source); end
end
@@ -30616,22 +30850,26 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String)
#
# This cop also identifies places where `use_args(*args)`/`use_kwargs(**kwargs)` can be
# replaced by `use_args(*)`/`use_kwargs(**)`; if desired, this functionality can be disabled
-# by setting UseAnonymousForwarding: false.
+# by setting `UseAnonymousForwarding: false`.
#
-# @example
-# # bad
-# def foo(*args, &block)
-# bar(*args, &block)
-# end
+# And this cop has `RedundantRestArgumentNames`, `RedundantKeywordRestArgumentNames`,
+# and `RedundantBlockArgumentNames` options. This configuration is a list of redundant names
+# that are sufficient for anonymizing meaningless naming.
+#
+# Meaningless names that are commonly used can be anonymized by default:
+# e.g., `*args`, `**options`, `&block`, and so on.
#
+# Names not on this list are likely to be meaningful and are allowed by default.
+#
+# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default)
# # bad
-# def foo(*args, **kwargs, &block)
-# bar(*args, **kwargs, &block)
+# def foo(&block)
+# bar(&block)
# end
#
# # good
-# def foo(...)
-# bar(...)
+# def foo(&)
+# bar(&)
# end
# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2)
# # bad
@@ -30671,181 +30909,237 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String)
# def foo(**kwargs)
# bar(**kwargs)
# end
+# @example RedundantRestArgumentNames: ['args', 'arguments'] (default)
+# # bad
+# def foo(*args)
+# bar(*args)
+# end
#
-# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#75
+# # good
+# def foo(*)
+# bar(*)
+# end
+# @example RedundantKeywordRestArgumentNames: ['kwargs', 'options', 'opts'] (default)
+# # bad
+# def foo(**kwargs)
+# bar(**kwargs)
+# end
+#
+# # good
+# def foo(**)
+# bar(**)
+# end
+# @example
+# # bad
+# def foo(*args, &block)
+# bar(*args, &block)
+# end
+#
+# # bad
+# def foo(*args, **kwargs, &block)
+# bar(*args, **kwargs, &block)
+# end
+#
+# # good
+# def foo(...)
+# bar(...)
+# end
+#
+# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#116
class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
extend ::RuboCop::Cop::TargetRubyVersion
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134
def on_def(node); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134
def on_defs(node); end
private
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#122
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174
def add_forward_all_offenses(node, send_classifications, forwardable_args); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#231
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#295
def add_parens_if_missing(node, corrector); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#131
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#183
def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#223
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#287
def allow_only_rest_arguments?; end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#215
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#279
def arguments_range(node, first_node); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#172
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#226
def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#211
def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#114
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#158
def extract_forwardable_args(args); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#201
def non_splat_or_block_pass_lvar_references(body); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#118
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170
def only_forwards_all?(send_classifications); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#205
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#162
+ def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end
+
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#243
+ def redundant_named_arg(arg, config_name, keyword); end
+
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#269
def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#189
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#253
def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#197
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#261
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#227
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#291
def use_anonymous_forwarding?; end
+
+ class << self
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#130
+ def autocorrect_incompatible_with; end
+ end
end
-# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#83
+# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#124
RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#86
+# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127
RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#82
+# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#123
RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#85
+# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#126
RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#87
+# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#128
RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String)
# Classifies send nodes for possible rest/kwrest/all (including block) forwarding.
#
-# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#238
+# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#302
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#250
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#314
def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#278
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#342
def classification; end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#245
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#309
def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#272
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#336
def forwarded_block_arg; end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#248
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#312
def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#266
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#330
def forwarded_kwrest_arg; end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#260
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#324
def forwarded_rest_arg; end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#242
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#306
def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#348
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#410
+ def additional_kwargs?; end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#406
+ def additional_kwargs_or_forwarded_kwargs?; end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#420
def allow_offense_for_no_block?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#391
def any_arg_referenced?; end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#311
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#375
def arguments; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#290
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#354
def can_forward_all?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#342
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#414
def forward_additional_kwargs?; end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#307
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#371
def forwarded_rest_and_kwrest_args; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#424
def no_additional_args?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#399
def no_post_splat_args?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#303
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367
def offensive_block_forwarding?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#323
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#387
def referenced_block_arg?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#319
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#383
def referenced_kwrest_arg?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#315
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#379
def referenced_rest_arg?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#299
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#363
def ruby_32_missing_rest_or_kwest?; end
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#331
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#395
def target_ruby_version; end
end
@@ -30887,6 +31181,46 @@ RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String)
# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#44
RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String)
+# Identifies usages of `arr[0]` and `arr[-1]` and suggests to change
+# them to use `arr.first` and `arr.instead`.
+#
+# The cop is disabled by default due to safety concerns.
+#
+# @example
+# # bad
+# arr[0]
+# arr[-1]
+#
+# # good
+# arr.first
+# arr.last
+# arr[0] = 2
+# arr[0][-2]
+#
+# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#28
+class RuboCop::Cop::Style::ArrayFirstLast < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#35
+ def on_send(node); end
+
+ private
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#58
+ def brace_method?(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#53
+ def innermost_braces_node(node); end
+end
+
+# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#31
+RuboCop::Cop::Style::ArrayFirstLast::MSG = T.let(T.unsafe(nil), String)
+
+# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#32
+RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
# In Ruby 3.1, `Array#intersect?` has been added.
#
# This cop identifies places where `(array1 & array2).any?`
@@ -30895,6 +31229,15 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String)
# The `array1.intersect?(array2)` method is faster than
# `(array1 & array2).any?` and is more readable.
#
+# In cases like the following, compatibility is not ensured,
+# so it will not be detected when using block argument.
+#
+# [source,ruby]
+# ----
+# ([1] & [1,2]).any? { |x| false } # => false
+# [1].intersect?([1,2]) { |x| false } # => true
+# ----
+#
# @example
# # bad
# (array1 & array2).any?
@@ -30916,46 +31259,46 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String)
# array1.intersect?(array2)
# !array1.intersect?(array2)
#
-# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#40
+# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#49
class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
extend ::RuboCop::Cop::TargetRubyVersion
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#65
def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#70
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#79
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#47
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56
def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#86
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94
def bad_intersection_check?(node); end
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#98
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#106
def message(receiver, argument, method_name); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102
def straight?(method_name); end
end
-# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#64
+# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73
RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#67
+# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76
RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#68
+# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77
RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#66
+# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75
RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array)
# Checks for uses of "*" as a substitute for _join_.
@@ -31080,28 +31423,36 @@ RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# # ...
# end
#
-# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#19
+# # bad
+# f = Tempfile.open('temp')
+#
+# # good
+# Tempfile.open('temp') do |f|
+# # ...
+# end
+#
+# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#27
class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base
- # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#26
+ # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#32
+ def file_open_method?(param0 = T.unsafe(nil)); end
+
+ # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#36
def on_send(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#41
+ # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#46
def cleanup?(node); end
end
-# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#20
+# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#28
RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#24
+# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#29
RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#22
-RuboCop::Cop::Style::AutoResourceCleanup::TARGET_METHODS = T.let(T.unsafe(nil), Hash)
-
# Checks if usage of %() or %Q() matches configuration.
#
# @example EnforcedStyle: bare_percent (default)
@@ -32130,53 +32481,53 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# self.class.eq(other.class) && name.eq(other.name)
# end
#
-# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#47
+# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#52
class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::AllowedMethods
include ::RuboCop::Cop::AllowedPattern
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#59
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#64
def class_comparison_candidate?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#65
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#70
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#87
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#92
def class_name(class_node, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#107
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#112
def class_name_method?(method_name); end
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#123
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#128
def offense_range(receiver_node, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#111
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#116
def require_cbase?(class_node); end
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#119
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#124
def trim_string_quotes(class_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#115
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#120
def unable_to_determine_type?(class_node); end
end
-# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#56
+# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#61
RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#53
+# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#58
RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#55
+# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#60
RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Checks for uses of the class/module name instead of
@@ -32464,6 +32815,7 @@ RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), A
# # bad
# items.collect
# items.collect!
+# items.collect_concat
# items.inject
# items.detect
# items.find_all
@@ -32472,46 +32824,47 @@ RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), A
# # good
# items.map
# items.map!
+# items.flat_map
# items.reduce
# items.find
# items.select
# items.include?
#
-# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#41
+# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#43
class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base
include ::RuboCop::Cop::MethodPreference
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49
def on_block(node); end
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49
def on_numblock(node); end
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#53
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#61
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#63
def check_method_node(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#70
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#72
def implicit_block?(node); end
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#78
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#80
def message(node); end
# Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead
# of a block.
#
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#84
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#86
def methods_accepting_symbol; end
end
-# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#45
+# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47
RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String)
# Checks for methods invoked via the `::` operator instead
@@ -32625,40 +32978,39 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String)
#
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59
class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base
- include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64
def on_block(node); end
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#79
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#77
def on_for(node); end
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64
def on_numblock(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#90
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#88
def collection_looping_method?(node); end
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#106
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105
def combine_with_left_sibling(corrector, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#93
def same_collection_looping_block?(node, sibling); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#102
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101
def same_collection_looping_for?(node, sibling); end
end
-# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64
+# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62
RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String)
# Enforces using `` or %x around command literals.
@@ -34578,30 +34930,33 @@ class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#44
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46
def on_case(case_node); end
private
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#58
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63
def autocorrect(corrector, case_node); end
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#65
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70
def correct_case_when(corrector, case_node, when_nodes); end
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#77
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82
def correct_when_conditions(corrector, when_nodes); end
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#92
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97
def keep_first_when_comment(case_range, corrector); end
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#102
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107
def replace_then_with_line_break(corrector, conditions, when_node); end
end
# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42
RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String)
+# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43
+RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array)
+
# Checks for empty else-clauses, possibly including comments and/or an
# explicit `nil` depending on the EnforcedStyle.
#
@@ -36176,13 +36531,25 @@ RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String)
# Enforces the use of a single string formatting utility.
-# Valid options include Kernel#format, Kernel#sprintf and String#%.
+# Valid options include `Kernel#format`, `Kernel#sprintf`, and `String#%`.
#
-# The detection of String#% cannot be implemented in a reliable
+# The detection of `String#%` cannot be implemented in a reliable
# manner for all cases, so only two scenarios are considered -
# if the first argument is a string literal and if the second
# argument is an array literal.
#
+# Autocorrection will be applied when using argument is a literal or known built-in conversion
+# methods such as `to_d`, `to_f`, `to_h`, `to_i`, `to_r`, `to_s`, and `to_sym` on variables,
+# provided that their return value is not an array. For example, when using `to_s`,
+# `'%s' % [1, 2, 3].to_s` can be autocorrected without any incompatibility:
+#
+# [source,ruby]
+# ----
+# '%s' % [1, 2, 3] #=> '1'
+# format('%s', [1, 2, 3]) #=> '[1, 2, 3]'
+# '%s' % [1, 2, 3].to_s #=> '[1, 2, 3]'
+# ----
+#
# @example EnforcedStyle: format (default)
# # bad
# puts sprintf('%10s', 'hoge')
@@ -36205,45 +36572,55 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String)
# # good
# puts '%10s' % 'hoge'
#
-# source://rubocop//lib/rubocop/cop/style/format_string.rb#38
+# source://rubocop//lib/rubocop/cop/style/format_string.rb#50
class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#46
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#61
def formatter(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#59
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#74
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#55
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#70
def variable_argument?(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#81
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#102
def autocorrect(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#97
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#118
def autocorrect_from_percent(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#111
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#132
def autocorrect_to_percent(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#124
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#88
+ def autocorrectable?(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#145
def format_single_parameter(arg); end
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#73
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#94
def message(detected_style); end
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#77
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#98
def method_name(style_name); end
end
-# source://rubocop//lib/rubocop/cop/style/format_string.rb#42
+# Known conversion methods whose return value is not an array.
+#
+# source://rubocop//lib/rubocop/cop/style/format_string.rb#58
+RuboCop::Cop::Style::FormatString::AUTOCORRECTABLE_METHODS = T.let(T.unsafe(nil), Array)
+
+# source://rubocop//lib/rubocop/cop/style/format_string.rb#54
RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/format_string.rb#43
+# source://rubocop//lib/rubocop/cop/style/format_string.rb#55
RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Use a consistent style for named format string tokens.
@@ -36676,6 +37053,25 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String)
# # good
# foo || raise('exception') if something
# ok
+#
+# # bad
+# define_method(:test) do
+# if something
+# work
+# end
+# end
+#
+# # good
+# define_method(:test) do
+# return unless something
+#
+# work
+# end
+#
+# # also good
+# define_method(:test) do
+# work if something
+# end
# @example AllowConsecutiveConditionals: false (default)
# # bad
# def test
@@ -36712,7 +37108,7 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String)
# end
# end
#
-# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#95
+# 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
@@ -36721,83 +37117,89 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base
include ::RuboCop::Cop::StatementModifier
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132
+ def on_block(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123
def on_def(node); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123
def on_defs(node); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#113
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#139
def on_if(node); end
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132
+ def on_numblock(node); end
+
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#249
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#275
def accepted_form?(node, ending: T.unsafe(nil)); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283
def accepted_if?(node, ending); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#271
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297
def allowed_consecutive_conditionals?; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#239
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265
def and_or_guard_clause?(guard_clause); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#184
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210
def autocorrect(corrector, node, condition, replacement, guard); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#236
def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#133
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#159
def check_ending_body(body); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#144
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#170
def check_ending_if(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#154
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#180
def consecutive_conditionals?(parent, node); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#231
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257
def guard_clause_source(guard_clause); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#206
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#232
def heredoc?(argument); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#222
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#248
def range_of_branch_to_remove(node, guard); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#162
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188
def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#267
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293
def remove_whole_lines(corrector, range); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#244
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#270
def too_long_for_single_line?(node, example); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#253
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#279
def trivial?(node); end
end
-# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#101
+# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#120
RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String)
# Checks for presence or absence of braces around hash literal as a last
@@ -36957,72 +37359,95 @@ RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
# @example
# # bad
# hash.keys.each { |k| p k }
-# hash.values.each { |v| p v }
+# hash.each { |k, unused_value| p k }
#
# # good
# hash.each_key { |k| p k }
+#
+# # bad
+# hash.values.each { |v| p v }
+# hash.each { |unused_key, v| p v }
+#
+# # good
# hash.each_value { |v| p v }
# @example AllowedReceivers: ['execute']
# # good
# execute(sql).keys.each { |v| p v }
# execute(sql).values.each { |v| p v }
#
-# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#30
+# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#36
class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base
include ::RuboCop::Cop::AllowedReceivers
include ::RuboCop::Cop::Lint::UnusedArgument
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#38
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#50
+ def each_arguments(param0 = T.unsafe(nil)); end
+
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#45
def kv_each(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#55
def kv_each_with_block_pass(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60
def on_block(node); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#55
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#83
def on_block_pass(node); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60
def on_numblock(node); end
private
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#86
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#134
def check_argument(variable); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#158
def correct_args(node, corrector); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#96
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#144
def correct_implicit(node, corrector, method_name); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#101
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#149
def correct_key_value_each(node, corrector); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#82
- def format_message(method_name); end
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#130
+ def format_message(method_name, current); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#117
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#165
def kv_range(outer_node); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#63
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#106
+ def message(prefer, method_name, unused_code); end
+
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#112
+ def register_each_args_offense(node, message, prefer, unused_range); end
+
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#91
def register_kv_offense(target, method); end
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#72
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#119
def register_kv_with_block_pass_offense(node, target, method); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#92
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#102
+ def unused_block_arg_exist?(node, block_arg_source); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#140
def used?(arg); end
end
-# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#35
+# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#41
RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String)
+# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#42
+RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil), String)
+
# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods
# that can be replaced with `Hash#except` method.
#
@@ -37534,40 +37959,43 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base
private
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#181
+ def assignable_condition_value(node); end
+
# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140
def check_branches(node, branches); end
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#168
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#190
def check_expressions(node, expressions, insert_position); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#156
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#170
def duplicated_expressions?(node, expressions); end
# `elsif` branches show up in the if node as nested `else` branches. We
# need to recursively iterate over all `else` branches.
#
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#208
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#230
def expand_elses(branch); end
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#245
def head(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#192
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#214
def last_child_of_parent?(node); end
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#202
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#224
def message(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#198
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#220
def single_child_branch?(branch_node); end
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#219
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#241
def tail(node); end
end
@@ -38264,10 +38692,13 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#61
def inverse_candidate?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92
def on_block(node); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78
+ def on_csend(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92
def on_numblock(node); end
# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78
@@ -38277,39 +38708,39 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#176
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#177
def camel_case_constant?(node); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#120
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#121
def correct_inverse_block(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#111
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#112
def correct_inverse_method(corrector, node); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#127
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#128
def correct_inverse_selector(block, corrector); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#180
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#181
def dot_range(loc); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#163
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#164
def end_parentheses(node, method_call); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#149
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#150
def inverse_blocks; end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#144
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#145
def inverse_methods; end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#190
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#191
def message(method, inverse); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#153
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#154
def negated?(node); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#157
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158
def not_to_receiver(node, method_call); end
# When comparing classes, `!(Integer < Numeric)` is not the same as
@@ -38317,10 +38748,10 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#171
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#172
def possible_class_hierarchy_check?(lhs, rhs, method); end
- # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#184
+ # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#185
def remove_end_parenthesis(corrector, node, method, method_call); end
class << self
@@ -39073,13 +39504,21 @@ class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#41
def map_to_h?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48
+ # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52
+ def on_csend(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52
def on_send(node); end
private
- # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#62
+ # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#67
def autocorrect(corrector, to_h, map); end
+
+ class << self
+ # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48
+ def autocorrect_incompatible_with; end
+ end
end
# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#37
@@ -40069,12 +40508,12 @@ RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String)
# defining `respond_to_missing?`.
#
# @example
-# #bad
+# # bad
# def method_missing(name, *args)
# # ...
# end
#
-# #good
+# # good
# def respond_to_missing?(name, include_private)
# # ...
# end
@@ -40950,7 +41389,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop-sorbet/0.7.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18
+ # source://rubocop-sorbet/0.7.6/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18
def on_assignment(value); end
# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127
@@ -40968,7 +41407,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217
def splat_value(param0 = T.unsafe(nil)); end
- # source://rubocop-sorbet/0.7.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12
+ # source://rubocop-sorbet/0.7.6/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12
def t_let(param0 = T.unsafe(nil)); end
private
@@ -41507,16 +41946,13 @@ class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#48
+ # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#40
def autocorrect(corrector, if_node); end
- # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#41
- def if_node(node); end
-
- # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#55
+ # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#47
def remove_parentheses(source); end
- # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#61
+ # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#53
def replace_loc_and_whitespace(corrector, range, replacement); end
end
@@ -42521,24 +42957,24 @@ 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#26
+ # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#27
def on_send(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#48
+ # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53
def anonymous_forwarding?(argument); end
# Checks for an acceptable case of `foo.+(bar).baz`.
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#42
+ # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#47
def method_call_with_parenthesized_arg?(argument); end
- # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#55
+ # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60
def wrap_in_parentheses_if_chained(corrector, node); end
end
@@ -43848,50 +44284,53 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177
def begin_block_has_multiline_statements?(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#161
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169
def condition_range(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181
def contain_rescue_or_ensure?(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#154
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#162
def correct_modifier_form_after_multiline_begin_block(corrector, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#165
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173
def empty_begin?(node); end
# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110
def register_offense(node); end
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#139
+ def remove_begin(corrector, offense_range, node); end
+
# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127
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#141
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#149
def restore_removed_comments(corrector, offense_range, node, first_child); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#148
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#156
def use_modifier_form_after_multiline_begin_block?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#186
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#194
def valid_begin_assignment?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#179
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#187
def valid_context_using_only_begin?(node); end
end
@@ -44124,13 +44563,8 @@ class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base
private
- # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#86
- def indented_else_node(expression, node); end
-
- # @return [Boolean]
- #
# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78
- def invert_expression?(node); end
+ def indented_else_node(expression, node); end
# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48
def message(node); end
@@ -44257,23 +44691,63 @@ RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil),
# # good
# do_something(foo: bar, baz: qux)
#
-# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#16
+# # bad
+# do_something(**{foo: bar, baz: qux}.merge(options))
+#
+# # good
+# do_something(foo: bar, baz: qux, **options)
+#
+# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#22
class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#21
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#29
def on_hash(node); end
private
- # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#39
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#45
+ def allowed_double_splat_receiver?(kwsplat); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#55
+ def autocorrect(corrector, node, kwsplat); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#89
+ def autocorrect_merge_methods(corrector, merge_methods, kwsplat); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#85
def closing_brace(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#35
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#111
+ def convert_to_new_arguments(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#107
+ def extract_send_methods(kwsplat); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#123
+ def mergeable?(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#81
def opening_brace(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#100
+ def range_of_merge_methods(merge_methods); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#66
+ def root_receiver(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#75
+ def select_merge_method_nodes(kwsplat); end
end
-# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#19
+# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#26
+RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MERGE_METHODS = T.let(T.unsafe(nil), Array)
+
+# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#25
RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String)
# Checks for redundant `each`.
@@ -44336,48 +44810,64 @@ RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra
# Checks for RuntimeError as the argument of raise/fail.
#
-# It checks for code like this:
-#
# @example
-# # Bad
+# # bad
# raise RuntimeError, 'message'
-#
-# # Bad
# raise RuntimeError.new('message')
#
-# # Good
+# # good
# raise 'message'
#
-# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#19
+# # bad - message is not a string
+# raise RuntimeError, Object.new
+# raise RuntimeError.new(Object.new)
+#
+# # good
+# raise Object.new.to_s
+#
+# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23
class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#59
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#79
def compact?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#54
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#74
def exploded?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#45
+ # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and
+ # `raise RuntimeError.new('message')` to `raise 'message'`.
+ #
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33
+ def on_send(node); end
+
+ private
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#57
def fix_compact(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#39
def fix_exploded(node); end
- # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and
- # `raise RuntimeError.new('message')` to `raise 'message'`.
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#65
+ def replaced_compact(message); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#47
+ def replaced_exploded(node, command, message); end
+
+ # @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29
- def on_send(node); end
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#53
+ def string_message?(message); end
end
-# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#22
+# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#26
RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23
+# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#27
RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#25
+# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29
RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Identifies places where `fetch(key) { value }` can be replaced by `fetch(key, value)`.
@@ -44530,6 +45020,9 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T
# @example AllCops:ActiveSupportExtensionsEnabled: false (default)
# # good
# arr.select { |x| x > 1 }.many?
+#
+# # good
+# arr.select { |x| x > 1 }.present?
# @example AllCops:ActiveSupportExtensionsEnabled: true
# # bad
# arr.select { |x| x > 1 }.many?
@@ -44537,38 +45030,47 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T
# # good
# arr.many? { |x| x > 1 }
#
-# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#38
+# # bad
+# arr.select { |x| x > 1 }.present?
+#
+# # good
+# arr.any? { |x| x > 1 }
+#
+# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#53
class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#65
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81
+ def on_csend(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#47
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#62
def select_predicate?(param0 = T.unsafe(nil)); end
private
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#91
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#108
def offense_range(select_node, predicate_node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#95
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#112
def predicate_range(predicate_node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#77
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#94
def register_offense(select_node, predicate_node); end
end
-# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#41
+# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56
RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#43
+# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#58
RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array)
-# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56
+# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#71
RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash)
-# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#44
+# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#59
RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Check for uses of `Object#freeze` on immutable objects.
@@ -44938,12 +45440,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#166
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#168
def argument_is_method?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#134
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#136
def argument_newline?(node); end
# @return [Boolean]
@@ -44951,12 +45453,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#100
def ends_with_backslash_without_comment?(source_line); end
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#146
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#148
def find_node_for_line(line); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#122
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124
def inside_string_literal?(range, token); end
# @return [Boolean]
@@ -44966,7 +45468,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#173
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#175
def method_call_with_arguments?(node); end
# A method call without parentheses such as the following cannot remove `\`:
@@ -44976,12 +45478,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
#
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#130
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#132
def method_with_argument?(current_token, next_token); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#114
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#116
def redundant_line_continuation?(range); end
# @return [Boolean]
@@ -44991,12 +45493,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#152
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#154
def same_line?(node, line); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#177
+ # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#179
def start_with_arithmetic_operator?(source_line); end
# @return [Boolean]
@@ -45029,159 +45531,163 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
include ::RuboCop::Cop::Parentheses
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#33
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#35
def allowed_pin_operator?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#38
def arg_in_call_with_block?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#222
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#254
def first_send_argument?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#227
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#259
def first_super_argument?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#232
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#264
def first_yield_argument?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#166
def interpolation?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#27
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#29
def method_node_and_args(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#38
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#40
def on_begin(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#24
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#26
def range_end?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#30
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#32
def rescue?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#21
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#23
def square_brackets?(param0 = T.unsafe(nil)); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#68
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#70
def allowed_ancestor?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#61
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#63
def allowed_expression?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#73
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#75
def allowed_method_call?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#78
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#80
def allowed_multiple_expression?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#87
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#89
def allowed_ternary?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#236
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#268
def call_chain_starts_with_int?(begin_node, send_node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#127
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#131
def check(begin_node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#142
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#168
def check_send(begin_node, node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#151
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177
def check_unary(begin_node, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#175
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#201
def disallowed_literal?(begin_node, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#109
def empty_parentheses?(node); end
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#142
+ def find_offense_message(begin_node, node); end
+
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#112
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#114
def first_arg_begins_with_hash_literal?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#243
def first_argument?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#54
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#56
def ignore_syntax?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#171
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#197
def keyword_ancestor?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#190
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#216
def keyword_with_redundant_parentheses?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#100
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#102
def like_method_argument_parentheses?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#229
def method_call_with_redundant_parentheses?(node); end
- # @return [Boolean]
- #
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119
- def method_chain_begins_with_hash_literal?(node); end
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#123
+ def method_chain_begins_with_hash_literal(node); end
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#161
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#187
def offense(node, msg); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#213
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#239
def only_begin_arg?(args); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#46
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#48
def parens_allowed?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#179
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#205
def raised_to_power_negative_numeric?(begin_node, node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#167
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#193
def suspect_unary?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#93
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#95
def ternary_parentheses_required?; end
end
+# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#20
+RuboCop::Cop::Style::RedundantParentheses::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array)
+
# Checks for usage of the %q/%Q syntax when '' or "" would do.
#
# @example
@@ -46640,9 +47146,13 @@ RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), St
# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#79
RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String)
-# Enforces consistency between 'return nil' and 'return'.
+# Enforces consistency between `return nil` and `return`.
#
-# Supported styles are: return, return_nil.
+# This cop is disabled by default. Because there seems to be a perceived semantic difference
+# between `return` and `return nil`. The former can be seen as just halting evaluation,
+# while the latter might be used when the return value is of specific concern.
+#
+# Supported styles are `return` and `return_nil`.
#
# @example EnforcedStyle: return (default)
# # bad
@@ -46665,46 +47175,46 @@ RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), St
# return nil if arg
# end
#
-# source://rubocop//lib/rubocop/cop/style/return_nil.rb#31
+# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35
class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#86
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#90
def chained_send?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#89
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#93
def define_method?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#44
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#48
def on_return(node); end
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#42
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#46
def return_nil_node?(param0 = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#39
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#43
def return_node?(param0 = T.unsafe(nil)); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#80
def correct_style?(node); end
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#72
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76
def message(_node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#81
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#85
def scoped_node?(node); end
end
-# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35
+# source://rubocop//lib/rubocop/cop/style/return_nil.rb#39
RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/return_nil.rb#36
+# 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.
@@ -47231,40 +47741,45 @@ class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106
def exist_semicolon_after_left_curly_brace?(tokens); end
# @return [Boolean]
#
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#110
+ def exist_semicolon_after_left_lambda_curly_brace?(tokens); end
+
+ # @return [Boolean]
+ #
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#118
def exist_semicolon_after_left_string_interpolation_brace?(tokens); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#98
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102
def exist_semicolon_before_right_curly_brace?(tokens); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114
def exist_semicolon_before_right_string_interpolation_brace?(tokens); end
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#134
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#142
def expressions_per_line(exprs); end
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#156
def find_range_node(token_before_semicolon); end
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#140
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148
def find_semicolon_positions(line); end
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#154
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#162
def range_nodes; end
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#122
def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/semicolon.rb#83
+ # source://rubocop//lib/rubocop/cop/style/semicolon.rb#84
def semicolon_position(tokens); end
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#79
@@ -47486,13 +48001,16 @@ RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar
class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42
+ # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#43
def on_send(node); end
- # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38
+ # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39
def single_argument_dig?(param0 = T.unsafe(nil)); end
end
+# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#36
+RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array)
+
# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34
RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String)
@@ -47571,6 +48089,50 @@ end
# source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#34
RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String)
+# Checks for single-line `do`...`end` block.
+#
+# In practice a single line `do`...`end` is autocorrected when `EnforcedStyle: semantic`
+# in `Style/BlockDelimiters`. The autocorrection maintains the `do` ... `end` syntax to
+# preserve semantics and does not change it to `{`...`}` block.
+#
+# @example
+#
+# # bad
+# foo do |arg| bar(arg) end
+#
+# # good
+# foo do |arg|
+# bar(arg)
+# end
+#
+# # bad
+# ->(arg) do bar(arg) end
+#
+# # good
+# ->(arg) { bar(arg) }
+#
+# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#28
+class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34
+ def on_block(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34
+ def on_numblock(node); end
+
+ private
+
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#55
+ def do_line(node); end
+
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#63
+ def x(corrector, node); end
+end
+
+# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#31
+RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String)
+
# Checks for single-line method definitions that contain a body.
# It will accept single-line methods with no body.
#
@@ -47740,10 +48302,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#240
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242
def allow_modifier?; end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#225
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227
def arguments_range(node); end
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81
@@ -47773,13 +48335,13 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130
def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#182
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184
def correct_outer_condition(corrector, condition); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#195
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197
def insert_bang(corrector, node, is_modify_form); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#208
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210
def insert_bang_for_and(corrector, node); end
# @return [Boolean]
@@ -47789,15 +48351,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246
def outer_condition_modify_form?(node, if_branch); end
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#236
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238
def replace_condition(condition); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#220
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222
def require_parentheses?(condition); end
# @return [Boolean]
@@ -47810,7 +48372,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#231
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233
def wrap_condition?(node); end
class << self
@@ -48574,6 +49136,29 @@ end
# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30
RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String)
+# Enforces the presence of parentheses in `super` containing arguments.
+#
+# `super` is a keyword and is provided as a distinct cop from those designed for method call.
+#
+# @example
+#
+# # bad
+# super name, age
+#
+# # good
+# super(name, age)
+#
+# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#18
+class RuboCop::Cop::Style::SuperWithArgsParentheses < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ # source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#23
+ def on_super(node); end
+end
+
+# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#21
+RuboCop::Cop::Style::SuperWithArgsParentheses::MSG = T.let(T.unsafe(nil), String)
+
# Enforces the use of shorthand-style swapping of 2 variables.
#
# @example
@@ -48690,43 +49275,43 @@ class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
extend ::RuboCop::Cop::TargetRubyVersion
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#58
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66
def on_array(node); end
private
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#88
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96
def build_bracketed_array(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#70
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78
def complex_content?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#84
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92
def invalid_percent_array_contents?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119
def symbol_without_quote?(string); end
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#103
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111
def to_symbol_literal(string); end
class << self
# Returns the value of attribute largest_brackets.
#
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#55
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63
def largest_brackets; end
# Sets the attribute largest_brackets
#
# @param value the value to set the attribute largest_brackets to.
#
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#55
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63
def largest_brackets=(_arg0); end
end
end
@@ -48740,6 +49325,12 @@ RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array)
# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50
RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String)
+# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57
+RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array)
+
+# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53
+RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array)
+
# Checks symbol literal syntax.
#
# @example
@@ -50565,61 +51156,62 @@ RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Ha
# config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i
# ----
#
-# @example SupportedOperators: ['*', '+', '&'']
+# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default)
# # bad
-# 1 + x
# 10 * y
+# 1 + x
# 1 & z
+# 1 | x
+# 1 ^ x
# 1 + CONST
#
# # good
-# 60 * 24
-# x + 1
# y * 10
+# x + 1
# z & 1
+# x | 1
+# x ^ 1
# CONST + 1
+# 60 * 24
#
-# # good
-# 1 | x
-#
-# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#39
+# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40
class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#46
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47
def on_new_investigation; end
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#50
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51
def on_send(node); end
private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#72
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#73
def constant_portion?(node); end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#80
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#81
def offended_ancestor?(node); end
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#84
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#85
def offended_nodes; end
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#76
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#77
def supported_operators; end
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#68
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#69
def yoda_expression_constant?(lhs, rhs); end
end
-# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#42
+# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43
RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#44
+# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45
RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
# Checks for numeric comparisons that can be replaced
@@ -53237,32 +53829,31 @@ end
module RuboCop::FileFinder
# @api private
#
- # source://rubocop//lib/rubocop/file_finder.rb#17
+ # source://rubocop//lib/rubocop/file_finder.rb#13
def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end
# @api private
#
- # source://rubocop//lib/rubocop/file_finder.rb#24
+ # source://rubocop//lib/rubocop/file_finder.rb#20
def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end
private
# @api private
#
- # source://rubocop//lib/rubocop/file_finder.rb#32
+ # source://rubocop//lib/rubocop/file_finder.rb#28
def traverse_files_upwards(filename, start_dir, stop_dir); end
class << self
# @api private
#
- # source://rubocop//lib/rubocop/file_finder.rb#9
- def root_level=(level); end
+ # source://rubocop//lib/rubocop/file_finder.rb#10
+ def root_level; end
# @api private
- # @return [Boolean]
#
- # source://rubocop//lib/rubocop/file_finder.rb#13
- def root_level?(path, stop_dir); end
+ # source://rubocop//lib/rubocop/file_finder.rb#10
+ def root_level=(_arg0); end
end
end
@@ -53765,37 +54356,37 @@ RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Ha
# This formatter saves the output as an html file.
#
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#9
class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter
# @return [HTMLFormatter] a new instance of HTMLFormatter
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#30
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28
def initialize(output, options = T.unsafe(nil)); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#40
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#38
def file_finished(file, offenses); end
# Returns the value of attribute files.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#26
def files; end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#45
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#43
def finished(inspected_files); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#51
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#49
def render_html; end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#36
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#34
def started(target_files); end
# Returns the value of attribute summary.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#26
def summary; end
end
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#15
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#13
class RuboCop::Formatter::HTMLFormatter::Color < ::Struct
# Returns the value of attribute alpha
#
@@ -53819,7 +54410,7 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct
# @return [Object] the newly set value
def blue=(_); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#20
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#18
def fade_out(amount); end
# Returns the value of attribute green
@@ -53844,7 +54435,7 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct
# @return [Object] the newly set value
def red=(_); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#16
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14
def to_s; end
class << self
@@ -53856,68 +54447,68 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct
end
end
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#10
RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String)
# This class provides helper methods used in the ERB template.
#
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#62
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#60
class RuboCop::Formatter::HTMLFormatter::ERBContext
include ::RuboCop::PathUtil
include ::RuboCop::Formatter::TextUtil
# @return [ERBContext] a new instance of ERBContext
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76
def initialize(files, summary); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#125
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#123
def base64_encoded_logo_image; end
# Make Kernel#binding public.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#85
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83
def binding; end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#90
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#88
def decorated_message(offense); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#121
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#119
def escape(string); end
# Returns the value of attribute files.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#74
def files; end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#101
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#99
def highlight_source_tag(offense); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#92
def highlighted_source_line(offense); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#117
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#115
def possible_ellipses(location); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110
def source_after_highlight(offense); end
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#107
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#105
def source_before_highlight(offense); end
# Returns the value of attribute summary.
#
- # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76
+ # source://rubocop//lib/rubocop/formatter/html_formatter.rb#74
def summary; end
end
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#74
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#72
RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String)
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#66
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#64
RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash)
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#26
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24
class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct
# Returns the value of attribute offenses
#
@@ -53950,7 +54541,7 @@ class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct
end
end
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#23
class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct
# Returns the value of attribute inspected_files
#
@@ -53994,7 +54585,7 @@ class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct
end
end
-# source://rubocop//lib/rubocop/formatter/html_formatter.rb#13
+# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11
RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String)
# This formatter formats the report data in JSON format.
@@ -54500,52 +55091,52 @@ class RuboCop::Lsp::Routes
# source://rubocop//lib/rubocop/lsp/routes.rb#38
def handle_initialize(request); end
- # source://rubocop//lib/rubocop/lsp/routes.rb#58
+ # source://rubocop//lib/rubocop/lsp/routes.rb#61
def handle_initialized(_request); end
# @api private
#
- # source://rubocop//lib/rubocop/lsp/routes.rb#167
+ # source://rubocop//lib/rubocop/lsp/routes.rb#170
def handle_method_missing(request); end
- # source://rubocop//lib/rubocop/lsp/routes.rb#64
+ # source://rubocop//lib/rubocop/lsp/routes.rb#67
def handle_shutdown(request); end
# @api private
#
- # source://rubocop//lib/rubocop/lsp/routes.rb#156
+ # source://rubocop//lib/rubocop/lsp/routes.rb#159
def handle_unsupported_method(request, method = T.unsafe(nil)); end
private
# @api private
#
- # source://rubocop//lib/rubocop/lsp/routes.rb#205
+ # source://rubocop//lib/rubocop/lsp/routes.rb#208
def diagnostic(file_uri, text); end
# @api private
#
- # source://rubocop//lib/rubocop/lsp/routes.rb#175
+ # source://rubocop//lib/rubocop/lsp/routes.rb#178
def extract_initialization_options_from(request); end
# @api private
#
- # source://rubocop//lib/rubocop/lsp/routes.rb#185
+ # source://rubocop//lib/rubocop/lsp/routes.rb#188
def format_file(file_uri, command: T.unsafe(nil)); end
# @api private
#
- # source://rubocop//lib/rubocop/lsp/routes.rb#219
+ # source://rubocop//lib/rubocop/lsp/routes.rb#222
def remove_file_protocol_from(uri); end
# @api private
#
- # source://rubocop//lib/rubocop/lsp/routes.rb#223
+ # source://rubocop//lib/rubocop/lsp/routes.rb#226
def to_diagnostic(offense); end
# @api private
#
- # source://rubocop//lib/rubocop/lsp/routes.rb#235
+ # source://rubocop//lib/rubocop/lsp/routes.rb#238
def to_range(location); end
class << self
@@ -54893,12 +55484,12 @@ RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash)
class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment
# Match `encoding` or `coding`
#
- # source://rubocop//lib/rubocop/magic_comment.rb#263
+ # source://rubocop//lib/rubocop/magic_comment.rb#265
def encoding; end
# Rewrite the comment without a given token type
#
- # source://rubocop//lib/rubocop/magic_comment.rb#268
+ # source://rubocop//lib/rubocop/magic_comment.rb#270
def without(type); end
private
@@ -54912,22 +55503,25 @@ class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment
#
# @see https://github.com/ruby/ruby/blob/78b95b4/parse.y#L7134-L7138
#
- # source://rubocop//lib/rubocop/magic_comment.rb#285
+ # source://rubocop//lib/rubocop/magic_comment.rb#287
def extract_frozen_string_literal; end
- # source://rubocop//lib/rubocop/magic_comment.rb#289
+ # source://rubocop//lib/rubocop/magic_comment.rb#291
def extract_shareable_constant_value; end
- # source://rubocop//lib/rubocop/magic_comment.rb#293
+ # source://rubocop//lib/rubocop/magic_comment.rb#295
def extract_typed; end
end
+# source://rubocop//lib/rubocop/magic_comment.rb#262
+RuboCop::MagicComment::SimpleComment::FSTRING_LITERAL_COMMENT = T.let(T.unsafe(nil), String)
+
# IRB's pattern for matching magic comment tokens.
#
# @see https://github.com/ruby/ruby/blob/b4a55c1/lib/irb/magic-file.rb#L5
#
# source://rubocop//lib/rubocop/magic_comment.rb#10
-RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), Regexp)
+RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), String)
# Wrapper for Vim style magic comments.
#
@@ -55515,39 +56109,39 @@ RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer)
#
# @api private
#
-# source://rubocop//lib/rubocop/result_cache.rb#12
+# source://rubocop//lib/rubocop/result_cache.rb#11
class RuboCop::ResultCache
# @api private
# @return [ResultCache] a new instance of ResultCache
#
- # source://rubocop//lib/rubocop/result_cache.rb#88
+ # source://rubocop//lib/rubocop/result_cache.rb#87
def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/result_cache.rb#101
+ # source://rubocop//lib/rubocop/result_cache.rb#100
def debug?; end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#109
+ # source://rubocop//lib/rubocop/result_cache.rb#108
def load; end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#86
+ # source://rubocop//lib/rubocop/result_cache.rb#85
def path; end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#114
+ # source://rubocop//lib/rubocop/result_cache.rb#113
def save(offenses); end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/result_cache.rb#105
+ # source://rubocop//lib/rubocop/result_cache.rb#104
def valid?; end
private
@@ -55555,7 +56149,7 @@ class RuboCop::ResultCache
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/result_cache.rb#147
+ # source://rubocop//lib/rubocop/result_cache.rb#146
def any_symlink?(path); end
# We combine team and options into a single "context" checksum to avoid
@@ -55565,17 +56159,17 @@ class RuboCop::ResultCache
#
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#237
+ # source://rubocop//lib/rubocop/result_cache.rb#236
def context_checksum(team, options); end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#190
+ # source://rubocop//lib/rubocop/result_cache.rb#189
def digest(path); end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#158
+ # source://rubocop//lib/rubocop/result_cache.rb#157
def file_checksum(file, config_store); end
# Return a hash of the options given at invocation, minus the ones that have
@@ -55584,25 +56178,25 @@ class RuboCop::ResultCache
#
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#221
+ # source://rubocop//lib/rubocop/result_cache.rb#220
def relevant_options_digest(options); end
# The checksum of the RuboCop program running the inspection.
#
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#175
+ # source://rubocop//lib/rubocop/result_cache.rb#174
def rubocop_checksum; end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#201
+ # source://rubocop//lib/rubocop/result_cache.rb#200
def rubocop_extra_features; end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/result_cache.rb#143
+ # source://rubocop//lib/rubocop/result_cache.rb#142
def symlink_protection_triggered?(path); end
# The external dependency checksums are cached per RuboCop team so that
@@ -55610,19 +56204,19 @@ class RuboCop::ResultCache
#
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#228
+ # source://rubocop//lib/rubocop/result_cache.rb#227
def team_checksum(team); end
class << self
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/result_cache.rb#82
+ # source://rubocop//lib/rubocop/result_cache.rb#81
def allow_symlinks_in_cache_location?(config_store); end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#76
+ # source://rubocop//lib/rubocop/result_cache.rb#75
def cache_root(config_store); end
# Remove old files so that the cache doesn't grow too big. When the
@@ -55634,67 +56228,67 @@ class RuboCop::ResultCache
#
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#29
+ # source://rubocop//lib/rubocop/result_cache.rb#28
def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#171
+ # source://rubocop//lib/rubocop/result_cache.rb#170
def inhibit_cleanup; end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#171
+ # source://rubocop//lib/rubocop/result_cache.rb#170
def inhibit_cleanup=(_arg0); end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#43
+ # source://rubocop//lib/rubocop/result_cache.rb#42
def rubocop_required_features; end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#43
+ # source://rubocop//lib/rubocop/result_cache.rb#42
def rubocop_required_features=(_arg0); end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#171
+ # source://rubocop//lib/rubocop/result_cache.rb#170
def source_checksum; end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#171
+ # source://rubocop//lib/rubocop/result_cache.rb#170
def source_checksum=(_arg0); end
private
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#66
+ # source://rubocop//lib/rubocop/result_cache.rb#65
def remove_files(files, dirs, remove_count); end
# @api private
#
- # source://rubocop//lib/rubocop/result_cache.rb#53
+ # source://rubocop//lib/rubocop/result_cache.rb#52
def remove_oldest_files(files, dirs, cache_root, verbose); end
# @api private
# @return [Boolean]
#
- # source://rubocop//lib/rubocop/result_cache.rb#49
+ # source://rubocop//lib/rubocop/result_cache.rb#48
def requires_file_removal?(file_count, config_store); end
end
end
# @api private
#
-# source://rubocop//lib/rubocop/result_cache.rb#17
+# source://rubocop//lib/rubocop/result_cache.rb#16
RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array)
# @api private
#
-# source://rubocop//lib/rubocop/result_cache.rb#13
+# source://rubocop//lib/rubocop/result_cache.rb#12
RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array)
# This class handles the processing of files, which includes dealing with
diff --git a/sorbet/rbi/gems/stringio@3.1.0.rbi b/sorbet/rbi/gems/stringio@3.1.0.rbi
new file mode 100644
index 00000000..01a26ea5
--- /dev/null
+++ b/sorbet/rbi/gems/stringio@3.1.0.rbi
@@ -0,0 +1,8 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `stringio` gem.
+# Please instead update this file by running `bin/tapioca gem stringio`.
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
diff --git a/sorbet/rbi/gems/syntax_tree@6.1.1.rbi b/sorbet/rbi/gems/syntax_tree@6.1.1.rbi
deleted file mode 100644
index d8f68fe5..00000000
--- a/sorbet/rbi/gems/syntax_tree@6.1.1.rbi
+++ /dev/null
@@ -1,22855 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `syntax_tree` gem.
-# Please instead update this file by running `bin/tapioca gem syntax_tree`.
-
-# Syntax Tree is a suite of tools built on top of the internal CRuby parser. It
-# provides the ability to generate a syntax tree from source, as well as the
-# tools necessary to inspect and manipulate that syntax tree. It can be used to
-# build formatters, linters, language servers, and more.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3
-module SyntaxTree
- class << self
- # Parses the given source and returns the formatted source.
- #
- # source://syntax_tree//lib/syntax_tree.rb#59
- def format(source, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end
-
- # Parses the given file and returns the formatted source.
- #
- # source://syntax_tree//lib/syntax_tree.rb#75
- def format_file(filepath, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end
-
- # Accepts a node in the tree and returns the formatted source.
- #
- # source://syntax_tree//lib/syntax_tree.rb#85
- def format_node(source, node, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end
-
- # Indexes the given source code to return a list of all class, module, and
- # method definitions. Used to quickly provide indexing capability for IDEs or
- # documentation generation.
- #
- # source://syntax_tree//lib/syntax_tree.rb#102
- def index(source); end
-
- # Indexes the given file to return a list of all class, module, and method
- # definitions. Used to quickly provide indexing capability for IDEs or
- # documentation generation.
- #
- # source://syntax_tree//lib/syntax_tree.rb#109
- def index_file(filepath); end
-
- # A convenience method for creating a new mutation visitor.
- #
- # @yield [visitor]
- #
- # source://syntax_tree//lib/syntax_tree.rb#114
- def mutation; end
-
- # Parses the given source and returns the syntax tree.
- #
- # source://syntax_tree//lib/syntax_tree.rb#121
- def parse(source); end
-
- # Parses the given file and returns the syntax tree.
- #
- # source://syntax_tree//lib/syntax_tree.rb#128
- def parse_file(filepath); end
-
- # Returns the source from the given filepath taking into account any potential
- # magic encoding comments.
- #
- # source://syntax_tree//lib/syntax_tree.rb#134
- def read(filepath); end
-
- # This is a hook provided so that plugins can register themselves as the
- # handler for a particular file type.
- #
- # source://syntax_tree//lib/syntax_tree.rb#149
- def register_handler(extension, handler); end
-
- # Searches through the given source using the given pattern and yields each
- # node in the tree that matches the pattern to the given block.
- #
- # source://syntax_tree//lib/syntax_tree.rb#155
- def search(source, query, &block); end
-
- # Searches through the given file using the given pattern and yields each
- # node in the tree that matches the pattern to the given block.
- #
- # source://syntax_tree//lib/syntax_tree.rb#164
- def search_file(filepath, query, &block); end
- end
-end
-
-# ARef represents when you're pulling a value out of a collection at a
-# specific index. Put another way, it's any time you're calling the method
-# #[].
-#
-# collection[index]
-#
-# The nodes usually contains two children, the collection and the index. In
-# some cases, you don't necessarily have the second child node, because you
-# can call procs with a pretty esoteric syntax. In the following example, you
-# wouldn't have a second child node:
-#
-# collection[]
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#567
-class SyntaxTree::ARef < ::SyntaxTree::Node
- # @return [ARef] a new instance of ARef
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#577
- def initialize(collection:, index:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#632
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#584
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#588
- def child_nodes; end
-
- # [Node] the value being indexed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#569
- def collection; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#575
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#592
- def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#588
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#606
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#615
- def format(q); end
-
- # [nil | Args] the value being passed within the brackets
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#572
- def index; end
-end
-
-# ARefField represents assigning values into collections at specific indices.
-# Put another way, it's any time you're calling the method #[]=. The
-# ARefField node itself is just the left side of the assignment, and they're
-# always wrapped in assign nodes.
-#
-# collection[index] = value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#645
-class SyntaxTree::ARefField < ::SyntaxTree::Node
- # @return [ARefField] a new instance of ARefField
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#655
- def initialize(collection:, index:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#710
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#662
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#666
- def child_nodes; end
-
- # [Node] the value being indexed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#647
- def collection; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#653
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#670
- def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#666
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#684
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#693
- def format(q); end
-
- # [nil | Args] the value being passed within the brackets
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#650
- def index; end
-end
-
-# Alias represents the use of the +alias+ keyword with regular arguments (not
-# global variables). The +alias+ keyword is used to make a method respond to
-# another name as well as the current one.
-#
-# alias aliased_name name
-#
-# For the example above, in the current context you can now call aliased_name
-# and it will execute the name method. When you're aliasing two methods, you
-# can either provide bare words (like the example above) or you can provide
-# symbols (note that this includes dynamic symbols like
-# :"left-#{middle}-right").
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#458
-class SyntaxTree::AliasNode < ::SyntaxTree::Node
- # @return [AliasNode] a new instance of AliasNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#496
- def initialize(left:, right:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#545
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#503
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#507
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#494
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#511
- def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#507
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#525
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#529
- def format(q); end
-
- # [DynaSymbol | GVar | SymbolLiteral] the new name of the method
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#488
- def left; end
-
- # [Backref | DynaSymbol | GVar | SymbolLiteral] the old name of the method
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#491
- def right; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#549
- def var_alias?; end
-end
-
-# Formats an argument to the alias keyword. For symbol literals it uses the
-# value of the symbol directly to look like bare words.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#461
-class SyntaxTree::AliasNode::AliasArgumentFormatter
- # @return [AliasArgumentFormatter] a new instance of AliasArgumentFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#466
- def initialize(argument); end
-
- # [Backref | DynaSymbol | GVar | SymbolLiteral] the argument being passed
- # to alias
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#464
- def argument; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#470
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#478
- def format(q); end
-end
-
-# ArgBlock represents using a block operator on an expression.
-#
-# method(&expression)
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#887
-class SyntaxTree::ArgBlock < ::SyntaxTree::Node
- # @return [ArgBlock] a new instance of ArgBlock
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#894
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#930
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#900
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#904
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#892
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#908
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#904
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#921
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#925
- def format(q); end
-
- # [nil | Node] the expression being turned into a block
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#889
- def value; end
-end
-
-# ArgParen represents wrapping arguments to a method inside a set of
-# parentheses.
-#
-# method(argument)
-#
-# In the example above, there would be an ArgParen node around the Args node
-# that represents the set of arguments being sent to the method method. The
-# argument child node can be +nil+ if no arguments were passed, as in:
-#
-# method()
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#727
-class SyntaxTree::ArgParen < ::SyntaxTree::Node
- # @return [ArgParen] a new instance of ArgParen
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#735
- def initialize(arguments:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#784
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#741
- def accept(visitor); end
-
- # [nil | Args | ArgsForward] the arguments inside the
- # parentheses
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#730
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#788
- def arity; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#745
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#733
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#749
- def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#745
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#762
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#766
- def format(q); end
-
- private
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#794
- def trailing_comma?; end
-end
-
-# Star represents using a splat operator on an expression.
-#
-# method(*arguments)
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#939
-class SyntaxTree::ArgStar < ::SyntaxTree::Node
- # @return [ArgStar] a new instance of ArgStar
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#946
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#982
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#952
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#956
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#944
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#960
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#956
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#973
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#977
- def format(q); end
-
- # [nil | Node] the expression being splatted
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#941
- def value; end
-end
-
-# Args represents a list of arguments being passed to a method call or array
-# literal.
-#
-# method(first, second, third)
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#821
-class SyntaxTree::Args < ::SyntaxTree::Node
- # @return [Args] a new instance of Args
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#828
- def initialize(parts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#863
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#834
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#867
- def arity; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#838
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#826
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#842
- def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#838
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#855
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#859
- def format(q); end
-
- # [Array[ Node ]] the arguments that this node wraps
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#823
- def parts; end
-end
-
-# ArgsForward represents forwarding all kinds of arguments onto another method
-# call.
-#
-# def request(method, path, **headers, &block); end
-#
-# def get(...)
-# request(:GET, ...)
-# end
-#
-# def post(...)
-# request(:POST, ...)
-# end
-#
-# In the example above, both the get and post methods are forwarding all of
-# their arguments (positional, keyword, and block) on to the request method.
-# The ArgsForward node appears in both the caller (the request method calls)
-# and the callee (the get and post definitions).
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1004
-class SyntaxTree::ArgsForward < ::SyntaxTree::Node
- # @return [ArgsForward] a new instance of ArgsForward
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1008
- def initialize(location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1038
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1013
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1042
- def arity; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1017
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1006
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1021
- def copy(location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1017
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1030
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1034
- def format(q); end
-end
-
-# ArrayLiteral represents an array literal, which can optionally contain
-# elements.
-#
-# []
-# [one, two, three]
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1053
-class SyntaxTree::ArrayLiteral < ::SyntaxTree::Node
- # @return [ArrayLiteral] a new instance of ArrayLiteral
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1153
- def initialize(lbracket:, contents:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1229
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1160
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1164
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1151
- def comments; end
-
- # [nil | Args] the contents of the array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1148
- def contents; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1168
- def copy(lbracket: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1164
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1182
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1191
- def format(q); end
-
- # [nil | LBracket | QSymbolsBeg | QWordsBeg | SymbolsBeg | WordsBeg] the
- # bracket that opens this array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1145
- def lbracket; end
-
- private
-
- # If we have an empty array that contains only comments, then we're going
- # to do some special printing to ensure they get indented correctly.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1259
- def empty_with_comments?; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1251
- def qsymbols?; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1236
- def qwords?; end
-end
-
-# source://syntax_tree//lib/syntax_tree/node.rb#1063
-SyntaxTree::ArrayLiteral::BREAKABLE_SPACE_SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::ArrayLiteral::BreakableSpaceSeparator)
-
-# It's very common to use seplist with ->(q) { q.breakable_space }. We wrap
-# that pattern into an object to cut down on having to create a bunch of
-# lambdas all over the place.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1057
-class SyntaxTree::ArrayLiteral::BreakableSpaceSeparator
- # source://syntax_tree//lib/syntax_tree/node.rb#1058
- def call(q); end
-end
-
-# This is a special formatter used if the array literal contains no values
-# but _does_ contain comments. In this case we do some special formatting to
-# make sure the comments gets indented properly.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1120
-class SyntaxTree::ArrayLiteral::EmptyWithCommentsFormatter
- # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1124
- def initialize(lbracket); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1128
- def format(q); end
-
- # [LBracket] the opening bracket
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1122
- def lbracket; end
-end
-
-# Formats an array of multiple simple symbol literals into the %i syntax.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1094
-class SyntaxTree::ArrayLiteral::QSymbolsFormatter
- # @return [QSymbolsFormatter] a new instance of QSymbolsFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1098
- def initialize(contents); end
-
- # [Args] the contents of the array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1096
- def contents; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1102
- def format(q); end
-end
-
-# Formats an array of multiple simple string literals into the %w syntax.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1066
-class SyntaxTree::ArrayLiteral::QWordsFormatter
- # @return [QWordsFormatter] a new instance of QWordsFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1070
- def initialize(contents); end
-
- # [Args] the contents of the array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1068
- def contents; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1074
- def format(q); end
-end
-
-# When we're implementing the === operator for a node, we oftentimes need to
-# compare two arrays. We want to skip over the === definition of array and use
-# our own here, so we do that using this module.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#157
-module SyntaxTree::ArrayMatch
- class << self
- # source://syntax_tree//lib/syntax_tree/node.rb#158
- def call(left, right); end
- end
-end
-
-# AryPtn represents matching against an array pattern using the Ruby 2.7+
-# pattern matching syntax. It’s one of the more complicated nodes, because
-# the four parameters that it accepts can almost all be nil.
-#
-# case [1, 2, 3]
-# in [Integer, Integer]
-# "matched"
-# in Container[Integer, Integer]
-# "matched"
-# in [Integer, *, Integer]
-# "matched"
-# end
-#
-# An AryPtn node is created with four parameters: an optional constant
-# wrapper, an array of positional matches, an optional splat with identifier,
-# and an optional array of positional matches that occur after the splat.
-# All of the in clauses above would create an AryPtn node.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1282
-class SyntaxTree::AryPtn < ::SyntaxTree::Node
- # @return [AryPtn] a new instance of AryPtn
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1320
- def initialize(constant:, requireds:, rest:, posts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1388
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1329
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1333
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1318
- def comments; end
-
- # [nil | VarRef] the optional constant wrapper
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1303
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1337
- def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1333
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1359
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1370
- def format(q); end
-
- # [Array[ Node ]] the list of positional arguments occurring after the
- # optional star if there is one
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1315
- def posts; end
-
- # [Array[ Node ]] the regular positional arguments that this array
- # pattern is matching against
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1307
- def requireds; end
-
- # [nil | VarField] the optional starred identifier that grabs up a list of
- # positional arguments
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1311
- def rest; end
-end
-
-# Formats the optional splat of an array pattern.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1284
-class SyntaxTree::AryPtn::RestFormatter
- # @return [RestFormatter] a new instance of RestFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1288
- def initialize(value); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1292
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1296
- def format(q); end
-
- # [VarField] the identifier that represents the remaining positionals
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1286
- def value; end
-end
-
-# Assign represents assigning something to a variable or constant. Generally,
-# the left side of the assignment is going to be any node that ends with the
-# name "Field".
-#
-# variable = value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1418
-class SyntaxTree::Assign < ::SyntaxTree::Node
- # @return [Assign] a new instance of Assign
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1429
- def initialize(target:, value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1479
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1436
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1440
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1427
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1444
- def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1440
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1458
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1462
- def format(q); end
-
- # [ARefField | ConstPathField | Field | TopConstField | VarField] the target
- # to assign the result of the expression to
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1421
- def target; end
-
- # [Node] the expression to be assigned
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1424
- def value; end
-
- private
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1485
- def skip_indent?; end
-end
-
-# Determins if the following value should be indented or not.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1396
-module SyntaxTree::AssignFormatting
- class << self
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1397
- def skip_indent?(value); end
- end
-end
-
-# Assoc represents a key-value pair within a hash. It is a child node of
-# either an AssocListFromArgs or a BareAssocHash.
-#
-# { key1: value1, key2: value2 }
-#
-# In the above example, the would be two Assoc nodes.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1497
-class SyntaxTree::Assoc < ::SyntaxTree::Node
- # @return [Assoc] a new instance of Assoc
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1507
- def initialize(key:, value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1548
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1514
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1518
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1505
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1522
- def copy(key: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1518
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1536
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1540
- def format(q); end
-
- # [Node] the key of this pair
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1499
- def key; end
-
- # [nil | Node] the value of this pair
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1502
- def value; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1554
- def format_contents(q); end
-end
-
-# AssocSplat represents double-splatting a value into a hash (either a hash
-# literal or a bare hash in a method call).
-#
-# { **pairs }
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1575
-class SyntaxTree::AssocSplat < ::SyntaxTree::Node
- # @return [AssocSplat] a new instance of AssocSplat
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1582
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1618
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1588
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1592
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1580
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1596
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1592
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1609
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1613
- def format(q); end
-
- # [nil | Node] the expression that is being splatted
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1577
- def value; end
-end
-
-# BEGINBlock represents the use of the +BEGIN+ keyword, which hooks into the
-# lifecycle of the interpreter. Whatever is inside the block will get executed
-# when the program starts.
-#
-# BEGIN {
-# }
-#
-# Interestingly, the BEGIN keyword doesn't allow the do and end keywords for
-# the block. Only braces are permitted.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#175
-class SyntaxTree::BEGINBlock < ::SyntaxTree::Node
- # @return [BEGINBlock] a new instance of BEGINBlock
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#185
- def initialize(lbrace:, statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#236
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#192
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#196
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#183
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#200
- def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#196
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#214
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#223
- def format(q); end
-
- # [LBrace] the left brace that is seen after the keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#177
- def lbrace; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#180
- def statements; end
-end
-
-# Backref represents a global variable referencing a matched value. It comes
-# in the form of a $ followed by a positive integer.
-#
-# $1
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1628
-class SyntaxTree::Backref < ::SyntaxTree::Node
- # @return [Backref] a new instance of Backref
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1635
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1670
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1641
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1645
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1633
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1649
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1645
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1662
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1666
- def format(q); end
-
- # [String] the name of the global backreference variable
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1630
- def value; end
-end
-
-# Backtick represents the use of the ` operator. It's usually found being used
-# for an XStringLiteral, but could also be found as the name of a method being
-# defined.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1678
-class SyntaxTree::Backtick < ::SyntaxTree::Node
- # @return [Backtick] a new instance of Backtick
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1685
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1720
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1691
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1695
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1683
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1699
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1695
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1712
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1716
- def format(q); end
-
- # [String] the backtick in the string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1680
- def value; end
-end
-
-# BareAssocHash represents a hash of contents being passed as a method
-# argument (and therefore has omitted braces). It's very similar to an
-# AssocListFromArgs node.
-#
-# method(key1: value1, key2: value2)
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1834
-class SyntaxTree::BareAssocHash < ::SyntaxTree::Node
- # @return [BareAssocHash] a new instance of BareAssocHash
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1841
- def initialize(assocs:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1876
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1847
- def accept(visitor); end
-
- # [Array[ Assoc | AssocSplat ]]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1836
- def assocs; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1851
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1839
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1855
- def copy(assocs: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1851
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1868
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1872
- def format(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1880
- def format_key(q, key); end
-end
-
-# BasicVisitor is the parent class of the Visitor class that provides the
-# ability to walk down the tree. It does not define any handlers, so you
-# should extend this class if you want your visitor to raise an error if you
-# attempt to visit a node that you don't handle.
-#
-# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#8
-class SyntaxTree::BasicVisitor
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#105
- def visit(node); end
-
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#109
- def visit_all(nodes); end
-
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_child_nodes(node); end
-
- class << self
- # This is the list of all of the valid visit methods.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#72
- def valid_visit_methods; end
-
- # This method is here to help folks write visitors.
- #
- # It's not always easy to ensure you're writing the correct method name in
- # the visitor since it's perfectly valid to define methods that don't
- # override these parent methods.
- #
- # If you use this method, you can ensure you're writing the correct method
- # name. It will raise an error if the visit method you're defining isn't
- # actually a method on the parent visitor.
- #
- # @raise [VisitMethodError]
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#86
- def visit_method(method_name); end
-
- # This method is here to help folks write visitors.
- #
- # Within the given block, every method that is defined will be checked to
- # ensure it's a valid visit method using the BasicVisitor::visit_method
- # method defined above.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#97
- def visit_methods; end
- end
-end
-
-# This class is used by DidYouMean to offer corrections to invalid visit
-# method names.
-#
-# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#22
-class SyntaxTree::BasicVisitor::VisitMethodChecker
- # @return [VisitMethodChecker] a new instance of VisitMethodChecker
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#25
- def initialize(error); end
-
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#29
- def corrections; end
-
- # Returns the value of attribute visit_method.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#23
- def visit_method; end
-end
-
-# This is raised when you use the Visitor.visit_method method and it fails.
-# It is correctable to through DidYouMean.
-#
-# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#11
-class SyntaxTree::BasicVisitor::VisitMethodError < ::StandardError
- include ::DidYouMean::Correctable
-
- # @return [VisitMethodError] a new instance of VisitMethodError
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#14
- def initialize(visit_method); end
-
- # Returns the value of attribute visit_method.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#12
- def visit_method; end
-end
-
-# This module is responsible for checking all of the methods defined within
-# a given block to ensure that they are valid visit methods.
-#
-# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#45
-class SyntaxTree::BasicVisitor::VisitMethodsChecker < ::Module
- # @return [VisitMethodsChecker] a new instance of VisitMethodsChecker
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#53
- def initialize; end
-
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#65
- def disable!; end
-
- # This is the status of the checker. It's used to determine whether or not
- # we should be checking the methods that are defined. It is kept as an
- # instance variable so that it can be disabled later.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#51
- def status; end
-end
-
-# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#46
-class SyntaxTree::BasicVisitor::VisitMethodsChecker::Status < ::Struct
- # Returns the value of attribute checking
- #
- # @return [Object] the current value of checking
- def checking; end
-
- # Sets the attribute checking
- #
- # @param value [Object] the value to set the attribute checking to.
- # @return [Object] the newly set value
- def checking=(_); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# Begin represents a begin..end chain.
-#
-# begin
-# value
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1899
-class SyntaxTree::Begin < ::SyntaxTree::Node
- # @return [Begin] a new instance of Begin
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1906
- def initialize(bodystmt:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1951
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1912
- def accept(visitor); end
-
- # [BodyStmt] the bodystmt that contains the contents of this begin block
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1901
- def bodystmt; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1916
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1904
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1920
- def copy(bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1916
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1933
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1937
- def format(q); end
-end
-
-# Binary represents any expression that involves two sub-expressions with an
-# operator in between. This can be something that looks like a mathematical
-# operation:
-#
-# 1 + 1
-#
-# but can also be something like pushing a value onto an array:
-#
-# array << value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2029
-class SyntaxTree::Binary < ::SyntaxTree::Node
- # @return [Binary] a new instance of Binary
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2056
- def initialize(left:, operator:, right:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2128
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2064
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2068
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2054
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2072
- def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2068
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2087
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2097
- def format(q); end
-
- # [Node] the left-hand side of the expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2045
- def left; end
-
- # [Symbol] the operator used between the two expressions
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2048
- def operator; end
-
- # [Node] the right-hand side of the expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2051
- def right; end
-end
-
-# BlockArg represents declaring a block parameter on a method definition.
-#
-# def method(&block); end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2227
-class SyntaxTree::BlockArg < ::SyntaxTree::Node
- # @return [BlockArg] a new instance of BlockArg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2234
- def initialize(name:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2270
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2240
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2244
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2232
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2248
- def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2244
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2261
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2265
- def format(q); end
-
- # [nil | Ident] the name of the block argument
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2229
- def name; end
-end
-
-# Block represents passing a block to a method call using the +do+ and +end+
-# keywords or the +{+ and +}+ operators.
-#
-# method do |value|
-# end
-#
-# method { |value| }
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4309
-class SyntaxTree::BlockNode < ::SyntaxTree::Node
- # @return [BlockNode] a new instance of BlockNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4344
- def initialize(opening:, block_var:, bodystmt:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4417
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4352
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4426
- def arity; end
-
- # [nil | BlockVar] the optional variable declaration within this block
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4336
- def block_var; end
-
- # [BodyStmt | Statements] the expressions to be executed within this block
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4339
- def bodystmt; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4356
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4342
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4360
- def copy(opening: T.unsafe(nil), block_var: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4356
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4375
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4385
- def format(q); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4422
- def keywords?; end
-
- # [LBrace | Kw] the left brace or the do keyword that opens this block
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4333
- def opening; end
-
- private
-
- # If we're the predicate of a loop or conditional, then we're going to have
- # to go with the {..} bounds.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4468
- def forced_brace_bounds?(q); end
-
- # If we're a sibling of a control-flow keyword, then we're going to have to
- # use the do..end bounds.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4457
- def forced_do_end_bounds?(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4484
- def format_break(q, break_opening, break_closing); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4504
- def format_flat(q, flat_opening, flat_closing); end
-
- # If this is nested anywhere inside certain nodes, then we can't change
- # which operators/keywords we're using for the bounds of the block.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4439
- def unchangeable_bounds?(q); end
-end
-
-# Formats the opening brace or keyword of a block.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4311
-class SyntaxTree::BlockNode::BlockOpenFormatter
- # @return [BlockOpenFormatter] a new instance of BlockOpenFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4318
- def initialize(text, node); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4323
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4327
- def format(q); end
-
- # [LBrace | Keyword] the node that is being represented
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4316
- def node; end
-
- # [String] the actual output that should be printed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4313
- def text; end
-end
-
-# BlockVar represents the parameters being declared for a block. Effectively
-# this node is everything contained within the pipes. This includes all of the
-# various parameter types, as well as block-local variable declarations.
-#
-# method do |positional, optional = value, keyword:, █ local|
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2141
-class SyntaxTree::BlockVar < ::SyntaxTree::Node
- # @return [BlockVar] a new instance of BlockVar
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2151
- def initialize(params:, locals:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2209
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2158
- def accept(visitor); end
-
- # When a single required parameter is declared for a block, it gets
- # automatically expanded if the values being yielded into it are an array.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2216
- def arg0?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2162
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2149
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2166
- def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2162
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2180
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2196
- def format(q); end
-
- # [Array[ Ident ]] the list of block-local variable declarations
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2146
- def locals; end
-
- # [Params] the parameters being declared with the block
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2143
- def params; end
-end
-
-# We'll keep a single instance of this separator around for all block vars
-# to cut down on allocations.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2194
-SyntaxTree::BlockVar::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::BlockVar::Separator)
-
-# Within the pipes of the block declaration, we don't want any spaces. So
-# we'll separate the parameters with a comma and space but no breakables.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2186
-class SyntaxTree::BlockVar::Separator
- # source://syntax_tree//lib/syntax_tree/node.rb#2187
- def call(q); end
-end
-
-# bodystmt can't actually determine its bounds appropriately because it
-# doesn't necessarily know where it started. So the parent node needs to
-# report back down into this one where it goes.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2278
-class SyntaxTree::BodyStmt < ::SyntaxTree::Node
- # @return [BodyStmt] a new instance of BodyStmt
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2297
- def initialize(statements:, rescue_clause:, else_keyword:, else_clause:, ensure_clause:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2428
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2352
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2314
- def bind(parser, start_char, start_column, end_char, end_column); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2356
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2295
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2360
- def copy(statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_keyword: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2356
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2384
- def deconstruct_keys(_keys); end
-
- # [nil | Statements] the optional set of statements inside the else clause
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2289
- def else_clause; end
-
- # [nil | Kw] the optional else keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2286
- def else_keyword; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2348
- def empty?; end
-
- # [nil | Ensure] the optional ensure clause
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2292
- def ensure_clause; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2396
- def format(q); end
-
- # [nil | Rescue] the optional rescue chain attached to the begin clause
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2283
- def rescue_clause; end
-
- # [Statements] the list of statements inside the begin clause
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2280
- def statements; end
-end
-
-# Break represents using the +break+ keyword.
-#
-# break
-#
-# It can also optionally accept arguments, as in:
-#
-# break 1
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2634
-class SyntaxTree::Break < ::SyntaxTree::Node
- # @return [Break] a new instance of Break
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2641
- def initialize(arguments:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2676
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2647
- def accept(visitor); end
-
- # [Args] the arguments being sent to the keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2636
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2651
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2639
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2655
- def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2651
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2668
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2672
- def format(q); end
-end
-
-# CHAR irepresents a single codepoint in the script encoding.
-#
-# ?a
-#
-# In the example above, the CHAR node represents the string literal "a". You
-# can use control characters with this as well, as in ?\C-a.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#248
-class SyntaxTree::CHAR < ::SyntaxTree::Node
- # @return [CHAR] a new instance of CHAR
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#255
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#296
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#261
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#265
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#253
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#269
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#265
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#282
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#286
- def format(q); end
-
- # [String] the value of the character literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#250
- def value; end
-end
-
-# CVar represents the use of a class variable.
-#
-# @@variable
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4043
-class SyntaxTree::CVar < ::SyntaxTree::Node
- # @return [CVar] a new instance of CVar
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4050
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4085
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4056
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4060
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4048
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4064
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4060
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4077
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4081
- def format(q); end
-
- # [String] the name of the class variable
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4045
- def value; end
-end
-
-# This is probably the most complicated formatter in this file. It's
-# responsible for formatting chains of method calls, with or without arguments
-# or blocks. In general, we want to go from something like
-#
-# foo.bar.baz
-#
-# to
-#
-# foo
-# .bar
-# .baz
-#
-# Of course there are a lot of caveats to that, including trailing operators
-# when necessary, where comments are places, how blocks are aligned, etc.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2721
-class SyntaxTree::CallChainFormatter
- # @return [CallChainFormatter] a new instance of CallChainFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2725
- def initialize(node); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2729
- def format(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2795
- def format_chain(q, children); end
-
- # [CallNode | MethodAddBlock] the top of the call chain
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2723
- def node; end
-
- private
-
- # For certain nodes, we want to attach directly to the end and don't
- # want to indent the first call. So we'll pop off the first children and
- # format it separately here.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2895
- def attach_directly?(node); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2905
- def format_child(q, child, skip_comments: T.unsafe(nil), skip_operator: T.unsafe(nil), skip_attached: T.unsafe(nil)); end
-
- class << self
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2876
- def chained?(node); end
- end
-end
-
-# CallNode represents a method call.
-#
-# receiver.message
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2943
-class SyntaxTree::CallNode < ::SyntaxTree::Node
- # @return [CallNode] a new instance of CallNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2959
- def initialize(receiver:, operator:, message:, arguments:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3054
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2968
- def accept(visitor); end
-
- # [nil | ArgParen | Args] the arguments to the method call
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2954
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3100
- def arity; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2972
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2957
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2981
- def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2972
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3003
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3014
- def format(q); end
-
- # Print out the arguments to this call. If there are no arguments, then do
- # nothing.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3062
- def format_arguments(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3072
- def format_contents(q); end
-
- # [:call | Backtick | Const | Ident | Op] the message being sent
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2951
- def message; end
-
- # [nil | :"::" | Op | Period] the operator being used to send the message
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2948
- def operator; end
-
- # [nil | Node] the receiver of the method call
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2945
- def receiver; end
-end
-
-# Wraps a call operator (which can be a string literal :: or an Op node or a
-# Period node) and formats it when called.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2683
-class SyntaxTree::CallOperatorFormatter
- # @return [CallOperatorFormatter] a new instance of CallOperatorFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2687
- def initialize(operator); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2691
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2695
- def format(q); end
-
- # [:"::" | Op | Period] the operator being formatted
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2685
- def operator; end
-end
-
-# Case represents the beginning of a case chain.
-#
-# case value
-# when 1
-# "one"
-# when 2
-# "two"
-# else
-# "number"
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3116
-class SyntaxTree::Case < ::SyntaxTree::Node
- # @return [Case] a new instance of Case
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3129
- def initialize(keyword:, value:, consequent:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3187
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3137
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3141
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3127
- def comments; end
-
- # [In | When] the next clause in the chain
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3124
- def consequent; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3145
- def copy(keyword: T.unsafe(nil), value: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3141
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3160
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3170
- def format(q); end
-
- # [Kw] the keyword that opens this expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3118
- def keyword; end
-
- # [nil | Node] optional value being switched on
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3121
- def value; end
-end
-
-# Class represents defining a class using the +class+ keyword.
-#
-# class Container
-# end
-#
-# Classes can have path names as their class name in case it's being nested
-# under a namespace, as in:
-#
-# class Namespace::Container
-# end
-#
-# Classes can also be defined as a top-level path, in the case that it's
-# already in a namespace but you want to define it at the top-level instead,
-# as in:
-#
-# module OtherNamespace
-# class ::Namespace::Container
-# end
-# end
-#
-# All of these declarations can also have an optional superclass reference, as
-# in:
-#
-# class Child < Parent
-# end
-#
-# That superclass can actually be any Ruby expression, it doesn't necessarily
-# need to be a constant, as in:
-#
-# class Child < method
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3312
-class SyntaxTree::ClassDeclaration < ::SyntaxTree::Node
- # @return [ClassDeclaration] a new instance of ClassDeclaration
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3326
- def initialize(constant:, superclass:, bodystmt:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3389
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3334
- def accept(visitor); end
-
- # [BodyStmt] the expressions to execute within the context of the class
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3321
- def bodystmt; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3338
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3324
- def comments; end
-
- # [ConstPathRef | ConstRef | TopConstRef] the name of the class being
- # defined
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3315
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3342
- def copy(constant: T.unsafe(nil), superclass: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3338
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3357
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3367
- def format(q); end
-
- # [nil | Node] the optional superclass declaration
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3318
- def superclass; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3396
- def format_declaration(q); end
-end
-
-# Comma represents the use of the , operator.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3410
-class SyntaxTree::Comma < ::SyntaxTree::Node
- # @return [Comma] a new instance of Comma
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3414
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3437
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3419
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3423
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3427
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3423
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3433
- def deconstruct_keys(_keys); end
-
- # [String] the comma in the string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3412
- def value; end
-end
-
-# Command represents a method call with arguments and no parentheses. Note
-# that Command nodes only happen when there is no explicit receiver for this
-# method.
-#
-# method argument
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3448
-class SyntaxTree::Command < ::SyntaxTree::Node
- # @return [Command] a new instance of Command
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3461
- def initialize(message:, arguments:, block:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3511
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3469
- def accept(visitor); end
-
- # [Args] the arguments being sent with the message
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3453
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3516
- def arity; end
-
- # [nil | BlockNode] the optional block being passed to the method
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3456
- def block; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3473
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3459
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3477
- def copy(message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3473
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3492
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3502
- def format(q); end
-
- # [Const | Ident] the message being sent to the implicit receiver
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3450
- def message; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3522
- def align(q, node, &block); end
-end
-
-# CommandCall represents a method call on an object with arguments and no
-# parentheses.
-#
-# object.method argument
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3560
-class SyntaxTree::CommandCall < ::SyntaxTree::Node
- # @return [CommandCall] a new instance of CommandCall
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3579
- def initialize(receiver:, operator:, message:, arguments:, block:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3683
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3596
- def accept(visitor); end
-
- # [nil | Args | ArgParen] the arguments going along with the message
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3571
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3689
- def arity; end
-
- # [nil | BlockNode] the block associated with this method call
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3574
- def block; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3600
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3577
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3604
- def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3600
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3628
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3640
- def format(q); end
-
- # [:call | Const | Ident | Op] the message being send
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3568
- def message; end
-
- # [nil | :"::" | Op | Period] the operator used to send the message
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3565
- def operator; end
-
- # [nil | Node] the receiver of the message
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3562
- def receiver; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3695
- def argument_alignment(q, doc); end
-end
-
-# Comment represents a comment in the source.
-#
-# # comment
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3722
-class SyntaxTree::Comment < ::SyntaxTree::Node
- # @return [Comment] a new instance of Comment
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3731
- def initialize(value:, inline:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3790
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3764
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3768
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3760
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3772
- def copy(value: T.unsafe(nil), inline: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3768
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3782
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3786
- def format(q); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3756
- def ignore?; end
-
- # [boolean] whether or not there is code on the same line as this comment.
- # If there is, then inline will be true.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3728
- def inline; end
-
- # [boolean] whether or not there is code on the same line as this comment.
- # If there is, then inline will be true.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3728
- def inline?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3740
- def leading!; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3744
- def leading?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3748
- def trailing!; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3752
- def trailing?; end
-
- # [String] the contents of the comment
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3724
- def value; end
-end
-
-# Formats an If or Unless node.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6314
-class SyntaxTree::ConditionalFormatter
- # @return [ConditionalFormatter] a new instance of ConditionalFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6321
- def initialize(keyword, node); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6326
- def format(q); end
-
- # [String] the keyword associated with this conditional
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6316
- def keyword; end
-
- # [If | Unless] the node that is being formatted
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6319
- def node; end
-
- private
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6450
- def contains_conditional?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6385
- def format_break(q, force:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6377
- def format_flat(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6405
- def format_ternary(q); end
-end
-
-# Const represents a literal value that _looks_ like a constant. This could
-# actually be a reference to a constant:
-#
-# Constant
-#
-# It could also be something that looks like a constant in another context, as
-# in a method call to a capitalized method:
-#
-# object.Constant
-#
-# or a symbol that starts with a capital letter:
-#
-# :Constant
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3809
-class SyntaxTree::Const < ::SyntaxTree::Node
- # @return [Const] a new instance of Const
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3816
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3851
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3822
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3826
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3814
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3830
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3826
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3843
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3847
- def format(q); end
-
- # [String] the name of the constant
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3811
- def value; end
-end
-
-# ConstPathField represents the child node of some kind of assignment. It
-# represents when you're assigning to a constant that is being referenced as
-# a child of another variable.
-#
-# object::Const = value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3862
-class SyntaxTree::ConstPathField < ::SyntaxTree::Node
- # @return [ConstPathField] a new instance of ConstPathField
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3872
- def initialize(parent:, constant:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3916
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3879
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3883
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3870
- def comments; end
-
- # [Const] the constant itself
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3867
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3887
- def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3883
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3901
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3910
- def format(q); end
-
- # [Node] the source of the constant
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3864
- def parent; end
-end
-
-# ConstPathRef represents referencing a constant by a path.
-#
-# object::Const
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3926
-class SyntaxTree::ConstPathRef < ::SyntaxTree::Node
- # @return [ConstPathRef] a new instance of ConstPathRef
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3936
- def initialize(parent:, constant:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3980
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3943
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3947
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3934
- def comments; end
-
- # [Const] the constant itself
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3931
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3951
- def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3947
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3965
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3974
- def format(q); end
-
- # [Node] the source of the constant
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3928
- def parent; end
-end
-
-# ConstRef represents the name of the constant being used in a class or module
-# declaration.
-#
-# class Container
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3992
-class SyntaxTree::ConstRef < ::SyntaxTree::Node
- # @return [ConstRef] a new instance of ConstRef
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3999
- def initialize(constant:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4034
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4005
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4009
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3997
- def comments; end
-
- # [Const] the constant itself
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3994
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4013
- def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4009
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4026
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4030
- def format(q); end
-end
-
-# If the predicate of a conditional or loop contains an assignment (in which
-# case we can't know for certain that that assignment doesn't impact the
-# statements inside the conditional) then we can't use the modifier form
-# and we must use the block form.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6229
-module SyntaxTree::ContainsAssignment
- class << self
- # source://syntax_tree//lib/syntax_tree/node.rb#6230
- def call(parent); end
- end
-end
-
-# The default indentation level for formatting. We allow changing this so
-# that Syntax Tree can format arbitrary parts of a document.
-#
-# source://syntax_tree//lib/syntax_tree.rb#56
-SyntaxTree::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer)
-
-# This is the default print width when formatting. It can be overridden in the
-# CLI by passing the --print-width option or here in the API by passing the
-# optional second argument to ::format.
-#
-# source://syntax_tree//lib/syntax_tree.rb#48
-SyntaxTree::DEFAULT_PRINT_WIDTH = T.let(T.unsafe(nil), Integer)
-
-# This is the default ruby version that we're going to target for formatting.
-# It shouldn't really be changed except in very niche circumstances.
-#
-# source://syntax_tree//lib/syntax_tree.rb#52
-SyntaxTree::DEFAULT_RUBY_VERSION = T.let(T.unsafe(nil), SyntaxTree::Formatter::SemanticVersion)
-
-# This module provides shortcuts for creating AST nodes.
-#
-# source://syntax_tree//lib/syntax_tree/dsl.rb#5
-module SyntaxTree::DSL
- # Create a new ARef node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#40
- def ARef(collection, index); end
-
- # Create a new ARefField node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#45
- def ARefField(collection, index); end
-
- # Create a new AliasNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#35
- def AliasNode(left, right); end
-
- # Create a new ArgBlock node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#64
- def ArgBlock(value); end
-
- # Create a new ArgParen node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#54
- def ArgParen(arguments); end
-
- # Create a new ArgStar node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#69
- def ArgStar(value); end
-
- # Create a new Args node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#59
- def Args(parts); end
-
- # Create a new ArgsForward node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#74
- def ArgsForward; end
-
- # Create a new ArrayLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#79
- def ArrayLiteral(lbracket, contents); end
-
- # Create a new AryPtn node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#88
- def AryPtn(constant, requireds, rest, posts); end
-
- # Create a new Assign node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#99
- def Assign(target, value); end
-
- # Create a new Assoc node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#104
- def Assoc(key, value); end
-
- # Create a new AssocSplat node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#109
- def AssocSplat(value); end
-
- # Create a new BEGINBlock node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#7
- def BEGINBlock(lbrace, statements); end
-
- # Create a new Backref node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#114
- def Backref(value); end
-
- # Create a new Backtick node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#119
- def Backtick(value); end
-
- # Create a new BareAssocHash node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#124
- def BareAssocHash(assocs); end
-
- # Create a new Begin node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#129
- def Begin(bodystmt); end
-
- # Create a new Binary node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#139
- def Binary(left, operator, right); end
-
- # Create a new BlockArg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#154
- def BlockArg(name); end
-
- # Create a new BlockNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#317
- def BlockNode(opening, block_var, bodystmt); end
-
- # Create a new BlockVar node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#149
- def BlockVar(params, locals); end
-
- # Create a new BodyStmt node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#159
- def BodyStmt(statements, rescue_clause, else_keyword, else_clause, ensure_clause); end
-
- # Create a new Break node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#177
- def Break(arguments); end
-
- # Create a new CHAR node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#16
- def CHAR(value); end
-
- # Create a new CVar node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#288
- def CVar(value); end
-
- # Create a new CallNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#182
- def CallNode(receiver, operator, message, arguments); end
-
- # Create a new Case node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#193
- def Case(keyword, value, consequent); end
-
- # Create a new ClassDeclaration node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#213
- def ClassDeclaration(constant, superclass, bodystmt, location = T.unsafe(nil)); end
-
- # Create a new Comma node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#228
- def Comma(value); end
-
- # Create a new Command node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#233
- def Command(message, arguments, block, location = T.unsafe(nil)); end
-
- # Create a new CommandCall node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#243
- def CommandCall(receiver, operator, message, arguments, block); end
-
- # Create a new Comment node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#255
- def Comment(value, inline, location = T.unsafe(nil)); end
-
- # Create a new Const node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#260
- def Const(value); end
-
- # Create a new ConstPathField node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#265
- def ConstPathField(parent, constant); end
-
- # Create a new ConstPathRef node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#274
- def ConstPathRef(parent, constant); end
-
- # Create a new ConstRef node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#283
- def ConstRef(constant); end
-
- # Create a new DefNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#293
- def DefNode(target, operator, name, params, bodystmt, location = T.unsafe(nil)); end
-
- # Create a new Defined node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#312
- def Defined(value); end
-
- # Create a new DynaSymbol node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#337
- def DynaSymbol(parts, quote); end
-
- # Create a new ENDBlock node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#21
- def ENDBlock(lbrace, statements); end
-
- # Create a new Else node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#342
- def Else(keyword, statements); end
-
- # Create a new Elsif node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#351
- def Elsif(predicate, statements, consequent); end
-
- # Create a new EmbDoc node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#361
- def EmbDoc(value); end
-
- # Create a new EmbExprBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#366
- def EmbExprBeg(value); end
-
- # Create a new EmbExprEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#371
- def EmbExprEnd(value); end
-
- # Create a new EmbVar node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#376
- def EmbVar(value); end
-
- # Create a new EndContent node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#30
- def EndContent(value); end
-
- # Create a new Ensure node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#381
- def Ensure(keyword, statements); end
-
- # Create a new ExcessedComma node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#390
- def ExcessedComma(value); end
-
- # Create a new Field node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#395
- def Field(parent, operator, name); end
-
- # Create a new FloatLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#405
- def FloatLiteral(value); end
-
- # Create a new FndPtn node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#410
- def FndPtn(constant, left, values, right); end
-
- # Create a new For node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#421
- def For(index, collection, statements); end
-
- # Create a new GVar node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#431
- def GVar(value); end
-
- # Create a new HashLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#436
- def HashLiteral(lbrace, assocs); end
-
- # Create a new Heredoc node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#445
- def Heredoc(beginning, ending, dedent, parts); end
-
- # Create a new HeredocBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#456
- def HeredocBeg(value); end
-
- # Create a new HeredocEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#461
- def HeredocEnd(value); end
-
- # Create a new HshPtn node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#466
- def HshPtn(constant, keywords, keyword_rest); end
-
- # Create a new IVar node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#521
- def IVar(value); end
-
- # Create a new Ident node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#476
- def Ident(value); end
-
- # Create a new IfNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#481
- def IfNode(predicate, statements, consequent); end
-
- # Create a new IfOp node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#491
- def IfOp(predicate, truthy, falsy); end
-
- # Create a new Imaginary node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#501
- def Imaginary(value); end
-
- # Create a new In node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#506
- def In(pattern, statements, consequent); end
-
- # Create a new Int node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#516
- def Int(value); end
-
- # Create a new Kw node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#526
- def Kw(value); end
-
- # Create a new KwRestParam node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#531
- def KwRestParam(name); end
-
- # Create a new LBrace node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#560
- def LBrace(value); end
-
- # Create a new LBracket node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#565
- def LBracket(value); end
-
- # Create a new LParen node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#570
- def LParen(value); end
-
- # Create a new Label node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#536
- def Label(value); end
-
- # Create a new LabelEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#541
- def LabelEnd(value); end
-
- # Create a new Lambda node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#546
- def Lambda(params, statements); end
-
- # Create a new LambdaVar node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#555
- def LambdaVar(params, locals); end
-
- # Create a new MAssign node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#575
- def MAssign(target, value); end
-
- # Create a new MLHS node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#585
- def MLHS(parts, comma); end
-
- # Create a new MLHSParen node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#590
- def MLHSParen(contents, comma); end
-
- # Create a new MRHS node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#608
- def MRHS(parts); end
-
- # Create a new MethodAddBlock node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#580
- def MethodAddBlock(call, block, location = T.unsafe(nil)); end
-
- # Create a new ModuleDeclaration node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#599
- def ModuleDeclaration(constant, bodystmt); end
-
- # Create a new Next node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#613
- def Next(arguments); end
-
- # Create a new Not node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#892
- def Not(statement, parentheses); end
-
- # Create a new Op node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#618
- def Op(value); end
-
- # Create a new OpAssign node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#623
- def OpAssign(target, operator, value); end
-
- # Create a new Params node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#633
- def Params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end
-
- # Create a new Paren node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#647
- def Paren(lparen, contents); end
-
- # Create a new Period node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#652
- def Period(value); end
-
- # Create a new PinnedBegin node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#134
- def PinnedBegin(statement); end
-
- # Create a new PinnedVarRef node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#944
- def PinnedVarRef(value); end
-
- # Create a new Program node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#657
- def Program(statements); end
-
- # Create a new QSymbols node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#662
- def QSymbols(beginning, elements); end
-
- # Create a new QSymbolsBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#671
- def QSymbolsBeg(value); end
-
- # Create a new QWords node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#676
- def QWords(beginning, elements); end
-
- # Create a new QWordsBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#685
- def QWordsBeg(value); end
-
- # Create a new RAssign node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#203
- def RAssign(value, operator, pattern); end
-
- # Create a new RBrace node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#695
- def RBrace(value); end
-
- # Create a new RBracket node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#700
- def RBracket(value); end
-
- # Create a new RParen node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#783
- def RParen(value); end
-
- # Create a new RangeNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#327
- def RangeNode(left, operator, right); end
-
- # Create a new RationalLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#690
- def RationalLiteral(value); end
-
- # Create a new Redo node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#705
- def Redo; end
-
- # Create a new RegexpBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#719
- def RegexpBeg(value); end
-
- # Create a new RegexpContent node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#710
- def RegexpContent(beginning, parts); end
-
- # Create a new RegexpEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#724
- def RegexpEnd(value); end
-
- # Create a new RegexpLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#729
- def RegexpLiteral(beginning, ending, parts); end
-
- # Create a new Rescue node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#748
- def Rescue(keyword, exception, statements, consequent); end
-
- # Create a new RescueEx node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#739
- def RescueEx(exceptions, variable); end
-
- # Create a new RescueMod node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#759
- def RescueMod(statement, value); end
-
- # Create a new RestParam node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#768
- def RestParam(name); end
-
- # Create a new Retry node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#773
- def Retry; end
-
- # Create a new ReturnNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#778
- def ReturnNode(arguments); end
-
- # Create a new SClass node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#788
- def SClass(target, bodystmt); end
-
- # Create a new Statements node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#793
- def Statements(body); end
-
- # Create a new StringConcat node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#803
- def StringConcat(left, right); end
-
- # Create a new StringContent node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#798
- def StringContent(parts); end
-
- # Create a new StringDVar node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#808
- def StringDVar(variable); end
-
- # Create a new StringEmbExpr node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#813
- def StringEmbExpr(statements); end
-
- # Create a new StringLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#818
- def StringLiteral(parts, quote); end
-
- # Create a new Super node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#823
- def Super(arguments); end
-
- # Create a new SymBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#828
- def SymBeg(value); end
-
- # Create a new SymbolContent node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#833
- def SymbolContent(value); end
-
- # Create a new SymbolLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#838
- def SymbolLiteral(value); end
-
- # Create a new Symbols node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#843
- def Symbols(beginning, elements); end
-
- # Create a new SymbolsBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#852
- def SymbolsBeg(value); end
-
- # Create a new TLamBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#862
- def TLamBeg(value); end
-
- # Create a new TLambda node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#857
- def TLambda(value); end
-
- # Create a new TStringBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#877
- def TStringBeg(value); end
-
- # Create a new TStringContent node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#882
- def TStringContent(value); end
-
- # Create a new TStringEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#887
- def TStringEnd(value); end
-
- # Create a new TopConstField node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#867
- def TopConstField(constant); end
-
- # Create a new TopConstRef node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#872
- def TopConstRef(constant); end
-
- # Create a new Unary node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#901
- def Unary(operator, statement); end
-
- # Create a new Undef node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#910
- def Undef(symbols); end
-
- # Create a new UnlessNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#915
- def UnlessNode(predicate, statements, consequent); end
-
- # Create a new UntilNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#925
- def UntilNode(predicate, statements); end
-
- # Create a new VCall node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#949
- def VCall(value); end
-
- # Create a new VarField node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#934
- def VarField(value); end
-
- # Create a new VarRef node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#939
- def VarRef(value); end
-
- # Create a new VoidStmt node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#954
- def VoidStmt; end
-
- # Create a new When node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#959
- def When(arguments, statements, consequent); end
-
- # Create a new WhileNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#969
- def WhileNode(predicate, statements); end
-
- # Create a new Word node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#978
- def Word(parts); end
-
- # Create a new Words node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#983
- def Words(beginning, elements); end
-
- # Create a new WordsBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#992
- def WordsBeg(value); end
-
- # Create a new XString node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#997
- def XString(parts); end
-
- # Create a new XStringLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#1002
- def XStringLiteral(parts); end
-
- # Create a new YieldNode node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#1007
- def YieldNode(arguments); end
-
- # Create a new ZSuper node.
- #
- # source://syntax_tree//lib/syntax_tree/dsl.rb#1012
- def ZSuper; end
-end
-
-# Def represents defining a regular method on the current self object.
-#
-# def method(param) result end
-# def object.method(param) result end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4095
-class SyntaxTree::DefNode < ::SyntaxTree::Node
- # @return [DefNode] a new instance of DefNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4114
- def initialize(target:, operator:, name:, params:, bodystmt:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4214
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4124
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4227
- def arity; end
-
- # [BodyStmt | Node] the expressions to be executed by the method
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4109
- def bodystmt; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4128
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4112
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4132
- def copy(target: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), params: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4128
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4156
- def deconstruct_keys(_keys); end
-
- # Returns true if the method was found in the source in the "endless" form,
- # i.e. where the method body is defined using the `=` operator after the
- # method name and parameters.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4223
- def endless?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4168
- def format(q); end
-
- # [Backtick | Const | Ident | Kw | Op] the name of the method
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4103
- def name; end
-
- # [nil | Op | Period] the operator being used to declare the method
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4100
- def operator; end
-
- # [nil | Params | Paren] the parameter declaration for the method
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4106
- def params; end
-
- # [nil | Node] the target where the method is being defined
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4097
- def target; end
-end
-
-# Defined represents the use of the +defined?+ operator. It can be used with
-# and without parentheses.
-#
-# defined?(variable)
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4246
-class SyntaxTree::Defined < ::SyntaxTree::Node
- # @return [Defined] a new instance of Defined
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4253
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4296
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4259
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4263
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4251
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4267
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4263
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4280
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4284
- def format(q); end
-
- # [Node] the value being sent to the keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4248
- def value; end
-end
-
-# DynaSymbol represents a symbol literal that uses quotes to dynamically
-# define its value.
-#
-# :"#{variable}"
-#
-# They can also be used as a special kind of dynamic hash key, as in:
-#
-# { "#{key}": value }
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4660
-class SyntaxTree::DynaSymbol < ::SyntaxTree::Node
- # @return [DynaSymbol] a new instance of DynaSymbol
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4671
- def initialize(parts:, quote:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4733
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4678
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4682
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4669
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4686
- def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4682
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4700
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4704
- def format(q); end
-
- # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the
- # dynamic symbol
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4663
- def parts; end
-
- # [nil | String] the quote used to delimit the dynamic symbol
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4666
- def quote; end
-
- private
-
- # Here we determine the quotes to use for a dynamic symbol. It's bound by a
- # lot of rules because it could be in many different contexts with many
- # different kinds of escaping.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4743
- def quotes(q); end
-end
-
-# ENDBlock represents the use of the +END+ keyword, which hooks into the
-# lifecycle of the interpreter. Whatever is inside the block will get executed
-# when the program ends.
-#
-# END {
-# }
-#
-# Interestingly, the END keyword doesn't allow the do and end keywords for the
-# block. Only braces are permitted.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#310
-class SyntaxTree::ENDBlock < ::SyntaxTree::Node
- # @return [ENDBlock] a new instance of ENDBlock
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#320
- def initialize(lbrace:, statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#371
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#327
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#331
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#318
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#335
- def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#331
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#349
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#358
- def format(q); end
-
- # [LBrace] the left brace that is seen after the keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#312
- def lbrace; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#315
- def statements; end
-end
-
-# Else represents the end of an +if+, +unless+, or +case+ chain.
-#
-# if variable
-# else
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4789
-class SyntaxTree::Else < ::SyntaxTree::Node
- # @return [Else] a new instance of Else
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4799
- def initialize(keyword:, statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4850
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4806
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4810
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4797
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4814
- def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4810
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4828
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4837
- def format(q); end
-
- # [Kw] the else keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4791
- def keyword; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4794
- def statements; end
-end
-
-# Elsif represents another clause in an +if+ or +unless+ chain.
-#
-# if variable
-# elsif other_variable
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4862
-class SyntaxTree::Elsif < ::SyntaxTree::Node
- # @return [Elsif] a new instance of Elsif
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4875
- def initialize(predicate:, statements:, consequent:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4939
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4883
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4887
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4873
- def comments; end
-
- # [nil | Elsif | Else] the next clause in the chain
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4870
- def consequent; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4891
- def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4887
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4906
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4916
- def format(q); end
-
- # [Node] the expression to be checked
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4864
- def predicate; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4867
- def statements; end
-end
-
-# EmbDoc represents a multi-line comment.
-#
-# =begin
-# first line
-# second line
-# =end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4952
-class SyntaxTree::EmbDoc < ::SyntaxTree::Node
- # @return [EmbDoc] a new instance of EmbDoc
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4956
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5024
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4992
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4996
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4988
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5000
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4996
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5009
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5013
- def format(q); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4984
- def ignore?; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4980
- def inline?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4964
- def leading!; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4968
- def leading?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4972
- def trailing!; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4976
- def trailing?; end
-
- # [String] the contents of the comment
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4954
- def value; end
-end
-
-# EmbExprBeg represents the beginning token for using interpolation inside of
-# a parent node that accepts string content (like a string or regular
-# expression).
-#
-# "Hello, #{person}!"
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5035
-class SyntaxTree::EmbExprBeg < ::SyntaxTree::Node
- # @return [EmbExprBeg] a new instance of EmbExprBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5039
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5065
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5044
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5048
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5052
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5048
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5061
- def deconstruct_keys(_keys); end
-
- # [String] the #{ used in the string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5037
- def value; end
-end
-
-# EmbExprEnd represents the ending token for using interpolation inside of a
-# parent node that accepts string content (like a string or regular
-# expression).
-#
-# "Hello, #{person}!"
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5076
-class SyntaxTree::EmbExprEnd < ::SyntaxTree::Node
- # @return [EmbExprEnd] a new instance of EmbExprEnd
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5080
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5106
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5085
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5089
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5093
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5089
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5102
- def deconstruct_keys(_keys); end
-
- # [String] the } used in the string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5078
- def value; end
-end
-
-# EmbVar represents the use of shorthand interpolation for an instance, class,
-# or global variable into a parent node that accepts string content (like a
-# string or regular expression).
-#
-# "#@variable"
-#
-# In the example above, an EmbVar node represents the # because it forces
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5119
-class SyntaxTree::EmbVar < ::SyntaxTree::Node
- # @return [EmbVar] a new instance of EmbVar
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5123
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5149
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5128
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5132
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5136
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5132
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5145
- def deconstruct_keys(_keys); end
-
- # [String] the # used in the string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5121
- def value; end
-end
-
-# EndContent represents the use of __END__ syntax, which allows individual
-# scripts to keep content after the main ruby code that can be read through
-# the DATA constant.
-#
-# puts DATA.read
-#
-# __END__
-# some other content that is not executed by the program
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#386
-class SyntaxTree::EndContent < ::SyntaxTree::Node
- # @return [EndContent] a new instance of EndContent
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#393
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#442
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#399
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#403
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#391
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#407
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#403
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#420
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#424
- def format(q); end
-
- # [String] the content after the script
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#388
- def value; end
-end
-
-# Ensure represents the use of the +ensure+ keyword and its subsequent
-# statements.
-#
-# begin
-# ensure
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5161
-class SyntaxTree::Ensure < ::SyntaxTree::Node
- # @return [Ensure] a new instance of Ensure
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5171
- def initialize(keyword:, statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5220
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5178
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5182
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5169
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5186
- def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5182
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5200
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5209
- def format(q); end
-
- # [Kw] the ensure keyword that began this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5163
- def keyword; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5166
- def statements; end
-end
-
-# ExcessedComma represents a trailing comma in a list of block parameters. It
-# changes the block parameters such that they will destructure.
-#
-# [[1, 2, 3], [2, 3, 4]].each do |first, second,|
-# end
-#
-# In the above example, an ExcessedComma node would appear in the third
-# position of the Params node that is used to declare that block. The third
-# position typically represents a rest-type parameter, but in this case is
-# used to indicate that a trailing comma was used.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5236
-class SyntaxTree::ExcessedComma < ::SyntaxTree::Node
- # @return [ExcessedComma] a new instance of ExcessedComma
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5243
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5278
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5249
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5253
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5241
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5257
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5253
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5270
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5274
- def format(q); end
-
- # [String] the comma
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5238
- def value; end
-end
-
-# Field is always the child of an assignment. It represents assigning to a
-# “field” on an object.
-#
-# object.variable = value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5288
-class SyntaxTree::Field < ::SyntaxTree::Node
- # @return [Field] a new instance of Field
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5301
- def initialize(parent:, operator:, name:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5351
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5309
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5313
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5299
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5318
- def copy(parent: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5313
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5333
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5343
- def format(q); end
-
- # [Const | Ident] the name of the field being assigned
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5296
- def name; end
-
- # [:"::" | Op | Period] the operator being used for the assignment
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5293
- def operator; end
-
- # [Node] the parent object that owns the field being assigned
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5290
- def parent; end
-end
-
-# This is the parent class of a lot of built-in visitors for Syntax Tree. It
-# reflects visiting each of the fields on every node in turn. It itself does
-# not do anything with these fields, it leaves that behavior up to the
-# subclass to implement.
-#
-# In order to properly use this class, you will need to subclass it and
-# implement #comments, #field, #list, #node, #pairs, and #text. Those are
-# documented here.
-#
-# == comments(node)
-#
-# This accepts the node that is being visited and does something depending on
-# the comments attached to the node.
-#
-# == field(name, value)
-#
-# This accepts the name of the field being visited as a string (like "value")
-# and the actual value of that field. The value can be a subclass of Node or
-# any other type that can be held within the tree.
-#
-# == list(name, values)
-#
-# This accepts the name of the field being visited as well as a list of
-# values. This is used, for example, when visiting something like the body of
-# a Statements node.
-#
-# == node(name, node)
-#
-# This is the parent serialization method for each node. It is called with the
-# node itself, as well as the type of the node as a string. The type is an
-# internally used value that usually resembles the name of the ripper event
-# that generated the node. The method should yield to the given block which
-# then calls through to visit each of the fields on the node.
-#
-# == text(name, value)
-#
-# This accepts the name of the field being visited as well as a string value
-# representing the value of the field.
-#
-# == pairs(name, values)
-#
-# This accepts the name of the field being visited as well as a list of pairs
-# that represent the value of the field. It is used only in a couple of
-# circumstances, like when visiting the list of optional parameters defined on
-# a method.
-#
-# source://syntax_tree//lib/syntax_tree/field_visitor.rb#50
-class SyntaxTree::FieldVisitor < ::SyntaxTree::BasicVisitor
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#163
- def visit_BEGIN(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#245
- def visit_CHAR(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#342
- def visit_END(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1018
- def visit___end__(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#68
- def visit_alias(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#52
- def visit_aref(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#60
- def visit_aref_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#76
- def visit_arg_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#83
- def visit_arg_paren(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#90
- def visit_arg_star(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#97
- def visit_args(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#104
- def visit_args_forward(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#108
- def visit_array(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#115
- def visit_aryptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#125
- def visit_assign(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#133
- def visit_assoc(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#141
- def visit_assoc_splat(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#148
- def visit_backref(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#152
- def visit_backtick(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#156
- def visit_bare_assoc_hash(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#170
- def visit_begin(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#177
- def visit_binary(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#186
- def visit_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#201
- def visit_block_var(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#194
- def visit_blockarg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#209
- def visit_bodystmt(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#219
- def visit_break(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#226
- def visit_call(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#236
- def visit_case(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#249
- def visit_class(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#258
- def visit_comma(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#262
- def visit_command(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#271
- def visit_command_call(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#282
- def visit_comment(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#286
- def visit_const(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#290
- def visit_const_path_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#298
- def visit_const_path_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#306
- def visit_const_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#313
- def visit_cvar(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#317
- def visit_def(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#328
- def visit_defined(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#335
- def visit_dyna_symbol(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#349
- def visit_else(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#356
- def visit_elsif(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#365
- def visit_embdoc(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#369
- def visit_embexpr_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#373
- def visit_embexpr_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#377
- def visit_embvar(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#381
- def visit_ensure(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#388
- def visit_excessed_comma(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#392
- def visit_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#401
- def visit_float(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#405
- def visit_fndptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#415
- def visit_for(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#424
- def visit_gvar(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#428
- def visit_hash(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#435
- def visit_heredoc(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#442
- def visit_heredoc_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#446
- def visit_heredoc_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#450
- def visit_hshptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#459
- def visit_ident(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#463
- def visit_if(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#472
- def visit_if_op(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#481
- def visit_imaginary(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#485
- def visit_in(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#494
- def visit_int(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#498
- def visit_ivar(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#502
- def visit_kw(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#506
- def visit_kwrest_param(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#513
- def visit_label(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#517
- def visit_label_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#521
- def visit_lambda(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#529
- def visit_lambda_var(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#537
- def visit_lbrace(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#541
- def visit_lbracket(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#545
- def visit_lparen(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#549
- def visit_massign(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#557
- def visit_method_add_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#565
- def visit_mlhs(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#572
- def visit_mlhs_paren(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#579
- def visit_module(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#587
- def visit_mrhs(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#594
- def visit_next(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#601
- def visit_not(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#608
- def visit_op(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#612
- def visit_opassign(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#621
- def visit_params(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#634
- def visit_paren(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#641
- def visit_period(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#645
- def visit_pinned_begin(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#652
- def visit_pinned_var_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#659
- def visit_program(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#666
- def visit_qsymbols(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#673
- def visit_qsymbols_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#677
- def visit_qwords(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#684
- def visit_qwords_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#688
- def visit_range(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#697
- def visit_rassign(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#706
- def visit_rational(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#710
- def visit_rbrace(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#714
- def visit_rbracket(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#718
- def visit_redo(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#722
- def visit_regexp_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#726
- def visit_regexp_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#730
- def visit_regexp_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#734
- def visit_regexp_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#742
- def visit_rescue(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#751
- def visit_rescue_ex(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#759
- def visit_rescue_mod(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#767
- def visit_rest_param(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#774
- def visit_retry(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#778
- def visit_return(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#785
- def visit_rparen(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#789
- def visit_sclass(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#797
- def visit_statements(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#804
- def visit_string_concat(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#812
- def visit_string_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#816
- def visit_string_dvar(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#823
- def visit_string_embexpr(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#830
- def visit_string_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#837
- def visit_super(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#844
- def visit_symbeg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#848
- def visit_symbol_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#852
- def visit_symbol_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#859
- def visit_symbols(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#866
- def visit_symbols_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#870
- def visit_tlambda(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#874
- def visit_tlambeg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#878
- def visit_top_const_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#885
- def visit_top_const_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#892
- def visit_tstring_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#896
- def visit_tstring_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#900
- def visit_tstring_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#904
- def visit_unary(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#912
- def visit_undef(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#919
- def visit_unless(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#928
- def visit_until(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#936
- def visit_var_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#943
- def visit_var_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#950
- def visit_vcall(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#957
- def visit_void_stmt(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#961
- def visit_when(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#970
- def visit_while(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#978
- def visit_word(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#985
- def visit_words(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#992
- def visit_words_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#996
- def visit_xstring(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1000
- def visit_xstring_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1007
- def visit_yield(node); end
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1014
- def visit_zsuper(node); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1025
- def visit_token(node, type); end
-end
-
-# FloatLiteral represents a floating point number literal.
-#
-# 1.0
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5361
-class SyntaxTree::FloatLiteral < ::SyntaxTree::Node
- # @return [FloatLiteral] a new instance of FloatLiteral
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5368
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5403
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5374
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5378
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5366
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5382
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5378
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5395
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5399
- def format(q); end
-
- # [String] the value of the floating point number literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5363
- def value; end
-end
-
-# Formats either a Break, Next, or Return node.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#2438
-class SyntaxTree::FlowControlFormatter
- # @return [FlowControlFormatter] a new instance of FlowControlFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2445
- def initialize(keyword, node); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2450
- def format(q); end
-
- # [String] the keyword to print
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2440
- def keyword; end
-
- # [Break | Next | Return] the node being formatted
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2443
- def node; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2599
- def format_arguments(q, opening, closing); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2589
- def format_array_contents(q, array); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#2609
- def skip_parens?(node); end
-end
-
-# FndPtn represents matching against a pattern where you find a pattern in an
-# array using the Ruby 3.0+ pattern matching syntax.
-#
-# case value
-# in [*, 7, *]
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5415
-class SyntaxTree::FndPtn < ::SyntaxTree::Node
- # @return [FndPtn] a new instance of FndPtn
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5432
- def initialize(constant:, left:, values:, right:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5501
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5441
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5445
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5430
- def comments; end
-
- # [nil | Node] the optional constant wrapper
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5417
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5449
- def copy(constant: T.unsafe(nil), left: T.unsafe(nil), values: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5445
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5465
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5476
- def format(q); end
-
- # [VarField] the splat on the left-hand side
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5420
- def left; end
-
- # [VarField] the splat on the right-hand side
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5427
- def right; end
-
- # [Array[ Node ]] the list of positional expressions in the pattern that
- # are being matched
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5424
- def values; end
-end
-
-# For represents using a +for+ loop.
-#
-# for value in list do
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5513
-class SyntaxTree::For < ::SyntaxTree::Node
- # @return [For] a new instance of For
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5527
- def initialize(index:, collection:, statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5587
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5535
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5539
- def child_nodes; end
-
- # [Node] the object being enumerated in the loop
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5519
- def collection; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5525
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5543
- def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5539
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5558
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5568
- def format(q); end
-
- # [MLHS | VarField] the variable declaration being used to
- # pull values out of the object being enumerated
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5516
- def index; end
-
- # [Statements] the statements to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5522
- def statements; end
-end
-
-# A slightly enhanced PP that knows how to format recursively including
-# comments.
-#
-# source://syntax_tree//lib/syntax_tree/formatter.rb#6
-class SyntaxTree::Formatter < ::PrettierPrint
- # @return [Formatter] a new instance of Formatter
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#95
- def initialize(source, *args, options: T.unsafe(nil)); end
-
- # These options are overridden in plugins to we need to make sure they are
- # available here.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#87
- def disable_auto_ternary; end
-
- # These options are overridden in plugins to we need to make sure they are
- # available here.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#87
- def disable_auto_ternary?; end
-
- # source://syntax_tree//lib/syntax_tree/formatter.rb#115
- def format(node, stackable: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/formatter.rb#175
- def format_each(nodes); end
-
- # source://syntax_tree//lib/syntax_tree/formatter.rb#179
- def grandparent; end
-
- # This is a simplified version of prettyprint's group. It doesn't provide
- # any of the more advanced options because we don't need them and they take
- # up expensive computation time.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#194
- def group; end
-
- # source://syntax_tree//lib/syntax_tree/formatter.rb#183
- def parent; end
-
- # source://syntax_tree//lib/syntax_tree/formatter.rb#187
- def parents; end
-
- # These options are overridden in plugins to we need to make sure they are
- # available here.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#87
- def quote; end
-
- # A similar version to the super, except that it calls back into the
- # separator proc with the instance of `self`.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#208
- def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end
-
- # Returns the value of attribute source.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#83
- def source; end
-
- # Returns the value of attribute stack.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#83
- def stack; end
-
- # These options are overridden in plugins to we need to make sure they are
- # available here.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#87
- def target_ruby_version; end
-
- # This is a much simplified version of prettyprint's text. It avoids
- # calculating width by pushing the string directly onto the target.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#224
- def text(string); end
-
- # These options are overridden in plugins to we need to make sure they are
- # available here.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#87
- def trailing_comma; end
-
- # These options are overridden in plugins to we need to make sure they are
- # available here.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#87
- def trailing_comma?; end
-
- class << self
- # source://syntax_tree//lib/syntax_tree/formatter.rb#108
- def format(source, node, base_indentation = T.unsafe(nil)); end
- end
-end
-
-# source://syntax_tree//lib/syntax_tree/formatter.rb#80
-SyntaxTree::Formatter::COMMENT_PRIORITY = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/formatter.rb#81
-SyntaxTree::Formatter::HEREDOC_PRIORITY = T.let(T.unsafe(nil), Integer)
-
-# We want to minimize as much as possible the number of options that are
-# available in syntax tree. For the most part, if users want non-default
-# formatting, they should override the format methods on the specific nodes
-# themselves. However, because of some history with prettier and the fact
-# that folks have become entrenched in their ways, we decided to provide a
-# small amount of configurability.
-#
-# source://syntax_tree//lib/syntax_tree/formatter.rb#23
-class SyntaxTree::Formatter::Options
- # @return [Options] a new instance of Options
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#29
- def initialize(quote: T.unsafe(nil), trailing_comma: T.unsafe(nil), disable_auto_ternary: T.unsafe(nil), target_ruby_version: T.unsafe(nil)); end
-
- # Returns the value of attribute disable_auto_ternary.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#24
- def disable_auto_ternary; end
-
- # Returns the value of attribute quote.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#24
- def quote; end
-
- # Returns the value of attribute target_ruby_version.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#24
- def target_ruby_version; end
-
- # Returns the value of attribute trailing_comma.
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#24
- def trailing_comma; end
-end
-
-# Unfortunately, Gem::Version.new is not ractor-safe because it performs
-# global caching using a class variable. This works around that by just
-# setting the instance variables directly.
-#
-# source://syntax_tree//lib/syntax_tree/formatter.rb#10
-class SyntaxTree::Formatter::SemanticVersion < ::Gem::Version
- # @return [SemanticVersion] a new instance of SemanticVersion
- #
- # source://syntax_tree//lib/syntax_tree/formatter.rb#11
- def initialize(version); end
-end
-
-# GVar represents a global variable literal.
-#
-# $variable
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5597
-class SyntaxTree::GVar < ::SyntaxTree::Node
- # @return [GVar] a new instance of GVar
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5604
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5639
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5610
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5614
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5602
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5618
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5614
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5631
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5635
- def format(q); end
-
- # [String] the name of the global variable
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5599
- def value; end
-end
-
-# This holds references to objects that respond to both #parse and #format
-# so that we can use them in the CLI.
-#
-# source://syntax_tree//lib/syntax_tree.rb#42
-SyntaxTree::HANDLERS = T.let(T.unsafe(nil), Hash)
-
-# This module is responsible for formatting the assocs contained within a
-# hash or bare hash. It first determines if every key in the hash can use
-# labels. If it can, it uses labels. Otherwise it uses hash rockets.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1728
-module SyntaxTree::HashKeyFormatter
- class << self
- # source://syntax_tree//lib/syntax_tree/node.rb#1786
- def for(container); end
- end
-end
-
-# When formatting a single assoc node without the context of the parent
-# hash, this formatter is used. It uses whatever is present in the node,
-# because there is nothing to be consistent with.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1775
-class SyntaxTree::HashKeyFormatter::Identity
- # source://syntax_tree//lib/syntax_tree/node.rb#1776
- def format_key(q, key); end
-end
-
-# Formats the keys of a hash literal using labels.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1730
-class SyntaxTree::HashKeyFormatter::Labels
- # source://syntax_tree//lib/syntax_tree/node.rb#1733
- def format_key(q, key); end
-end
-
-# source://syntax_tree//lib/syntax_tree/node.rb#1731
-SyntaxTree::HashKeyFormatter::Labels::LABEL = T.let(T.unsafe(nil), Regexp)
-
-# Formats the keys of a hash literal using hash rockets.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1756
-class SyntaxTree::HashKeyFormatter::Rockets
- # source://syntax_tree//lib/syntax_tree/node.rb#1757
- def format_key(q, key); end
-end
-
-# HashLiteral represents a hash literal.
-#
-# { key => value }
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5648
-class SyntaxTree::HashLiteral < ::SyntaxTree::Node
- # @return [HashLiteral] a new instance of HashLiteral
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5684
- def initialize(lbrace:, assocs:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5725
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5691
- def accept(visitor); end
-
- # [Array[ Assoc | AssocSplat ]] the optional contents of the hash
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5679
- def assocs; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5695
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5682
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5699
- def copy(lbrace: T.unsafe(nil), assocs: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5695
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5713
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5717
- def format(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5730
- def format_key(q, key); end
-
- # [LBrace] the left brace that opens this hash
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5676
- def lbrace; end
-
- private
-
- # If we have an empty hash that contains only comments, then we're going
- # to do some special printing to ensure they get indented correctly.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5738
- def empty_with_comments?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5742
- def format_contents(q); end
-end
-
-# This is a special formatter used if the hash literal contains no values
-# but _does_ contain comments. In this case we do some special formatting to
-# make sure the comments gets indented properly.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5652
-class SyntaxTree::HashLiteral::EmptyWithCommentsFormatter
- # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5656
- def initialize(lbrace); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5660
- def format(q); end
-
- # [LBrace] the opening brace
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5654
- def lbrace; end
-end
-
-# Heredoc represents a heredoc string literal.
-#
-# <<~DOC
-# contents
-# DOC
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5771
-class SyntaxTree::Heredoc < ::SyntaxTree::Node
- # @return [Heredoc] a new instance of Heredoc
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5788
- def initialize(beginning:, location:, ending: T.unsafe(nil), dedent: T.unsafe(nil), parts: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5870
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5797
- def accept(visitor); end
-
- # [HeredocBeg] the opening of the heredoc
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5773
- def beginning; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5801
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5786
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5805
- def copy(beginning: T.unsafe(nil), location: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5801
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5820
- def deconstruct_keys(_keys); end
-
- # [Integer] how far to dedent the heredoc
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5779
- def dedent; end
-
- # [HeredocEnd] the ending of the heredoc
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5776
- def ending; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5835
- def format(q); end
-
- # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the
- # heredoc string literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5783
- def parts; end
-end
-
-# This is a very specific behavior where you want to force a newline, but
-# don't want to force the break parent.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5832
-SyntaxTree::Heredoc::SEPARATOR = T.let(T.unsafe(nil), PrettierPrint::Breakable)
-
-# HeredocBeg represents the beginning declaration of a heredoc.
-#
-# <<~DOC
-# contents
-# DOC
-#
-# In the example above the HeredocBeg node represents <<~DOC.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5883
-class SyntaxTree::HeredocBeg < ::SyntaxTree::Node
- # @return [HeredocBeg] a new instance of HeredocBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5890
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5925
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5896
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5900
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5888
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5904
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5900
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5917
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5921
- def format(q); end
-
- # [String] the opening declaration of the heredoc
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5885
- def value; end
-end
-
-# HeredocEnd represents the closing declaration of a heredoc.
-#
-# <<~DOC
-# contents
-# DOC
-#
-# In the example above the HeredocEnd node represents the closing DOC.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5937
-class SyntaxTree::HeredocEnd < ::SyntaxTree::Node
- # @return [HeredocEnd] a new instance of HeredocEnd
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5944
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5979
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5950
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5954
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5942
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5958
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5954
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5971
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#5975
- def format(q); end
-
- # [String] the closing declaration of the heredoc
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5939
- def value; end
-end
-
-# HshPtn represents matching against a hash pattern using the Ruby 2.7+
-# pattern matching syntax.
-#
-# case value
-# in { key: }
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5991
-class SyntaxTree::HshPtn < ::SyntaxTree::Node
- # @return [HshPtn] a new instance of HshPtn
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6051
- def initialize(constant:, keywords:, keyword_rest:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6144
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6059
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6063
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6049
- def comments; end
-
- # [nil | Node] the optional constant wrapper
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6039
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6067
- def copy(constant: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6063
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6082
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6092
- def format(q); end
-
- # [nil | VarField] an optional parameter to gather up all remaining keywords
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6046
- def keyword_rest; end
-
- # [Array[ [DynaSymbol | Label, nil | Node] ]] the set of tuples
- # representing the keywords that should be matched against in the pattern
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6043
- def keywords; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6155
- def format_contents(q, parts, nested); end
-end
-
-# Formats a key-value pair in a hash pattern. The value is optional.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5993
-class SyntaxTree::HshPtn::KeywordFormatter
- # @return [KeywordFormatter] a new instance of KeywordFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6000
- def initialize(key, value); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6005
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6009
- def format(q); end
-
- # [Label] the keyword being used
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5995
- def key; end
-
- # [Node] the optional value for the keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#5998
- def value; end
-end
-
-# Formats the optional double-splat from the pattern.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6020
-class SyntaxTree::HshPtn::KeywordRestFormatter
- # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6024
- def initialize(keyword_rest); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6028
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6032
- def format(q); end
-
- # [VarField] the parameter that matches the remaining keywords
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6022
- def keyword_rest; end
-end
-
-# IVar represents an instance variable literal.
-#
-# @variable
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6875
-class SyntaxTree::IVar < ::SyntaxTree::Node
- # @return [IVar] a new instance of IVar
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6882
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6917
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6888
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6892
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6880
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6896
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6892
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6909
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6913
- def format(q); end
-
- # [String] the name of the instance variable
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6877
- def value; end
-end
-
-# Ident represents an identifier anywhere in code. It can represent a very
-# large number of things, depending on where it is in the syntax tree.
-#
-# value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6178
-class SyntaxTree::Ident < ::SyntaxTree::Node
- # @return [Ident] a new instance of Ident
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6185
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6220
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6191
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6195
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6183
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6199
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6195
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6212
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6216
- def format(q); end
-
- # [String] the value of the identifier
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6180
- def value; end
-end
-
-# If represents the first clause in an +if+ chain.
-#
-# if predicate
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6468
-class SyntaxTree::IfNode < ::SyntaxTree::Node
- # @return [IfNode] a new instance of IfNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6481
- def initialize(predicate:, statements:, consequent:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6526
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6489
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6493
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6479
- def comments; end
-
- # [nil | Elsif | Else] the next clause in the chain
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6476
- def consequent; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6497
- def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6493
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6512
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6522
- def format(q); end
-
- # Checks if the node was originally found in the modifier form.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6532
- def modifier?; end
-
- # [Node] the expression to be checked
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6470
- def predicate; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6473
- def statements; end
-end
-
-# IfOp represents a ternary clause.
-#
-# predicate ? truthy : falsy
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6541
-class SyntaxTree::IfOp < ::SyntaxTree::Node
- # @return [IfOp] a new instance of IfOp
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6554
- def initialize(predicate:, truthy:, falsy:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6628
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6562
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6566
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6552
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6570
- def copy(predicate: T.unsafe(nil), truthy: T.unsafe(nil), falsy: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6566
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6585
- def deconstruct_keys(_keys); end
-
- # [Node] the expression to be executed if the predicate is falsy
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6549
- def falsy; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6595
- def format(q); end
-
- # [Node] the expression to be checked
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6543
- def predicate; end
-
- # [Node] the expression to be executed if the predicate is truthy
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6546
- def truthy; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6635
- def format_break(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6658
- def format_flat(q); end
-end
-
-# Imaginary represents an imaginary number literal.
-#
-# 1i
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6677
-class SyntaxTree::Imaginary < ::SyntaxTree::Node
- # @return [Imaginary] a new instance of Imaginary
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6684
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6719
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6690
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6694
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6682
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6698
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6694
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6711
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6715
- def format(q); end
-
- # [String] the value of the imaginary number literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6679
- def value; end
-end
-
-# In represents using the +in+ keyword within the Ruby 2.7+ pattern matching
-# syntax.
-#
-# case value
-# in pattern
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6731
-class SyntaxTree::In < ::SyntaxTree::Node
- # @return [In] a new instance of In
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6744
- def initialize(pattern:, statements:, consequent:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6809
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6752
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6756
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6742
- def comments; end
-
- # [nil | In | Else] the next clause in the chain
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6739
- def consequent; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6760
- def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6756
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6775
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6785
- def format(q); end
-
- # [Node] the pattern to check against
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6733
- def pattern; end
-
- # [Statements] the expressions to execute if the pattern matched
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6736
- def statements; end
-end
-
-# This class can be used to build an index of the structure of Ruby files. We
-# define an index as the list of constants and methods defined within a file.
-#
-# This index strives to be as fast as possible to better support tools like
-# IDEs. Because of that, it has different backends depending on what
-# functionality is available.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#10
-module SyntaxTree::Index
- class << self
- # This method accepts source code and then indexes it.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#674
- def index(source, backend: T.unsafe(nil)); end
-
- # This method accepts a filepath and then indexes it.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#679
- def index_file(filepath, backend: T.unsafe(nil)); end
- end
-end
-
-# This entry represents a method definition that was created using the alias
-# keyword.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#85
-class SyntaxTree::Index::AliasMethodDefinition
- # @return [AliasMethodDefinition] a new instance of AliasMethodDefinition
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#88
- def initialize(nesting, name, location, comments); end
-
- # Returns the value of attribute comments.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#86
- def comments; end
-
- # Returns the value of attribute location.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#86
- def location; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#86
- def name; end
-
- # Returns the value of attribute nesting.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#86
- def nesting; end
-end
-
-# This entry represents a class definition using the class keyword.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#22
-class SyntaxTree::Index::ClassDefinition
- # @return [ClassDefinition] a new instance of ClassDefinition
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#25
- def initialize(nesting, name, superclass, location, comments); end
-
- # Returns the value of attribute comments.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#23
- def comments; end
-
- # Returns the value of attribute location.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#23
- def location; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#23
- def name; end
-
- # Returns the value of attribute nesting.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#23
- def nesting; end
-
- # Returns the value of attribute superclass.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#23
- def superclass; end
-end
-
-# This entry represents a constant assignment.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#35
-class SyntaxTree::Index::ConstantDefinition
- # @return [ConstantDefinition] a new instance of ConstantDefinition
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#38
- def initialize(nesting, name, location, comments); end
-
- # Returns the value of attribute comments.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#36
- def comments; end
-
- # Returns the value of attribute location.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#36
- def location; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#36
- def name; end
-
- # Returns the value of attribute nesting.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#36
- def nesting; end
-end
-
-# This class handles parsing comments from Ruby source code in the case that
-# we use the instruction sequence backend. Because the instruction sequence
-# backend doesn't provide comments (since they are dropped) we provide this
-# interface to lazily parse them out.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#152
-class SyntaxTree::Index::EntryComments
- include ::Enumerable
-
- # @return [EntryComments] a new instance of EntryComments
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#156
- def initialize(file_comments, location); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#161
- def each(&block); end
-
- # Returns the value of attribute file_comments.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#154
- def file_comments; end
-
- # Returns the value of attribute location.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#154
- def location; end
-end
-
-# When you're using the instruction sequence backend, this class is used to
-# lazily parse comments out of the source code.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#98
-class SyntaxTree::Index::FileComments
- # @return [FileComments] a new instance of FileComments
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#139
- def initialize(source); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#143
- def comments; end
-
- # Returns the value of attribute source.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#137
- def source; end
-end
-
-# This represents the Ruby source in the form of a file. When it needs to
-# be read we'll read the file.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#115
-class SyntaxTree::Index::FileComments::FileSource
- # @return [FileSource] a new instance of FileSource
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#118
- def initialize(filepath); end
-
- # Returns the value of attribute filepath.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#116
- def filepath; end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#122
- def source; end
-end
-
-# We use the ripper library to pull out source comments.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#100
-class SyntaxTree::Index::FileComments::Parser < ::Ripper
- # @return [Parser] a new instance of Parser
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#103
- def initialize(*_arg0); end
-
- # Returns the value of attribute comments.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#101
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#108
- def on_comment(value); end
-end
-
-# This represents the Ruby source in the form of a string. When it needs
-# to be read the string is returned.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#129
-class SyntaxTree::Index::FileComments::StringSource
- # @return [StringSource] a new instance of StringSource
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#132
- def initialize(source); end
-
- # Returns the value of attribute source.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#130
- def source; end
-end
-
-# The class defined here is used to perform the indexing, depending on what
-# functionality is available from the runtime.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#670
-SyntaxTree::Index::INDEX_BACKEND = SyntaxTree::Index::ISeqBackend
-
-# This backend creates the index using RubyVM::InstructionSequence, which is
-# faster than using the Syntax Tree parser, but is not available on all
-# runtimes.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#177
-class SyntaxTree::Index::ISeqBackend
- # source://syntax_tree//lib/syntax_tree/index.rb#184
- def index(source); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#191
- def index_file(filepath); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/index.rb#242
- def find_attr_arguments(insns, index); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#205
- def find_constant_path(insns, index); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#273
- def index_iseq(iseq, file_comments); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#200
- def location_for(iseq); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#258
- def method_definition(nesting, name, location, file_comments); end
-end
-
-# source://syntax_tree//lib/syntax_tree/index.rb#182
-SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/index.rb#181
-SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_SCOPED = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/index.rb#178
-SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_CLASS = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/index.rb#180
-SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_MODULE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/index.rb#179
-SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer)
-
-# This is a location for an index entry.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#12
-class SyntaxTree::Index::Location
- # @return [Location] a new instance of Location
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#15
- def initialize(line, column); end
-
- # Returns the value of attribute column.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#13
- def column; end
-
- # Returns the value of attribute line.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#13
- def line; end
-end
-
-# This entry represents a method definition using the def keyword.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#59
-class SyntaxTree::Index::MethodDefinition
- # @return [MethodDefinition] a new instance of MethodDefinition
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#62
- def initialize(nesting, name, location, comments); end
-
- # Returns the value of attribute comments.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#60
- def comments; end
-
- # Returns the value of attribute location.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#60
- def location; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#60
- def name; end
-
- # Returns the value of attribute nesting.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#60
- def nesting; end
-end
-
-# This entry represents a module definition using the module keyword.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#47
-class SyntaxTree::Index::ModuleDefinition
- # @return [ModuleDefinition] a new instance of ModuleDefinition
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#50
- def initialize(nesting, name, location, comments); end
-
- # Returns the value of attribute comments.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#48
- def comments; end
-
- # Returns the value of attribute location.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#48
- def location; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#48
- def name; end
-
- # Returns the value of attribute nesting.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#48
- def nesting; end
-end
-
-# This backend creates the index using the Syntax Tree parser and a visitor.
-# It is not as fast as using the instruction sequences directly, but is
-# supported on all runtimes.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#452
-class SyntaxTree::Index::ParserBackend
- # source://syntax_tree//lib/syntax_tree/index.rb#659
- def index(source); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#663
- def index_file(filepath); end
-end
-
-# source://syntax_tree//lib/syntax_tree/index.rb#453
-class SyntaxTree::Index::ParserBackend::ConstantNameVisitor < ::SyntaxTree::Visitor
- # source://syntax_tree//lib/syntax_tree/index.rb#458
- def visit_const_path_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#454
- def visit_const_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#462
- def visit_var_ref(node); end
-end
-
-# source://syntax_tree//lib/syntax_tree/index.rb#467
-class SyntaxTree::Index::ParserBackend::IndexVisitor < ::SyntaxTree::Visitor
- # @return [IndexVisitor] a new instance of IndexVisitor
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#470
- def initialize; end
-
- # Returns the value of attribute nesting.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#468
- def nesting; end
-
- # Returns the value of attribute results.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#468
- def results; end
-
- # Returns the value of attribute statements.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#468
- def statements; end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#477
- def visit_alias(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#496
- def visit_assign(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#515
- def visit_class(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#547
- def visit_command(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#584
- def visit_def(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#608
- def visit_module(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#626
- def visit_program(node); end
-
- # source://syntax_tree//lib/syntax_tree/index.rb#631
- def visit_statements(node); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/index.rb#639
- def comments_for(node); end
-end
-
-# This entry represents a singleton method definition using the def keyword
-# with a specified target.
-#
-# source://syntax_tree//lib/syntax_tree/index.rb#72
-class SyntaxTree::Index::SingletonMethodDefinition
- # @return [SingletonMethodDefinition] a new instance of SingletonMethodDefinition
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#75
- def initialize(nesting, name, location, comments); end
-
- # Returns the value of attribute comments.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#73
- def comments; end
-
- # Returns the value of attribute location.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#73
- def location; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#73
- def name; end
-
- # Returns the value of attribute nesting.
- #
- # source://syntax_tree//lib/syntax_tree/index.rb#73
- def nesting; end
-end
-
-# Int represents an integer number literal.
-#
-# 1
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6819
-class SyntaxTree::Int < ::SyntaxTree::Node
- # @return [Int] a new instance of Int
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6826
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6866
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6832
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6836
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6824
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6840
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6836
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6850
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6854
- def format(q); end
-
- # [String] the value of the integer
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6821
- def value; end
-end
-
-# This visitor transforms the AST into a hash that contains only primitives
-# that can be easily serialized into JSON.
-#
-# source://syntax_tree//lib/syntax_tree/json_visitor.rb#8
-class SyntaxTree::JSONVisitor < ::SyntaxTree::FieldVisitor
- # @return [JSONVisitor] a new instance of JSONVisitor
- #
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#11
- def initialize; end
-
- # Returns the value of attribute target.
- #
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#9
- def target; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#17
- def comments(node); end
-
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#21
- def field(name, value); end
-
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#25
- def list(name, values); end
-
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#29
- def node(node, type); end
-
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#38
- def pairs(name, values); end
-
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#42
- def text(name, value); end
-
- # source://syntax_tree//lib/syntax_tree/json_visitor.rb#46
- def visit_location(location); end
-end
-
-# Kw represents the use of a keyword. It can be almost anywhere in the syntax
-# tree, so you end up seeing it quite a lot.
-#
-# if value
-# end
-#
-# In the above example, there would be two Kw nodes: one for the if and one
-# for the end. Note that anything that matches the list of keywords in Ruby
-# will use a Kw, so if you use a keyword in a symbol literal for instance:
-#
-# :if
-#
-# then the contents of the symbol node will contain a Kw node.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6935
-class SyntaxTree::Kw < ::SyntaxTree::Node
- # @return [Kw] a new instance of Kw
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6945
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6978
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6952
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6956
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6943
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6960
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6956
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6970
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#6974
- def format(q); end
-
- # [Symbol] the symbol version of the value
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6940
- def name; end
-
- # [String] the value of the keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6937
- def value; end
-end
-
-# KwRestParam represents defining a parameter in a method definition that
-# accepts all remaining keyword parameters.
-#
-# def method(**kwargs) end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6988
-class SyntaxTree::KwRestParam < ::SyntaxTree::Node
- # @return [KwRestParam] a new instance of KwRestParam
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6995
- def initialize(name:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7031
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7001
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7005
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6993
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7009
- def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7005
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7022
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7026
- def format(q); end
-
- # [nil | Ident] the name of the parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6990
- def name; end
-end
-
-# LBrace represents the use of a left brace, i.e., {.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7332
-class SyntaxTree::LBrace < ::SyntaxTree::Node
- # @return [LBrace] a new instance of LBrace
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7339
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7374
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7345
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7349
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7337
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7353
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7349
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7366
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7370
- def format(q); end
-
- # [String] the left brace
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7334
- def value; end
-
- class << self
- # Because some nodes keep around a { token so that comments can be attached
- # to it if they occur in the source, oftentimes an LBrace is a child of
- # another node. This means it's required at initialization time. To make it
- # easier to create LBrace nodes without any specific value, this method
- # provides a default node.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7383
- def default; end
- end
-end
-
-# LBracket represents the use of a left bracket, i.e., [.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7389
-class SyntaxTree::LBracket < ::SyntaxTree::Node
- # @return [LBracket] a new instance of LBracket
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7396
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7431
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7402
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7406
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7394
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7410
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7406
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7423
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7427
- def format(q); end
-
- # [String] the left bracket
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7391
- def value; end
-
- class << self
- # Because some nodes keep around a [ token so that comments can be attached
- # to it if they occur in the source, oftentimes an LBracket is a child of
- # another node. This means it's required at initialization time. To make it
- # easier to create LBracket nodes without any specific value, this method
- # provides a default node.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7440
- def default; end
- end
-end
-
-# LParen represents the use of a left parenthesis, i.e., (.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7446
-class SyntaxTree::LParen < ::SyntaxTree::Node
- # @return [LParen] a new instance of LParen
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7453
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7488
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7459
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7463
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7451
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7467
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7463
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7480
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7484
- def format(q); end
-
- # [String] the left parenthesis
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7448
- def value; end
-
- class << self
- # Because some nodes keep around a ( token so that comments can be attached
- # to it if they occur in the source, oftentimes an LParen is a child of
- # another node. This means it's required at initialization time. To make it
- # easier to create LParen nodes without any specific value, this method
- # provides a default node.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7497
- def default; end
- end
-end
-
-# Label represents the use of an identifier to associate with an object. You
-# can find it in a hash key, as in:
-#
-# { key: value }
-#
-# In this case "key:" would be the body of the label. You can also find it in
-# pattern matching, as in:
-#
-# case value
-# in key:
-# end
-#
-# In this case "key:" would be the body of the label.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7049
-class SyntaxTree::Label < ::SyntaxTree::Node
- # @return [Label] a new instance of Label
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7056
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7091
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7062
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7066
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7054
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7070
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7066
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7083
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7087
- def format(q); end
-
- # [String] the value of the label
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7051
- def value; end
-end
-
-# LabelEnd represents the end of a dynamic symbol.
-#
-# { "key": value }
-#
-# In the example above, LabelEnd represents the "\":" token at the end of the
-# hash key. This node is important for determining the type of quote being
-# used by the label.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7103
-class SyntaxTree::LabelEnd < ::SyntaxTree::Node
- # @return [LabelEnd] a new instance of LabelEnd
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7107
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7133
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7112
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7116
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7120
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7116
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7129
- def deconstruct_keys(_keys); end
-
- # [String] the end of the label
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7105
- def value; end
-end
-
-# Lambda represents using a lambda literal (not the lambda method call).
-#
-# ->(value) { value * 2 }
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7142
-class SyntaxTree::Lambda < ::SyntaxTree::Node
- # @return [Lambda] a new instance of Lambda
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7152
- def initialize(params:, statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7255
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7159
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7163
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7150
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7167
- def copy(params: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7163
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7181
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7190
- def format(q); end
-
- # [LambdaVar | Paren] the parameter declaration for this lambda
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7144
- def params; end
-
- # [BodyStmt | Statements] the expressions to be executed in this lambda
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7147
- def statements; end
-end
-
-# LambdaVar represents the parameters being declared for a lambda. Effectively
-# this node is everything contained within the parentheses. This includes all
-# of the various parameter types, as well as block-local variable
-# declarations.
-#
-# -> (positional, optional = value, keyword:, █ local) do
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7269
-class SyntaxTree::LambdaVar < ::SyntaxTree::Node
- # @return [LambdaVar] a new instance of LambdaVar
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7279
- def initialize(params:, locals:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7325
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7286
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7290
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7277
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7294
- def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7290
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7308
- def deconstruct_keys(_keys); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7312
- def empty?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7316
- def format(q); end
-
- # [Array[ Ident ]] the list of block-local variable declarations
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7274
- def locals; end
-
- # [Params] the parameters being declared with the block
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7271
- def params; end
-end
-
-# Syntax Tree additionally ships with a language server conforming to the
-# language server protocol. It can be invoked through the CLI by running:
-#
-# stree lsp
-#
-# source://syntax_tree//lib/syntax_tree/language_server.rb#14
-class SyntaxTree::LanguageServer
- # @return [LanguageServer] a new instance of LanguageServer
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#217
- def initialize(input: T.unsafe(nil), output: T.unsafe(nil), print_width: T.unsafe(nil)); end
-
- # Returns the value of attribute input.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#215
- def input; end
-
- # Returns the value of attribute output.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#215
- def output; end
-
- # Returns the value of attribute print_width.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#215
- def print_width; end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#228
- def run; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#280
- def capabilities; end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#293
- def format(source, extension); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#317
- def inlay_hints(source); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#333
- def log(message); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#327
- def write(value); end
-end
-
-# This class provides inlay hints for the language server. For more
-# information, see the spec here:
-# https://github.com/microsoft/language-server-protocol/issues/956.
-#
-# source://syntax_tree//lib/syntax_tree/language_server.rb#18
-class SyntaxTree::LanguageServer::InlayHints < ::SyntaxTree::Visitor
- # @return [InlayHints] a new instance of InlayHints
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#43
- def initialize; end
-
- # Returns the value of attribute hints.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#41
- def hints; end
-
- # Returns the value of attribute stack.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#41
- def stack; end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#48
- def visit(node); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#67
- def visit_assign(node); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#81
- def visit_binary(node); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#102
- def visit_if_op(node); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#124
- def visit_rescue(node); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#145
- def visit_unary(node); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#156
- def parentheses(location); end
-end
-
-# This represents a hint that is going to be displayed in the editor.
-#
-# source://syntax_tree//lib/syntax_tree/language_server.rb#20
-class SyntaxTree::LanguageServer::InlayHints::Hint
- # @return [Hint] a new instance of Hint
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#23
- def initialize(line:, character:, label:); end
-
- # Returns the value of attribute character.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#21
- def character; end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#21
- def label; end
-
- # Returns the value of attribute line.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#21
- def line; end
-
- # This is the shape that the LSP expects.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#30
- def to_json(*opts); end
-end
-
-# This is a small module that effectively mirrors pattern matching. We're
-# using it so that we can support truffleruby without having to ignore the
-# language server.
-#
-# source://syntax_tree//lib/syntax_tree/language_server.rb#174
-module SyntaxTree::LanguageServer::Request
- class << self
- # source://syntax_tree//lib/syntax_tree/language_server.rb#203
- def [](value); end
- end
-end
-
-# Represents a hash pattern.
-#
-# source://syntax_tree//lib/syntax_tree/language_server.rb#176
-class SyntaxTree::LanguageServer::Request::Shape
- # @return [Shape] a new instance of Shape
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#179
- def initialize(values); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#183
- def ===(other); end
-
- # Returns the value of attribute values.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#177
- def values; end
-end
-
-# Represents an array pattern.
-#
-# source://syntax_tree//lib/syntax_tree/language_server.rb#191
-class SyntaxTree::LanguageServer::Request::Tuple
- # @return [Tuple] a new instance of Tuple
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#194
- def initialize(values); end
-
- # source://syntax_tree//lib/syntax_tree/language_server.rb#198
- def ===(other); end
-
- # Returns the value of attribute values.
- #
- # source://syntax_tree//lib/syntax_tree/language_server.rb#192
- def values; end
-end
-
-# Represents the location of a node in the tree from the source code.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#5
-class SyntaxTree::Location
- # @return [Location] a new instance of Location
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#13
- def initialize(start_line:, start_char:, start_column:, end_line:, end_char:, end_column:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#33
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#50
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#54
- def deconstruct_keys(_keys); end
-
- # Returns the value of attribute end_char.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6
- def end_char; end
-
- # Returns the value of attribute end_column.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6
- def end_column; end
-
- # Returns the value of attribute end_line.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6
- def end_line; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#29
- def lines; end
-
- # Returns the value of attribute start_char.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6
- def start_char; end
-
- # Returns the value of attribute start_column.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6
- def start_column; end
-
- # Returns the value of attribute start_line.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6
- def start_line; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#39
- def to(other); end
-
- class << self
- # A convenience method that is typically used when you don't care about the
- # location of a node, but need to create a Location instance to pass to a
- # constructor.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#90
- def default; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#76
- def fixed(line:, char:, column:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#65
- def token(line:, char:, column:, size:); end
- end
-end
-
-# Formats an Until or While node.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11394
-class SyntaxTree::LoopFormatter
- # @return [LoopFormatter] a new instance of LoopFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11401
- def initialize(keyword, node); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11406
- def format(q); end
-
- # [String] the name of the keyword used for this loop
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11396
- def keyword; end
-
- # [Until | While] the node that is being formatted
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11399
- def node; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11453
- def format_break(q); end
-end
-
-# MAssign is a parent node of any kind of multiple assignment. This includes
-# splitting out variables on the left like:
-#
-# first, second, third = value
-#
-# as well as splitting out variables on the right, as in:
-#
-# value = first, second, third
-#
-# Both sides support splats, as well as variables following them. There's also
-# destructuring behavior that you can achieve with the following:
-#
-# first, = value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7516
-class SyntaxTree::MAssign < ::SyntaxTree::Node
- # @return [MAssign] a new instance of MAssign
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7526
- def initialize(target:, value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7570
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7533
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7537
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7524
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7541
- def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7537
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7555
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7559
- def format(q); end
-
- # [MLHS | MLHSParen] the target of the multiple assignment
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7518
- def target; end
-
- # [Node] the value being assigned
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7521
- def value; end
-end
-
-# MLHS represents a list of values being destructured on the left-hand side
-# of a multiple assignment.
-#
-# first, second, third = value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7654
-class SyntaxTree::MLHS < ::SyntaxTree::Node
- # @return [MLHS] a new instance of MLHS
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7671
- def initialize(parts:, location:, comma: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7709
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7678
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7682
- def child_nodes; end
-
- # [boolean] whether or not there is a trailing comma at the end of this
- # list, which impacts destructuring. It's an attr_accessor so that while
- # the syntax tree is being built it can be set by its parent node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7666
- def comma; end
-
- # [boolean] whether or not there is a trailing comma at the end of this
- # list, which impacts destructuring. It's an attr_accessor so that while
- # the syntax tree is being built it can be set by its parent node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7666
- def comma=(_arg0); end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7669
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7686
- def copy(parts: T.unsafe(nil), location: T.unsafe(nil), comma: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7682
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7700
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7704
- def format(q); end
-
- # [
- # Array[
- # ARefField | ArgStar | ConstPathField | Field | Ident | MLHSParen |
- # TopConstField | VarField
- # ]
- # ] the parts of the left-hand side of a multiple assignment
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7661
- def parts; end
-end
-
-# MLHSParen represents parentheses being used to destruct values in a multiple
-# assignment on the left hand side.
-#
-# (left, right) = value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7720
-class SyntaxTree::MLHSParen < ::SyntaxTree::Node
- # @return [MLHSParen] a new instance of MLHSParen
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7732
- def initialize(contents:, location:, comma: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7785
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7739
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7743
- def child_nodes; end
-
- # [boolean] whether or not there is a trailing comma at the end of this
- # list, which impacts destructuring. It's an attr_accessor so that while
- # the syntax tree is being built it can be set by its parent node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7727
- def comma; end
-
- # [boolean] whether or not there is a trailing comma at the end of this
- # list, which impacts destructuring. It's an attr_accessor so that while
- # the syntax tree is being built it can be set by its parent node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7727
- def comma=(_arg0); end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7730
- def comments; end
-
- # [MLHS | MLHSParen] the contents inside of the parentheses
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7722
- def contents; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7747
- def copy(contents: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7743
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7760
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7764
- def format(q); end
-end
-
-# MRHS represents the values that are being assigned on the right-hand side of
-# a multiple assignment.
-#
-# values = first, second, third
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7885
-class SyntaxTree::MRHS < ::SyntaxTree::Node
- # @return [MRHS] a new instance of MRHS
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7892
- def initialize(parts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7927
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7898
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7902
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7890
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7906
- def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7902
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7919
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7923
- def format(q); end
-
- # [Array[Node]] the parts that are being assigned
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7887
- def parts; end
-end
-
-# This visitor transforms the AST into a Ruby pattern matching expression that
-# would match correctly against the AST.
-#
-# source://syntax_tree//lib/syntax_tree/match_visitor.rb#6
-class SyntaxTree::MatchVisitor < ::SyntaxTree::FieldVisitor
- # @return [MatchVisitor] a new instance of MatchVisitor
- #
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#9
- def initialize(q); end
-
- # Returns the value of attribute q.
- #
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#7
- def q; end
-
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#13
- def visit(node); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#30
- def comments(node); end
-
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#44
- def field(name, value); end
-
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#52
- def list(name, values); end
-
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#65
- def node(node, _type); end
-
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#86
- def pairs(name, values); end
-
- # source://syntax_tree//lib/syntax_tree/match_visitor.rb#112
- def text(name, value); end
-end
-
-# This module is responsible for rendering mermaid (https://mermaid.js.org/)
-# flow charts.
-#
-# source://syntax_tree//lib/syntax_tree/mermaid.rb#9
-module SyntaxTree::Mermaid
- class << self
- # Escape a label to be used in the mermaid syntax. This is used to escape
- # HTML entities such that they render properly within the quotes.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#158
- def escape(label); end
-
- # Create a new flowchart. If a block is given, it will be yielded to and
- # the flowchart will be rendered. Otherwise, the flowchart will be
- # returned.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#165
- def flowchart; end
- end
-end
-
-# This is the main class that handles rendering a flowchart. It keeps track
-# of its nodes and links and renders them according to the mermaid syntax.
-#
-# source://syntax_tree//lib/syntax_tree/mermaid.rb#12
-class SyntaxTree::Mermaid::FlowChart
- # @return [FlowChart] a new instance of FlowChart
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#15
- def initialize; end
-
- # Retrieve a node that has already been added to the flowchart by its id.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#25
- def fetch(id); end
-
- # Add a link to the flowchart between two nodes with an optional label.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#30
- def link(from, to, label = T.unsafe(nil), type: T.unsafe(nil), color: T.unsafe(nil)); end
-
- # Returns the value of attribute links.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#13
- def links; end
-
- # Add a node to the flowchart with an optional label.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#39
- def node(id, label = T.unsafe(nil), shape: T.unsafe(nil)); end
-
- # Returns the value of attribute nodes.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#13
- def nodes; end
-
- # Returns the value of attribute output.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#13
- def output; end
-
- # Returns the value of attribute prefix.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#13
- def prefix; end
-
- # Return the rendered flowchart.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#64
- def render; end
-
- # Add a subgraph to the flowchart. Within the given block, all of the
- # nodes will be rendered within the subgraph.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#49
- def subgraph(label); end
-end
-
-# This class represents a link between two nodes in a flowchart. It is not
-# meant to be interacted with directly, but rather used as a data structure
-# by the FlowChart class.
-#
-# source://syntax_tree//lib/syntax_tree/mermaid.rb#78
-class SyntaxTree::Mermaid::Link
- # @return [Link] a new instance of Link
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#84
- def initialize(from, to, label, type, color); end
-
- # Returns the value of attribute color.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#82
- def color; end
-
- # Returns the value of attribute from.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#82
- def from; end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#82
- def label; end
-
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#95
- def render; end
-
- # Returns the value of attribute to.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#82
- def to; end
-
- # Returns the value of attribute type.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#82
- def type; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#108
- def sides; end
-end
-
-# source://syntax_tree//lib/syntax_tree/mermaid.rb#80
-SyntaxTree::Mermaid::Link::COLORS = T.let(T.unsafe(nil), Array)
-
-# source://syntax_tree//lib/syntax_tree/mermaid.rb#79
-SyntaxTree::Mermaid::Link::TYPES = T.let(T.unsafe(nil), Array)
-
-# This class represents a node in a flowchart. Unlike the Link class, it can
-# be used directly. It is the return value of the #node method, and is meant
-# to be passed around to #link methods to create links between nodes.
-#
-# source://syntax_tree//lib/syntax_tree/mermaid.rb#121
-class SyntaxTree::Mermaid::Node
- # @return [Node] a new instance of Node
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#126
- def initialize(id, label, shape); end
-
- # Returns the value of attribute id.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#124
- def id; end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#124
- def label; end
-
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#134
- def render; end
-
- # Returns the value of attribute shape.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#124
- def shape; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/mermaid.rb#141
- def bounds; end
-end
-
-# source://syntax_tree//lib/syntax_tree/mermaid.rb#122
-SyntaxTree::Mermaid::Node::SHAPES = T.let(T.unsafe(nil), Array)
-
-# This visitor transforms the AST into a mermaid flow chart.
-#
-# source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#5
-class SyntaxTree::MermaidVisitor < ::SyntaxTree::FieldVisitor
- # @return [MermaidVisitor] a new instance of MermaidVisitor
- #
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#8
- def initialize; end
-
- # Returns the value of attribute flowchart.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6
- def flowchart; end
-
- # Returns the value of attribute target.
- #
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6
- def target; end
-
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#13
- def visit_program(node); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#20
- def comments(node); end
-
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#24
- def field(name, value); end
-
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#37
- def list(name, values); end
-
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#43
- def node(node, type); end
-
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#55
- def pairs(name, values); end
-
- # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#65
- def text(name, value); end
-end
-
-# MethodAddBlock represents a method call with a block argument.
-#
-# method {}
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7579
-class SyntaxTree::MethodAddBlock < ::SyntaxTree::Node
- # @return [MethodAddBlock] a new instance of MethodAddBlock
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7589
- def initialize(call:, block:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7638
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7596
- def accept(visitor); end
-
- # [BlockNode] the block being sent with the method call
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7584
- def block; end
-
- # [ARef | CallNode | Command | CommandCall | Super | ZSuper] the method call
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7581
- def call; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7600
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7587
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7604
- def copy(call: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7600
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7618
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7622
- def format(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7643
- def format_contents(q); end
-end
-
-# ModuleDeclaration represents defining a module using the +module+ keyword.
-#
-# module Namespace
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7795
-class SyntaxTree::ModuleDeclaration < ::SyntaxTree::Node
- # @return [ModuleDeclaration] a new instance of ModuleDeclaration
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7805
- def initialize(constant:, bodystmt:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7865
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7812
- def accept(visitor); end
-
- # [BodyStmt] the expressions to be executed in the context of the module
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7800
- def bodystmt; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7816
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7803
- def comments; end
-
- # [ConstPathRef | ConstRef | TopConstRef] the name of the module
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7797
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7820
- def copy(constant: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7816
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7834
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7843
- def format(q); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7872
- def format_declaration(q); end
-end
-
-# This visitor walks through the tree and copies each node as it is being
-# visited. This is useful for mutating the tree before it is formatted.
-#
-# source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#6
-class SyntaxTree::MutationVisitor < ::SyntaxTree::BasicVisitor
- # @return [MutationVisitor] a new instance of MutationVisitor
- #
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#9
- def initialize; end
-
- # Create a new mutation based on the given query that will mutate the node
- # using the given block. The block should return a new node that will take
- # the place of the given node in the tree. These blocks frequently make use
- # of the `copy` method on nodes to create a new node with the same
- # properties as the original node.
- #
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#18
- def mutate(query, &block); end
-
- # Returns the value of attribute mutations.
- #
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#7
- def mutations; end
-
- # This is the base visit method for each node in the tree. It first creates
- # a copy of the node using the visit_* methods defined below. Then it checks
- # each mutation in sequence and calls it if it finds a match.
- #
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#25
- def visit(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#38
- def visit_BEGIN(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#46
- def visit_CHAR(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#51
- def visit_END(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#59
- def visit___end__(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#64
- def visit_alias(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#69
- def visit_aref(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#74
- def visit_aref_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#89
- def visit_arg_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#79
- def visit_arg_paren(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#94
- def visit_arg_star(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#84
- def visit_args(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#99
- def visit_args_forward(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#104
- def visit_array(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#112
- def visit_aryptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#122
- def visit_assign(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#127
- def visit_assoc(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#132
- def visit_assoc_splat(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#137
- def visit_backref(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#142
- def visit_backtick(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#147
- def visit_bare_assoc_hash(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#152
- def visit_begin(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#162
- def visit_binary(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#295
- def visit_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#167
- def visit_block_var(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#172
- def visit_blockarg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#177
- def visit_bodystmt(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#187
- def visit_break(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#192
- def visit_call(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#202
- def visit_case(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#216
- def visit_class(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#225
- def visit_comma(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#230
- def visit_command(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#239
- def visit_command_call(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#249
- def visit_comment(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#254
- def visit_const(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#259
- def visit_const_path_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#264
- def visit_const_path_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#269
- def visit_const_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#274
- def visit_cvar(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#279
- def visit_def(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#290
- def visit_defined(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#313
- def visit_dyna_symbol(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#318
- def visit_else(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#326
- def visit_elsif(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#334
- def visit_embdoc(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#339
- def visit_embexpr_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#344
- def visit_embexpr_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#349
- def visit_embvar(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#354
- def visit_ensure(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#362
- def visit_excessed_comma(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#367
- def visit_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#375
- def visit_float(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#380
- def visit_fndptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#390
- def visit_for(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#395
- def visit_gvar(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#400
- def visit_hash(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#405
- def visit_heredoc(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#414
- def visit_heredoc_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#419
- def visit_heredoc_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#424
- def visit_hshptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#434
- def visit_ident(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#439
- def visit_if(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#448
- def visit_if_op(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#453
- def visit_imaginary(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#458
- def visit_in(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#466
- def visit_int(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#471
- def visit_ivar(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#476
- def visit_kw(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#481
- def visit_kwrest_param(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#486
- def visit_label(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#491
- def visit_label_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#496
- def visit_lambda(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#504
- def visit_lambda_var(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#509
- def visit_lbrace(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#514
- def visit_lbracket(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#519
- def visit_lparen(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#524
- def visit_massign(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#529
- def visit_method_add_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#534
- def visit_mlhs(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#539
- def visit_mlhs_paren(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#544
- def visit_module(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#552
- def visit_mrhs(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#557
- def visit_next(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#812
- def visit_not(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#562
- def visit_op(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#567
- def visit_opassign(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#572
- def visit_params(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#588
- def visit_paren(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#593
- def visit_period(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#157
- def visit_pinned_begin(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#854
- def visit_pinned_var_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#598
- def visit_program(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#603
- def visit_qsymbols(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#611
- def visit_qsymbols_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#616
- def visit_qwords(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#624
- def visit_qwords_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#304
- def visit_range(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#211
- def visit_rassign(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#629
- def visit_rational(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#634
- def visit_rbrace(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#639
- def visit_rbracket(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#644
- def visit_redo(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#654
- def visit_regexp_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#649
- def visit_regexp_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#659
- def visit_regexp_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#664
- def visit_regexp_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#674
- def visit_rescue(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#669
- def visit_rescue_ex(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#684
- def visit_rescue_mod(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#689
- def visit_rest_param(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#694
- def visit_retry(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#699
- def visit_return(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#704
- def visit_rparen(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#709
- def visit_sclass(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#714
- def visit_statements(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#724
- def visit_string_concat(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#719
- def visit_string_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#729
- def visit_string_dvar(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#734
- def visit_string_embexpr(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#739
- def visit_string_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#744
- def visit_super(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#749
- def visit_symbeg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#754
- def visit_symbol_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#759
- def visit_symbol_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#764
- def visit_symbols(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#772
- def visit_symbols_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#777
- def visit_tlambda(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#782
- def visit_tlambeg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#787
- def visit_top_const_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#792
- def visit_top_const_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#797
- def visit_tstring_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#802
- def visit_tstring_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#807
- def visit_tstring_end(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#817
- def visit_unary(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#822
- def visit_undef(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#827
- def visit_unless(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#836
- def visit_until(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#844
- def visit_var_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#849
- def visit_var_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#859
- def visit_vcall(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#864
- def visit_void_stmt(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#869
- def visit_when(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#878
- def visit_while(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#886
- def visit_word(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#891
- def visit_words(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#899
- def visit_words_beg(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#904
- def visit_xstring(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#909
- def visit_xstring_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#914
- def visit_yield(node); end
-
- # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#919
- def visit_zsuper(node); end
-end
-
-# Next represents using the +next+ keyword.
-#
-# next
-#
-# The +next+ keyword can also optionally be called with an argument:
-#
-# next value
-#
-# +next+ can even be called with multiple arguments, but only if parentheses
-# are omitted, as in:
-#
-# next first, second, third
-#
-# If a single value is being given, parentheses can be used, as in:
-#
-# next(value)
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#7949
-class SyntaxTree::Next < ::SyntaxTree::Node
- # @return [Next] a new instance of Next
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7956
- def initialize(arguments:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7991
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7962
- def accept(visitor); end
-
- # [Args] the arguments passed to the next keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7951
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7966
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#7954
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7970
- def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7966
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7983
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#7987
- def format(q); end
-end
-
-# This is the parent node of all of the syntax tree nodes. It's pretty much
-# exclusively here to make it easier to operate with the tree in cases where
-# you're trying to monkey-patch or strictly type.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#105
-class SyntaxTree::Node
- # @raise [NotImplementedError]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#109
- def accept(visitor); end
-
- # @raise [NotImplementedError]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#113
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#149
- def construct_keys; end
-
- # @raise [NotImplementedError]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#117
- def deconstruct; end
-
- # @raise [NotImplementedError]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#121
- def deconstruct_keys(keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#133
- def end_char; end
-
- # @raise [NotImplementedError]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#125
- def format(q); end
-
- # [Location] the location of this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#107
- def location; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#137
- def pretty_print(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#129
- def start_char; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#141
- def to_json(*opts); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#145
- def to_mermaid; end
-end
-
-# Not represents the unary +not+ method being called on an expression.
-#
-# not value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11093
-class SyntaxTree::Not < ::SyntaxTree::Node
- # @return [Not] a new instance of Not
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11104
- def initialize(statement:, parentheses:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11166
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11111
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11115
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11102
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11119
- def copy(statement: T.unsafe(nil), parentheses: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11115
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11133
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11142
- def format(q); end
-
- # [boolean] whether or not parentheses were used
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11098
- def parentheses; end
-
- # [boolean] whether or not parentheses were used
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11098
- def parentheses?; end
-
- # [nil | Node] the statement on which to operate
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11095
- def statement; end
-end
-
-# Op represents an operator literal in the source.
-#
-# 1 + 2
-#
-# In the example above, the Op node represents the + operator.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8001
-class SyntaxTree::Op < ::SyntaxTree::Node
- # @return [Op] a new instance of Op
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8011
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8044
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8018
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8022
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8009
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8026
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8022
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8036
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8040
- def format(q); end
-
- # [Symbol] the symbol version of the value
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8006
- def name; end
-
- # [String] the operator
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8003
- def value; end
-end
-
-# OpAssign represents assigning a value to a variable or constant using an
-# operator like += or ||=.
-#
-# variable += value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8054
-class SyntaxTree::OpAssign < ::SyntaxTree::Node
- # @return [OpAssign] a new instance of OpAssign
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8068
- def initialize(target:, operator:, value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8127
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8076
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8080
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8066
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8084
- def copy(target: T.unsafe(nil), operator: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8080
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8099
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8109
- def format(q); end
-
- # [Op] the operator being used for the assignment
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8060
- def operator; end
-
- # [ARefField | ConstPathField | Field | TopConstField | VarField] the target
- # to assign the result of the expression to
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8057
- def target; end
-
- # [Node] the expression to be assigned
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8063
- def value; end
-
- private
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8134
- def skip_indent?; end
-end
-
-# The list of nodes that represent patterns inside of pattern matching so that
-# when a pattern is being printed it knows if it's nested.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6171
-SyntaxTree::PATTERNS = T.let(T.unsafe(nil), Array)
-
-# Params represents defining parameters on a method or lambda.
-#
-# def method(param) end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8212
-class SyntaxTree::Params < ::SyntaxTree::Node
- # @return [Params] a new instance of Params
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8314
- def initialize(location:, requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8444
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8344
- def accept(visitor); end
-
- # Returns a range representing the possible number of arguments accepted
- # by this params node not including the block. For example:
- #
- # def foo(a, b = 1, c:, d: 2, &block)
- # ...
- # end
- #
- # has arity 2..4.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8467
- def arity; end
-
- # [nil | BlockArg] the optional block parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8309
- def block; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8348
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8312
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8362
- def copy(location: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8348
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8390
- def deconstruct_keys(_keys); end
-
- # Params nodes are the most complicated in the tree. Occasionally you want
- # to know if they are "empty", which means not having any parameters
- # declared. This logic accesses every kind of parameter and determines if
- # it's missing.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8339
- def empty?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8404
- def format(q); end
-
- # [nil | :nil | ArgsForward | KwRestParam] the optional keyword rest
- # parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8306
- def keyword_rest; end
-
- # [Array[ [ Label, nil | Node ] ]] any keyword parameters and their
- # optional default values
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8302
- def keywords; end
-
- # [Array[ [ Ident, Node ] ]] any optional parameters and their default
- # values
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8290
- def optionals; end
-
- # [Array[ Ident ]] any positional parameters that exist after a rest
- # parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8298
- def posts; end
-
- # [Array[ Ident | MLHSParen ]] any required parameters
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8286
- def requireds; end
-
- # [nil | ArgsForward | ExcessedComma | RestParam] the optional rest
- # parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8294
- def rest; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8483
- def format_contents(q, parts); end
-end
-
-# Formats the keyword position of the parameters. This includes the label,
-# as well as an optional default value.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8240
-class SyntaxTree::Params::KeywordFormatter
- # @return [KeywordFormatter] a new instance of KeywordFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8247
- def initialize(name, value); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8252
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8256
- def format(q); end
-
- # [Ident] the name of the parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8242
- def name; end
-
- # [nil | Node] the value of the parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8245
- def value; end
-end
-
-# Formats the keyword_rest position of the parameters. This can be the **nil
-# syntax, the ... syntax, or the ** syntax.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8268
-class SyntaxTree::Params::KeywordRestFormatter
- # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8272
- def initialize(value); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8276
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8280
- def format(q); end
-
- # [:nil | ArgsForward | KwRestParam] the value of the parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8270
- def value; end
-end
-
-# Formats the optional position of the parameters. This includes the label,
-# as well as the default value.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8215
-class SyntaxTree::Params::OptionalFormatter
- # @return [OptionalFormatter] a new instance of OptionalFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8222
- def initialize(name, value); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8227
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8231
- def format(q); end
-
- # [Ident] the name of the parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8217
- def name; end
-
- # [Node] the value of the parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8220
- def value; end
-end
-
-# Paren represents using balanced parentheses in a couple places in a Ruby
-# program. In general parentheses can be used anywhere a Ruby expression can
-# be used.
-#
-# (1 + 2)
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8495
-class SyntaxTree::Paren < ::SyntaxTree::Node
- # @return [Paren] a new instance of Paren
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8505
- def initialize(lparen:, contents:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8561
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8512
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8516
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8503
- def comments; end
-
- # [nil | Node] the expression inside the parentheses
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8500
- def contents; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8520
- def copy(lparen: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8516
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8534
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8543
- def format(q); end
-
- # [LParen] the left parenthesis that opened this statement
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8497
- def lparen; end
-end
-
-# If you have a modifier statement (for instance a modifier if statement or a
-# modifier while loop) there are times when you need to wrap the entire
-# statement in parentheses. This occurs when you have something like:
-#
-# foo[:foo] =
-# if bar?
-# baz
-# end
-#
-# Normally we would shorten this to an inline version, which would result in:
-#
-# foo[:foo] = baz if bar?
-#
-# but this actually has different semantic meaning. The first example will
-# result in a nil being inserted into the hash for the :foo key, whereas the
-# second example will result in an empty hash because the if statement applies
-# to the entire assignment.
-#
-# We can fix this in a couple of ways. We can use the then keyword, as in:
-#
-# foo[:foo] = if bar? then baz end
-#
-# But this isn't used very often. We can also just leave it as is with the
-# multi-line version, but for a short predicate and short value it looks
-# verbose. The last option and the one used here is to add parentheses on
-# both sides of the expression, as in:
-#
-# foo[:foo] = (baz if bar?)
-#
-# This approach maintains the nice conciseness of the inline version, while
-# keeping the correct semantic meaning.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8171
-module SyntaxTree::Parentheses
- class << self
- # source://syntax_tree//lib/syntax_tree/node.rb#8191
- def break(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8183
- def flat(q); end
- end
-end
-
-# source://syntax_tree//lib/syntax_tree/node.rb#8172
-SyntaxTree::Parentheses::NODES = T.let(T.unsafe(nil), Array)
-
-# Parser is a subclass of the Ripper library that subscribes to the stream of
-# tokens and nodes coming from the parser and builds up a syntax tree.
-#
-# source://syntax_tree//lib/syntax_tree/parser.rb#6
-class SyntaxTree::Parser < ::Ripper
- # @return [Parser] a new instance of Parser
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#116
- def initialize(source, *_arg1); end
-
- # [Array[ Comment | EmbDoc ]] the list of comments that have been found
- # while parsing the source.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#114
- def comments; end
-
- # [Array[ SingleByteString | MultiByteString ]] the list of objects that
- # represent the start of each line in character offsets
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#105
- def line_counts; end
-
- # [String] the source being parsed
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#101
- def source; end
-
- # [Array[ untyped ]] a running list of tokens that have been found in the
- # source. This list changes a lot as certain nodes will "consume" these
- # tokens to determine their bounds.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#110
- def tokens; end
-
- private
-
- # Attaches comments to the nodes in the tree that most closely correspond to
- # the location of the comments.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2911
- def attach_comments(program, comments); end
-
- # This represents the current place in the source string that we've gotten
- # to so far. We have a memoized line_counts object that we can use to get
- # the number of characters that we've had to go through to get to the
- # beginning of this line, then we add the number of columns into this line
- # that we've gone through.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#197
- def char_pos; end
-
- # @raise [ParseError]
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#295
- def consume_error(name, location); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#312
- def consume_keyword(name); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#318
- def consume_operator(name); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#300
- def consume_token(type); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#306
- def consume_tstring_end(location); end
-
- # This represents the current column we're in relative to the beginning of
- # the current line.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#203
- def current_column; end
-
- # A helper function to find a :: operator. We do special handling instead of
- # using find_token here because we don't pop off all of the :: operators so
- # you could end up getting the wrong information if you have for instance
- # ::X::Y::Z.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#328
- def find_colon2_before(const); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#272
- def find_keyword(name); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#277
- def find_keyword_between(name, left, right); end
-
- # Finds the next position in the source string that begins a statement. This
- # is used to bind statements lists and make sure they don't include a
- # preceding comment. For example, we want the following comment to be
- # attached to the class node and not the statement node:
- #
- # ...
- # end
- #
- # By finding the next non-space character, we can make sure that the bounds
- # of the statement list are correct.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#349
- def find_next_statement_start(position); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#290
- def find_operator(name); end
-
- # As we build up a list of tokens, we'll periodically need to go backwards
- # and find the ones that we've already hit in order to determine the
- # location information for nodes that use them. For example, if you have a
- # module node then you'll look backward for a kw token to determine your
- # start location.
- #
- # This works with nesting since we're deleting tokens from the list once
- # they've been used up. For example if you had nested module declarations
- # then the innermost declaration would grab the last kw node that matches
- # "module" (which would happen to be the innermost keyword). Then the outer
- # one would only be able to grab the first one. In this way all of the
- # tokens act as their own stack.
- #
- # If we're expecting to be able to find a token and consume it, but can't
- # actually find it, then we need to raise an error. This is _usually_ caused
- # by a syntax error in the source that we're printing. It could also be
- # caused by accidentally attempting to consume a token twice by two
- # different parser event handlers.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#254
- def find_token(type); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#259
- def find_token_between(type, left, right); end
-
- # Returns the current location that is being looked at for the parser for
- # the purpose of locating the error.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#210
- def find_token_error(location); end
-
- # Ripper doesn't support capturing lambda local variables until 3.2. To
- # mitigate this, we have to parse that code for ourselves. We use the range
- # from the parentheses to find where we _should_ be looking. Then we check
- # if the resulting tokens match a pattern that we determine means that the
- # declaration has block-local variables. Once it does, we parse those out
- # and convert them into Ident nodes.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2362
- def lambda_locals(source); end
-
- # Responsible for finding the nearest nodes to the given comment within the
- # context of the given encapsulating node.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2946
- def nearest_nodes(node, comment); end
-
- # :call-seq:
- # on_BEGIN: (Statements statements) -> BEGINBlock
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#371
- def on_BEGIN(statements); end
-
- # :call-seq:
- # on_CHAR: (String value) -> CHAR
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#395
- def on_CHAR(value); end
-
- # :call-seq:
- # on_END: (Statements statements) -> ENDBlock
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#410
- def on_END(statements); end
-
- # :call-seq:
- # on___end__: (String value) -> EndContent
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#434
- def on___end__(value); end
-
- # :call-seq:
- # on_alias: (
- # (DynaSymbol | SymbolLiteral) left,
- # (DynaSymbol | SymbolLiteral) right
- # ) -> AliasNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#453
- def on_alias(left, right); end
-
- # If we encounter a parse error, just immediately bail out so that our
- # runner can catch it.
- #
- # @raise [ParseError]
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2863
- def on_alias_error(error, *_arg1); end
-
- # :call-seq:
- # on_aref: (untyped collection, (nil | Args) index) -> ARef
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#465
- def on_aref(collection, index); end
-
- # :call-seq:
- # on_aref_field: (
- # untyped collection,
- # (nil | Args) index
- # ) -> ARefField
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#481
- def on_aref_field(collection, index); end
-
- # :call-seq:
- # on_arg_paren: (
- # (nil | Args | ArgsForward) arguments
- # ) -> ArgParen
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#500
- def on_arg_paren(arguments); end
-
- # :call-seq:
- # on_args_add: (Args arguments, untyped argument) -> Args
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#522
- def on_args_add(arguments, argument); end
-
- # :call-seq:
- # on_args_add_block: (
- # Args arguments,
- # (false | untyped) block
- # ) -> Args
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#543
- def on_args_add_block(arguments, block); end
-
- # :call-seq:
- # on_args_add_star: (Args arguments, untyped star) -> Args
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#581
- def on_args_add_star(arguments, argument); end
-
- # :call-seq:
- # on_args_forward: () -> ArgsForward
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#603
- def on_args_forward; end
-
- # :call-seq:
- # on_args_new: () -> Args
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#611
- def on_args_new; end
-
- # :call-seq:
- # on_array: ((nil | Args) contents) ->
- # ArrayLiteral | QSymbols | QWords | Symbols | Words
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#622
- def on_array(contents); end
-
- # :call-seq:
- # on_aryptn: (
- # (nil | VarRef) constant,
- # (nil | Array[untyped]) requireds,
- # (nil | VarField) rest,
- # (nil | Array[untyped]) posts
- # ) -> AryPtn
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#701
- def on_aryptn(constant, requireds, rest, posts); end
-
- # :call-seq:
- # on_assign: (
- # (
- # ARefField |
- # ConstPathField |
- # Field |
- # TopConstField |
- # VarField
- # ) target,
- # untyped value
- # ) -> Assign
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#756
- def on_assign(target, value); end
-
- # If we encounter a parse error, just immediately bail out so that our
- # runner can catch it.
- #
- # @raise [ParseError]
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2863
- def on_assign_error(error, *_arg1); end
-
- # :call-seq:
- # on_assoc_new: (untyped key, untyped value) -> Assoc
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#766
- def on_assoc_new(key, value); end
-
- # :call-seq:
- # on_assoc_splat: (untyped value) -> AssocSplat
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#775
- def on_assoc_splat(value); end
-
- # :call-seq:
- # on_backref: (String value) -> Backref
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#790
- def on_backref(value); end
-
- # :call-seq:
- # on_backtick: (String value) -> Backtick
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#805
- def on_backtick(value); end
-
- # :call-seq:
- # on_bare_assoc_hash: (
- # Array[AssocNew | AssocSplat] assocs
- # ) -> BareAssocHash
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#826
- def on_bare_assoc_hash(assocs); end
-
- # :call-seq:
- # on_begin: (untyped bodystmt) -> Begin | PinnedBegin
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#835
- def on_begin(bodystmt); end
-
- # :call-seq:
- # on_binary: (
- # untyped left,
- # (Op | Symbol) operator,
- # untyped right
- # ) -> Binary
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#874
- def on_binary(left, operator, right); end
-
- # :call-seq:
- # on_block_var: (Params params, (nil | Array[Ident]) locals) -> BlockVar
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#906
- def on_block_var(params, locals); end
-
- # :call-seq:
- # on_blockarg: (Ident name) -> BlockArg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#946
- def on_blockarg(name); end
-
- # :call-seq:
- # on_bodystmt: (
- # Statements statements,
- # (nil | Rescue) rescue_clause,
- # (nil | Statements) else_clause,
- # (nil | Ensure) ensure_clause
- # ) -> BodyStmt
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#962
- def on_bodystmt(statements, rescue_clause, else_clause, ensure_clause); end
-
- # :call-seq:
- # on_brace_block: (
- # (nil | BlockVar) block_var,
- # Statements statements
- # ) -> BlockNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#988
- def on_brace_block(block_var, statements); end
-
- # :call-seq:
- # on_break: (Args arguments) -> Break
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1025
- def on_break(arguments); end
-
- # :call-seq:
- # on_call: (
- # untyped receiver,
- # (:"::" | Op | Period) operator,
- # (:call | Backtick | Const | Ident | Op) message
- # ) -> CallNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1040
- def on_call(receiver, operator, message); end
-
- # :call-seq:
- # on_case: (untyped value, untyped consequent) -> Case | RAssign
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1061
- def on_case(value, consequent); end
-
- # :call-seq:
- # on_class: (
- # (ConstPathRef | ConstRef | TopConstRef) constant,
- # untyped superclass,
- # BodyStmt bodystmt
- # ) -> ClassDeclaration
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1096
- def on_class(constant, superclass, bodystmt); end
-
- # If we encounter a parse error, just immediately bail out so that our
- # runner can catch it.
- #
- # @raise [ParseError]
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2863
- def on_class_name_error(error, *_arg1); end
-
- # :call-seq:
- # on_comma: (String value) -> Comma
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1120
- def on_comma(value); end
-
- # :call-seq:
- # on_command: ((Const | Ident) message, Args arguments) -> Command
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1139
- def on_command(message, arguments); end
-
- # :call-seq:
- # on_command_call: (
- # untyped receiver,
- # (:"::" | Op | Period) operator,
- # (Const | Ident | Op) message,
- # (nil | Args) arguments
- # ) -> CommandCall
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1155
- def on_command_call(receiver, operator, message, arguments); end
-
- # :call-seq:
- # on_comment: (String value) -> Comment
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1170
- def on_comment(value); end
-
- # :call-seq:
- # on_const: (String value) -> Const
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1208
- def on_const(value); end
-
- # :call-seq:
- # on_const_path_field: (untyped parent, Const constant) ->
- # ConstPathField | Field
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1224
- def on_const_path_field(parent, constant); end
-
- # :call-seq:
- # on_const_path_ref: (untyped parent, Const constant) -> ConstPathRef
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1243
- def on_const_path_ref(parent, constant); end
-
- # :call-seq:
- # on_const_ref: (Const constant) -> ConstRef
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1253
- def on_const_ref(constant); end
-
- # :call-seq:
- # on_cvar: (String value) -> CVar
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1259
- def on_cvar(value); end
-
- # :call-seq:
- # on_def: (
- # (Backtick | Const | Ident | Kw | Op) name,
- # (nil | Params | Paren) params,
- # untyped bodystmt
- # ) -> DefNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1278
- def on_def(name, params, bodystmt); end
-
- # :call-seq:
- # on_defined: (untyped value) -> Defined
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1346
- def on_defined(value); end
-
- # :call-seq:
- # on_defs: (
- # untyped target,
- # (Op | Period) operator,
- # (Backtick | Const | Ident | Kw | Op) name,
- # (Params | Paren) params,
- # BodyStmt bodystmt
- # ) -> DefNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1370
- def on_defs(target, operator, name, params, bodystmt); end
-
- # :call-seq:
- # on_do_block: (BlockVar block_var, BodyStmt bodystmt) -> BlockNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1435
- def on_do_block(block_var, bodystmt); end
-
- # :call-seq:
- # on_dot2: ((nil | untyped) left, (nil | untyped) right) -> RangeNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1459
- def on_dot2(left, right); end
-
- # :call-seq:
- # on_dot3: ((nil | untyped) left, (nil | untyped) right) -> RangeNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1475
- def on_dot3(left, right); end
-
- # :call-seq:
- # on_dyna_symbol: (StringContent string_content) -> DynaSymbol
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1491
- def on_dyna_symbol(string_content); end
-
- # :call-seq:
- # on_else: (Statements statements) -> Else
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1517
- def on_else(statements); end
-
- # :call-seq:
- # on_elsif: (
- # untyped predicate,
- # Statements statements,
- # (nil | Elsif | Else) consequent
- # ) -> Elsif
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1558
- def on_elsif(predicate, statements, consequent); end
-
- # :call-seq:
- # on_embdoc: (String value) -> EmbDoc
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1588
- def on_embdoc(value); end
-
- # :call-seq:
- # on_embdoc_beg: (String value) -> EmbDoc
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1595
- def on_embdoc_beg(value); end
-
- # :call-seq:
- # on_embdoc_end: (String value) -> EmbDoc
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1606
- def on_embdoc_end(value); end
-
- # :call-seq:
- # on_embexpr_beg: (String value) -> EmbExprBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1630
- def on_embexpr_beg(value); end
-
- # :call-seq:
- # on_embexpr_end: (String value) -> EmbExprEnd
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1649
- def on_embexpr_end(value); end
-
- # :call-seq:
- # on_embvar: (String value) -> EmbVar
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1668
- def on_embvar(value); end
-
- # :call-seq:
- # on_ensure: (Statements statements) -> Ensure
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1687
- def on_ensure(statements); end
-
- # The handler for this event accepts no parameters (though in previous
- # versions of Ruby it accepted a string literal with a value of ",").
- #
- # :call-seq:
- # on_excessed_comma: () -> ExcessedComma
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1714
- def on_excessed_comma(*_arg0); end
-
- # :call-seq:
- # on_fcall: ((Const | Ident) value) -> CallNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1722
- def on_fcall(value); end
-
- # :call-seq:
- # on_field: (
- # untyped parent,
- # (:"::" | Op | Period) operator
- # (Const | Ident) name
- # ) -> Field
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1738
- def on_field(parent, operator, name); end
-
- # :call-seq:
- # on_float: (String value) -> FloatLiteral
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1749
- def on_float(value); end
-
- # :call-seq:
- # on_fndptn: (
- # (nil | untyped) constant,
- # VarField left,
- # Array[untyped] values,
- # VarField right
- # ) -> FndPtn
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1769
- def on_fndptn(constant, left, values, right); end
-
- # :call-seq:
- # on_for: (
- # (MLHS | VarField) value,
- # untyped collection,
- # Statements statements
- # ) -> For
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1821
- def on_for(index, collection, statements); end
-
- # :call-seq:
- # on_gvar: (String value) -> GVar
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1859
- def on_gvar(value); end
-
- # :call-seq:
- # on_hash: ((nil | Array[AssocNew | AssocSplat]) assocs) -> HashLiteral
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1874
- def on_hash(assocs); end
-
- # :call-seq:
- # on_heredoc_beg: (String value) -> HeredocBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1887
- def on_heredoc_beg(value); end
-
- # :call-seq:
- # on_heredoc_dedent: (StringContent string, Integer width) -> Heredoc
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1906
- def on_heredoc_dedent(string, width); end
-
- # :call-seq:
- # on_heredoc_end: (String value) -> Heredoc
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1920
- def on_heredoc_end(value); end
-
- # :call-seq:
- # on_hshptn: (
- # (nil | untyped) constant,
- # Array[[Label | StringContent, untyped]] keywords,
- # (nil | VarField) keyword_rest
- # ) -> HshPtn
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#1956
- def on_hshptn(constant, keywords, keyword_rest); end
-
- # :call-seq:
- # on_ident: (String value) -> Ident
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2026
- def on_ident(value); end
-
- # :call-seq:
- # on_if: (
- # untyped predicate,
- # Statements statements,
- # (nil | Elsif | Else) consequent
- # ) -> IfNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2045
- def on_if(predicate, statements, consequent); end
-
- # :call-seq:
- # on_if_mod: (untyped predicate, untyped statement) -> IfNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2085
- def on_if_mod(predicate, statement); end
-
- # :call-seq:
- # on_ifop: (untyped predicate, untyped truthy, untyped falsy) -> IfOp
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2074
- def on_ifop(predicate, truthy, falsy); end
-
- # :call-seq:
- # on_imaginary: (String value) -> Imaginary
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2107
- def on_imaginary(value); end
-
- # :call-seq:
- # on_in: (RAssign pattern, nil statements, nil consequent) -> RAssign
- # | (
- # untyped pattern,
- # Statements statements,
- # (nil | In | Else) consequent
- # ) -> In
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2127
- def on_in(pattern, statements, consequent); end
-
- # :call-seq:
- # on_int: (String value) -> Int
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2172
- def on_int(value); end
-
- # :call-seq:
- # on_ivar: (String value) -> IVar
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2187
- def on_ivar(value); end
-
- # :call-seq:
- # on_kw: (String value) -> Kw
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2202
- def on_kw(value); end
-
- # :call-seq:
- # on_kwrest_param: ((nil | Ident) name) -> KwRestParam
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2221
- def on_kwrest_param(name); end
-
- # :call-seq:
- # on_label: (String value) -> Label
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2230
- def on_label(value); end
-
- # :call-seq:
- # on_label_end: (String value) -> LabelEnd
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2245
- def on_label_end(value); end
-
- # :call-seq:
- # on_lambda: (
- # (Params | Paren) params,
- # (BodyStmt | Statements) statements
- # ) -> Lambda
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2267
- def on_lambda(params, statements); end
-
- # :call-seq:
- # on_lambda_var: (Params params, Array[ Ident ] locals) -> LambdaVar
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2349
- def on_lambda_var(params, locals); end
-
- # :call-seq:
- # on_lbrace: (String value) -> LBrace
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2432
- def on_lbrace(value); end
-
- # :call-seq:
- # on_lbracket: (String value) -> LBracket
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2451
- def on_lbracket(value); end
-
- # :call-seq:
- # on_lparen: (String value) -> LParen
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2470
- def on_lparen(value); end
-
- # :call-seq:
- # on_massign: ((MLHS | MLHSParen) target, untyped value) -> MAssign
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2493
- def on_massign(target, value); end
-
- # :call-seq:
- # on_method_add_arg: (
- # CallNode call,
- # (ArgParen | Args) arguments
- # ) -> CallNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2509
- def on_method_add_arg(call, arguments); end
-
- # :call-seq:
- # on_method_add_block: (
- # (Break | Call | Command | CommandCall, Next) call,
- # Block block
- # ) -> Break | MethodAddBlock
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2527
- def on_method_add_block(call, block); end
-
- # :call-seq:
- # on_mlhs_add: (
- # MLHS mlhs,
- # (ARefField | Field | Ident | MLHSParen | VarField) part
- # ) -> MLHS
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2556
- def on_mlhs_add(mlhs, part); end
-
- # :call-seq:
- # on_mlhs_add_post: (MLHS left, MLHS right) -> MLHS
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2565
- def on_mlhs_add_post(left, right); end
-
- # :call-seq:
- # on_mlhs_add_star: (
- # MLHS mlhs,
- # (nil | ARefField | Field | Ident | VarField) part
- # ) -> MLHS
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2577
- def on_mlhs_add_star(mlhs, part); end
-
- # :call-seq:
- # on_mlhs_new: () -> MLHS
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2590
- def on_mlhs_new; end
-
- # :call-seq:
- # on_mlhs_paren: ((MLHS | MLHSParen) contents) -> MLHSParen
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2600
- def on_mlhs_paren(contents); end
-
- # :call-seq:
- # on_module: (
- # (ConstPathRef | ConstRef | TopConstRef) constant,
- # BodyStmt bodystmt
- # ) -> ModuleDeclaration
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2618
- def on_module(constant, bodystmt); end
-
- # :call-seq:
- # on_mrhs_add: (MRHS mrhs, untyped part) -> MRHS
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2650
- def on_mrhs_add(mrhs, part); end
-
- # :call-seq:
- # on_mrhs_add_star: (MRHS mrhs, untyped value) -> MRHS
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2659
- def on_mrhs_add_star(mrhs, value); end
-
- # :call-seq:
- # on_mrhs_new: () -> MRHS
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2640
- def on_mrhs_new; end
-
- # :call-seq:
- # on_mrhs_new_from_args: (Args arguments) -> MRHS
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2681
- def on_mrhs_new_from_args(arguments); end
-
- # :call-seq:
- # on_next: (Args arguments) -> Next
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2687
- def on_next(arguments); end
-
- # :call-seq:
- # on_op: (String value) -> Op
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2706
- def on_op(value); end
-
- # :call-seq:
- # on_opassign: (
- # (
- # ARefField |
- # ConstPathField |
- # Field |
- # TopConstField |
- # VarField
- # ) target,
- # Op operator,
- # untyped value
- # ) -> OpAssign
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2735
- def on_opassign(target, operator, value); end
-
- # If we encounter a parse error, just immediately bail out so that our
- # runner can catch it.
- #
- # @raise [ParseError]
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2863
- def on_param_error(error, *_arg1); end
-
- # :call-seq:
- # on_params: (
- # (nil | Array[Ident]) requireds,
- # (nil | Array[[Ident, untyped]]) optionals,
- # (nil | ArgsForward | ExcessedComma | RestParam) rest,
- # (nil | Array[Ident]) posts,
- # (nil | Array[[Ident, nil | untyped]]) keywords,
- # (nil | :nil | ArgsForward | KwRestParam) keyword_rest,
- # (nil | :& | BlockArg) block
- # ) -> Params
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2758
- def on_params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end
-
- # :call-seq:
- # on_paren: (untyped contents) -> Paren
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2823
- def on_paren(contents); end
-
- # If we encounter a parse error, just immediately bail out so that our
- # runner can catch it.
- #
- # @raise [ParseError]
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2863
- def on_parse_error(error, *_arg1); end
-
- # :call-seq:
- # on_period: (String value) -> Period
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2873
- def on_period(value); end
-
- # :call-seq:
- # on_program: (Statements statements) -> Program
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#2888
- def on_program(statements); end
-
- # :call-seq:
- # on_qsymbols_add: (QSymbols qsymbols, TStringContent element) -> QSymbols
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3000
- def on_qsymbols_add(qsymbols, element); end
-
- # :call-seq:
- # on_qsymbols_beg: (String value) -> QSymbolsBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3010
- def on_qsymbols_beg(value); end
-
- # :call-seq:
- # on_qsymbols_new: () -> QSymbols
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3029
- def on_qsymbols_new; end
-
- # :call-seq:
- # on_qwords_add: (QWords qwords, TStringContent element) -> QWords
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3041
- def on_qwords_add(qwords, element); end
-
- # :call-seq:
- # on_qwords_beg: (String value) -> QWordsBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3051
- def on_qwords_beg(value); end
-
- # :call-seq:
- # on_qwords_new: () -> QWords
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3070
- def on_qwords_new; end
-
- # :call-seq:
- # on_rational: (String value) -> RationalLiteral
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3082
- def on_rational(value); end
-
- # :call-seq:
- # on_rbrace: (String value) -> RBrace
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3097
- def on_rbrace(value); end
-
- # :call-seq:
- # on_rbracket: (String value) -> RBracket
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3116
- def on_rbracket(value); end
-
- # :call-seq:
- # on_redo: () -> Redo
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3135
- def on_redo; end
-
- # :call-seq:
- # on_regexp_add: (
- # RegexpContent regexp_content,
- # (StringDVar | StringEmbExpr | TStringContent) part
- # ) -> RegexpContent
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3146
- def on_regexp_add(regexp_content, part); end
-
- # :call-seq:
- # on_regexp_beg: (String value) -> RegexpBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3156
- def on_regexp_beg(value); end
-
- # :call-seq:
- # on_regexp_end: (String value) -> RegexpEnd
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3175
- def on_regexp_end(value); end
-
- # :call-seq:
- # on_regexp_literal: (
- # RegexpContent regexp_content,
- # (nil | RegexpEnd) ending
- # ) -> RegexpLiteral
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3193
- def on_regexp_literal(regexp_content, ending); end
-
- # :call-seq:
- # on_regexp_new: () -> RegexpContent
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3211
- def on_regexp_new; end
-
- # :call-seq:
- # on_rescue: (
- # (nil | [untyped] | MRHS | MRHSAddStar) exceptions,
- # (nil | Field | VarField) variable,
- # Statements statements,
- # (nil | Rescue) consequent
- # ) -> Rescue
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3228
- def on_rescue(exceptions, variable, statements, consequent); end
-
- # :call-seq:
- # on_rescue_mod: (untyped statement, untyped value) -> RescueMod
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3281
- def on_rescue_mod(statement, value); end
-
- # :call-seq:
- # on_rest_param: ((nil | Ident) name) -> RestParam
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3293
- def on_rest_param(name); end
-
- # :call-seq:
- # on_retry: () -> Retry
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3302
- def on_retry; end
-
- # :call-seq:
- # on_return: (Args arguments) -> ReturnNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3310
- def on_return(arguments); end
-
- # :call-seq:
- # on_return0: () -> ReturnNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3321
- def on_return0; end
-
- # :call-seq:
- # on_rparen: (String value) -> RParen
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3329
- def on_rparen(value); end
-
- # :call-seq:
- # on_sclass: (untyped target, BodyStmt bodystmt) -> SClass
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3348
- def on_sclass(target, bodystmt); end
-
- # :call-seq:
- # on_semicolon: (String value) -> Semicolon
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3381
- def on_semicolon(value); end
-
- # stmts_add is a parser event that represents a single statement inside a
- # list of statements within any lexical block. It accepts as arguments the
- # parent stmts node as well as an stmt which can be any expression in
- # Ruby.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3400
- def on_stmts_add(statements, statement); end
-
- # :call-seq:
- # on_stmts_new: () -> Statements
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3413
- def on_stmts_new; end
-
- # :call-seq:
- # on_string_add: (
- # String string,
- # (StringEmbExpr | StringDVar | TStringContent) part
- # ) -> StringContent
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3426
- def on_string_add(string, part); end
-
- # :call-seq:
- # on_string_concat: (
- # (StringConcat | StringLiteral) left,
- # StringLiteral right
- # ) -> StringConcat
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3443
- def on_string_concat(left, right); end
-
- # :call-seq:
- # on_string_content: () -> StringContent
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3453
- def on_string_content; end
-
- # :call-seq:
- # on_string_dvar: ((Backref | VarRef) variable) -> StringDVar
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3463
- def on_string_dvar(variable); end
-
- # :call-seq:
- # on_string_embexpr: (Statements statements) -> StringEmbExpr
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3474
- def on_string_embexpr(statements); end
-
- # :call-seq:
- # on_string_literal: (String string) -> Heredoc | StringLiteral
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3504
- def on_string_literal(string); end
-
- # :call-seq:
- # on_super: ((ArgParen | Args) arguments) -> Super
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3544
- def on_super(arguments); end
-
- # symbeg is a token that represents the beginning of a symbol literal. In
- # most cases it will contain just ":" as in the value, but if its a dynamic
- # symbol being defined it will contain ":'" or ":\"".
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3556
- def on_symbeg(value); end
-
- # :call-seq:
- # on_symbol: (
- # (Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op) value
- # ) -> SymbolContent
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3577
- def on_symbol(value); end
-
- # :call-seq:
- # on_symbol_literal: (
- # (
- # Backtick | Const | CVar | GVar | Ident |
- # IVar | Kw | Op | SymbolContent
- # ) value
- # ) -> SymbolLiteral
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3590
- def on_symbol_literal(value); end
-
- # :call-seq:
- # on_symbols_add: (Symbols symbols, Word word) -> Symbols
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3606
- def on_symbols_add(symbols, word); end
-
- # :call-seq:
- # on_symbols_beg: (String value) -> SymbolsBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3616
- def on_symbols_beg(value); end
-
- # :call-seq:
- # on_symbols_new: () -> Symbols
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3635
- def on_symbols_new; end
-
- # :call-seq:
- # on_tlambda: (String value) -> TLambda
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3647
- def on_tlambda(value); end
-
- # :call-seq:
- # on_tlambeg: (String value) -> TLamBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3666
- def on_tlambeg(value); end
-
- # :call-seq:
- # on_top_const_field: (Const constant) -> TopConstRef
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3685
- def on_top_const_field(constant); end
-
- # :call-seq:
- # on_top_const_ref: (Const constant) -> TopConstRef
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3696
- def on_top_const_ref(constant); end
-
- # :call-seq:
- # on_tstring_beg: (String value) -> TStringBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3707
- def on_tstring_beg(value); end
-
- # :call-seq:
- # on_tstring_content: (String value) -> TStringContent
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3726
- def on_tstring_content(value); end
-
- # :call-seq:
- # on_tstring_end: (String value) -> TStringEnd
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3741
- def on_tstring_end(value); end
-
- # :call-seq:
- # on_unary: (:not operator, untyped statement) -> Not
- # | (Symbol operator, untyped statement) -> Unary
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3761
- def on_unary(operator, statement); end
-
- # :call-seq:
- # on_undef: (Array[DynaSymbol | SymbolLiteral] symbols) -> Undef
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3804
- def on_undef(symbols); end
-
- # :call-seq:
- # on_unless: (
- # untyped predicate,
- # Statements statements,
- # ((nil | Elsif | Else) consequent)
- # ) -> UnlessNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3819
- def on_unless(predicate, statements, consequent); end
-
- # :call-seq:
- # on_unless_mod: (untyped predicate, untyped statement) -> UnlessNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3848
- def on_unless_mod(predicate, statement); end
-
- # :call-seq:
- # on_until: (untyped predicate, Statements statements) -> UntilNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3862
- def on_until(predicate, statements); end
-
- # :call-seq:
- # on_until_mod: (untyped predicate, untyped statement) -> UntilNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3893
- def on_until_mod(predicate, statement); end
-
- # :call-seq:
- # on_var_alias: (GVar left, (Backref | GVar) right) -> AliasNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3906
- def on_var_alias(left, right); end
-
- # :call-seq:
- # on_var_field: (
- # (nil | Const | CVar | GVar | Ident | IVar) value
- # ) -> VarField
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3920
- def on_var_field(value); end
-
- # :call-seq:
- # on_var_ref: ((Const | CVar | GVar | Ident | IVar | Kw) value) -> VarRef
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3935
- def on_var_ref(value); end
-
- # :call-seq:
- # on_vcall: (Ident ident) -> VCall
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3941
- def on_vcall(ident); end
-
- # :call-seq:
- # on_void_stmt: () -> VoidStmt
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3947
- def on_void_stmt; end
-
- # :call-seq:
- # on_when: (
- # Args arguments,
- # Statements statements,
- # (nil | Else | When) consequent
- # ) -> When
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3960
- def on_when(arguments, statements, consequent); end
-
- # :call-seq:
- # on_while: (untyped predicate, Statements statements) -> WhileNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3992
- def on_while(predicate, statements); end
-
- # :call-seq:
- # on_while_mod: (untyped predicate, untyped statement) -> WhileNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4023
- def on_while_mod(predicate, statement); end
-
- # :call-seq:
- # on_word_add: (
- # Word word,
- # (StringEmbExpr | StringDVar | TStringContent) part
- # ) -> Word
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4039
- def on_word_add(word, part); end
-
- # :call-seq:
- # on_word_new: () -> Word
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4048
- def on_word_new; end
-
- # :call-seq:
- # on_words_add: (Words words, Word word) -> Words
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4058
- def on_words_add(words, word); end
-
- # :call-seq:
- # on_words_beg: (String value) -> WordsBeg
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4068
- def on_words_beg(value); end
-
- # :call-seq:
- # on_words_new: () -> Words
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4087
- def on_words_new; end
-
- # :call-seq:
- # on_xstring_add: (
- # XString xstring,
- # (StringEmbExpr | StringDVar | TStringContent) part
- # ) -> XString
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4106
- def on_xstring_add(xstring, part); end
-
- # :call-seq:
- # on_xstring_literal: (XString xstring) -> Heredoc | XStringLiteral
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4130
- def on_xstring_literal(xstring); end
-
- # :call-seq:
- # on_xstring_new: () -> XString
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4115
- def on_xstring_new; end
-
- # :call-seq:
- # on_yield: ((Args | Paren) arguments) -> YieldNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4153
- def on_yield(arguments); end
-
- # :call-seq:
- # on_yield0: () -> YieldNode
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4164
- def on_yield0; end
-
- # :call-seq:
- # on_zsuper: () -> ZSuper
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#4172
- def on_zsuper; end
-end
-
-# Represents a line in the source. If this class is being used, it means
-# that there are characters in the string that are multi-byte, so we will
-# build up an array of indices, such that array[byteindex] will be equal to
-# the index of the character within the string.
-#
-# source://syntax_tree//lib/syntax_tree/parser.rb#38
-class SyntaxTree::Parser::MultiByteString
- # @return [MultiByteString] a new instance of MultiByteString
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#41
- def initialize(start, line); end
-
- # Technically it's possible for the column index to be a negative value if
- # there's a BOM at the beginning of the file, which is the reason we need
- # to compare it to 0 here.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#55
- def [](byteindex); end
-
- # Returns the value of attribute indices.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#39
- def indices; end
-
- # Returns the value of attribute start.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#39
- def start; end
-end
-
-# A special parser error so that we can get nice syntax displays on the
-# error message when prettier prints out the results.
-#
-# source://syntax_tree//lib/syntax_tree/parser.rb#9
-class SyntaxTree::Parser::ParseError < ::StandardError
- # @return [ParseError] a new instance of ParseError
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#12
- def initialize(error, lineno, column); end
-
- # Returns the value of attribute column.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#10
- def column; end
-
- # Returns the value of attribute lineno.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#10
- def lineno; end
-end
-
-# Ugh... I really do not like this class. Basically, ripper doesn't provide
-# enough information about where pins are located in the tree. It only gives
-# events for ^ ops and var_ref nodes. You have to piece it together
-# yourself.
-#
-# Note that there are edge cases here that we straight up do not address,
-# because I honestly think it's going to be faster to write a new parser
-# than to address them. For example, this will not work properly:
-#
-# foo in ^((bar = 0; bar; baz))
-#
-# If someone actually does something like that, we'll have to find another
-# way to make this work.
-#
-# source://syntax_tree//lib/syntax_tree/parser.rb#656
-class SyntaxTree::Parser::PinVisitor < ::SyntaxTree::Visitor
- # @return [PinVisitor] a new instance of PinVisitor
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#659
- def initialize(pins); end
-
- # Returns the value of attribute pins.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#657
- def pins; end
-
- # Returns the value of attribute stack.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#657
- def stack; end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#664
- def visit(node); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#672
- def visit_var_ref(node); end
-
- class << self
- # source://syntax_tree//lib/syntax_tree/parser.rb#677
- def visit(node, tokens); end
- end
-end
-
-# Semicolons are tokens that get added to the token list but never get
-# attached to the AST. Because of this they only need to track their
-# associated location so they can be used for computing bounds.
-#
-# source://syntax_tree//lib/syntax_tree/parser.rb#3371
-class SyntaxTree::Parser::Semicolon
- # @return [Semicolon] a new instance of Semicolon
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3374
- def initialize(location); end
-
- # Returns the value of attribute location.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#3372
- def location; end
-end
-
-# Represents a line in the source. If this class is being used, it means
-# that every character in the string is 1 byte in length, so we can just
-# return the start of the line + the index.
-#
-# source://syntax_tree//lib/syntax_tree/parser.rb#22
-class SyntaxTree::Parser::SingleByteString
- # @return [SingleByteString] a new instance of SingleByteString
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#25
- def initialize(start); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#29
- def [](byteindex); end
-
- # Returns the value of attribute start.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#23
- def start; end
-end
-
-# This represents all of the tokens coming back from the lexer. It is
-# replacing a simple array because it keeps track of the last deleted token
-# from the list for better error messages.
-#
-# source://syntax_tree//lib/syntax_tree/parser.rb#63
-class SyntaxTree::Parser::TokenList
- # @return [TokenList] a new instance of TokenList
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#66
- def initialize; end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#71
- def <<(token); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#75
- def [](index); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#79
- def any?(&block); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#91
- def delete(value); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#95
- def delete_at(index); end
-
- # Returns the value of attribute last_deleted.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#64
- def last_deleted; end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#83
- def reverse_each(&block); end
-
- # source://syntax_tree//lib/syntax_tree/parser.rb#87
- def rindex(&block); end
-
- # Returns the value of attribute tokens.
- #
- # source://syntax_tree//lib/syntax_tree/parser.rb#64
- def tokens; end
-end
-
-# A pattern is an object that wraps a Ruby pattern matching expression. The
-# expression would normally be passed to an `in` clause within a `case`
-# expression or a rightward assignment expression. For example, in the
-# following snippet:
-#
-# case node
-# in Const[value: "SyntaxTree"]
-# end
-#
-# the pattern is the `Const[value: "SyntaxTree"]` expression. Within Syntax
-# Tree, every node generates these kinds of expressions using the
-# #construct_keys method.
-#
-# The pattern gets compiled into an object that responds to call by running
-# the #compile method. This method itself will run back through Syntax Tree to
-# parse the expression into a tree, then walk the tree to generate the
-# necessary callable objects. For example, if you wanted to compile the
-# expression above into a callable, you would:
-#
-# callable = SyntaxTree::Pattern.new("Const[value: 'SyntaxTree']").compile
-# callable.call(node)
-#
-# The callable object returned by #compile is guaranteed to respond to #call
-# with a single argument, which is the node to match against. It also is
-# guaranteed to respond to #===, which means it itself can be used in a `case`
-# expression, as in:
-#
-# case node
-# when callable
-# end
-#
-# If the query given to the initializer cannot be compiled into a valid
-# matcher (either because of a syntax error or because it is using syntax we
-# do not yet support) then a SyntaxTree::Pattern::CompilationError will be
-# raised.
-#
-# source://syntax_tree//lib/syntax_tree/pattern.rb#39
-class SyntaxTree::Pattern
- # @return [Pattern] a new instance of Pattern
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#61
- def initialize(query); end
-
- # source://syntax_tree//lib/syntax_tree/pattern.rb#65
- def compile; end
-
- # Returns the value of attribute query.
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#59
- def query; end
-
- private
-
- # Shortcut for combining two procs into one that returns true if both return
- # true.
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#80
- def combine_and(left, right); end
-
- # Shortcut for combining two procs into one that returns true if either
- # returns true.
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#86
- def combine_or(left, right); end
-
- # in [foo, bar, baz]
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#109
- def compile_aryptn(node); end
-
- # in foo | bar
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#134
- def compile_binary(node); end
-
- # in Ident
- # in String
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#142
- def compile_const(node); end
-
- # in SyntaxTree::Ident
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#159
- def compile_const_path_ref(node); end
-
- # in :""
- # in :"foo"
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#172
- def compile_dyna_symbol(node); end
-
- # Raise an error because the given node is not supported.
- #
- # @raise [CompilationError]
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#91
- def compile_error(node); end
-
- # in Ident[value: String]
- # in { value: String }
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#188
- def compile_hshptn(node); end
-
- # Compile any kind of node. Dispatch out to the individual compilation
- # methods based on the type of node.
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#260
- def compile_node(node); end
-
- # in /foo/
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#214
- def compile_regexp_literal(node); end
-
- # in ""
- # in "foo"
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#226
- def compile_string_literal(node); end
-
- # in :+
- # in :foo
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#238
- def compile_symbol_literal(node); end
-
- # in Foo
- # in nil
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#246
- def compile_var_ref(node); end
-
- # There are a couple of nodes (string literals, dynamic symbols, and regexp)
- # that contain list of parts. This can include plain string content,
- # interpolated expressions, and interpolated variables. We only support
- # plain string content, so this method will extract out the plain string
- # content if it is the only element in the list.
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#100
- def extract_string(node); end
-end
-
-# Raised when the query given to a pattern is either invalid Ruby syntax or
-# is using syntax that we don't yet support.
-#
-# source://syntax_tree//lib/syntax_tree/pattern.rb#42
-class SyntaxTree::Pattern::CompilationError < ::StandardError
- # @return [CompilationError] a new instance of CompilationError
- #
- # source://syntax_tree//lib/syntax_tree/pattern.rb#43
- def initialize(repr); end
-end
-
-# Period represents the use of the +.+ operator. It is usually found in method
-# calls.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8569
-class SyntaxTree::Period < ::SyntaxTree::Node
- # @return [Period] a new instance of Period
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8576
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8611
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8582
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8586
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8574
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8590
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8586
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8603
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8607
- def format(q); end
-
- # [String] the period
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8571
- def value; end
-end
-
-# PinnedBegin represents a pinning a nested statement within pattern matching.
-#
-# case value
-# in ^(statement)
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#1962
-class SyntaxTree::PinnedBegin < ::SyntaxTree::Node
- # @return [PinnedBegin] a new instance of PinnedBegin
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1969
- def initialize(statement:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2014
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1975
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1979
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1967
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1983
- def copy(statement: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1979
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#1996
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#2000
- def format(q); end
-
- # [Node] the expression being pinned
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#1964
- def statement; end
-end
-
-# PinnedVarRef represents a pinned variable reference within a pattern
-# matching pattern.
-#
-# case value
-# in ^variable
-# end
-#
-# This can be a plain local variable like the example above. It can also be a
-# a class variable, a global variable, or an instance variable.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11677
-class SyntaxTree::PinnedVarRef < ::SyntaxTree::Node
- # @return [PinnedVarRef] a new instance of PinnedVarRef
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11684
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11722
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11690
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11694
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11682
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11698
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11694
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11711
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11715
- def format(q); end
-
- # [Const | CVar | GVar | Ident | IVar] the value of this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11679
- def value; end
-end
-
-# This visitor pretty-prints the AST into an equivalent s-expression.
-#
-# source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#5
-class SyntaxTree::PrettyPrintVisitor < ::SyntaxTree::FieldVisitor
- # @return [PrettyPrintVisitor] a new instance of PrettyPrintVisitor
- #
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#8
- def initialize(q); end
-
- # Returns the value of attribute q.
- #
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#6
- def q; end
-
- # This is here because we need to make sure the operator is cast to a string
- # before we print it out.
- #
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#14
- def visit_binary(node); end
-
- # This is here to make it a little nicer to look at labels since they
- # typically have their : at the end of the value.
- #
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#25
- def visit_label(node); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#36
- def comments(node); end
-
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#45
- def field(_name, value); end
-
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#50
- def list(_name, values); end
-
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#55
- def node(_node, type); end
-
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#62
- def pairs(_name, values); end
-
- # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#78
- def text(_name, value); end
-end
-
-# Program represents the overall syntax tree.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8617
-class SyntaxTree::Program < ::SyntaxTree::Node
- # @return [Program] a new instance of Program
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8624
- def initialize(statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8664
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8630
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8634
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8622
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8638
- def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8634
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8651
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8655
- def format(q); end
-
- # [Statements] the top-level expressions of the program
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8619
- def statements; end
-end
-
-# QSymbols represents a symbol literal array without interpolation.
-#
-# %i[one two three]
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8673
-class SyntaxTree::QSymbols < ::SyntaxTree::Node
- # @return [QSymbols] a new instance of QSymbols
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8683
- def initialize(beginning:, elements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8743
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8690
- def accept(visitor); end
-
- # [QSymbolsBeg] the token that opens this array literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8675
- def beginning; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8694
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8681
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8698
- def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8694
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8712
- def deconstruct_keys(_keys); end
-
- # [Array[ TStringContent ]] the elements of the array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8678
- def elements; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8721
- def format(q); end
-end
-
-# QSymbolsBeg represents the beginning of a symbol literal array.
-#
-# %i[one two three]
-#
-# In the snippet above, QSymbolsBeg represents the "%i[" token. Note that
-# these kinds of arrays can start with a lot of different delimiter types
-# (e.g., %i| or %i<).
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8756
-class SyntaxTree::QSymbolsBeg < ::SyntaxTree::Node
- # @return [QSymbolsBeg] a new instance of QSymbolsBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8760
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8786
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8765
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8769
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8773
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8769
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8782
- def deconstruct_keys(_keys); end
-
- # [String] the beginning of the array literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8758
- def value; end
-end
-
-# QWords represents a string literal array without interpolation.
-#
-# %w[one two three]
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8795
-class SyntaxTree::QWords < ::SyntaxTree::Node
- # @return [QWords] a new instance of QWords
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8805
- def initialize(beginning:, elements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8861
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8812
- def accept(visitor); end
-
- # [QWordsBeg] the token that opens this array literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8797
- def beginning; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8816
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8803
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8820
- def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8816
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8830
- def deconstruct_keys(_keys); end
-
- # [Array[ TStringContent ]] the elements of the array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8800
- def elements; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8839
- def format(q); end
-end
-
-# QWordsBeg represents the beginning of a string literal array.
-#
-# %w[one two three]
-#
-# In the snippet above, QWordsBeg represents the "%w[" token. Note that these
-# kinds of arrays can start with a lot of different delimiter types (e.g.,
-# %w| or %w<).
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8874
-class SyntaxTree::QWordsBeg < ::SyntaxTree::Node
- # @return [QWordsBeg] a new instance of QWordsBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8878
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8904
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8883
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8887
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8891
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8887
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8900
- def deconstruct_keys(_keys); end
-
- # [String] the beginning of the array literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8876
- def value; end
-end
-
-# Responsible for providing information about quotes to be used for strings
-# and dynamic symbols.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4612
-module SyntaxTree::Quotes
- class << self
- # If there is some part of this string that matches an escape sequence or
- # that contains the interpolation pattern ("#{"), then we are locked into
- # whichever quote the user chose. (If they chose single quotes, then double
- # quoting would activate the escape sequence, and if they chose double
- # quotes, then single quotes would deactivate it.)
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4621
- def locked?(node, quote); end
-
- # Find the matching closing quote for the given opening quote.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4628
- def matching(quote); end
-
- # Escape and unescape single and double quotes as needed to be able to
- # enclose +content+ with +enclosing+.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4634
- def normalize(content, enclosing); end
- end
-end
-
-# The matching pairs of quotes that can be used with % literals.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4614
-SyntaxTree::Quotes::PAIRS = T.let(T.unsafe(nil), Hash)
-
-# RAssign represents a single-line pattern match.
-#
-# value in pattern
-# value => pattern
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#3198
-class SyntaxTree::RAssign < ::SyntaxTree::Node
- # @return [RAssign] a new instance of RAssign
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3212
- def initialize(value:, operator:, pattern:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3274
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3220
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3224
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3210
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3228
- def copy(value: T.unsafe(nil), operator: T.unsafe(nil), pattern: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3224
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3243
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#3253
- def format(q); end
-
- # [Kw | Op] the operator being used to match against the pattern, which is
- # either => or in
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3204
- def operator; end
-
- # [Node] the pattern on the right-hand side of the expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3207
- def pattern; end
-
- # [Node] the left-hand expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#3200
- def value; end
-end
-
-# RBrace represents the use of a right brace, i.e., +++.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8961
-class SyntaxTree::RBrace < ::SyntaxTree::Node
- # @return [RBrace] a new instance of RBrace
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8965
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8991
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8970
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8974
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8978
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8974
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8987
- def deconstruct_keys(_keys); end
-
- # [String] the right brace
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8963
- def value; end
-end
-
-# RBracket represents the use of a right bracket, i.e., +]+.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8997
-class SyntaxTree::RBracket < ::SyntaxTree::Node
- # @return [RBracket] a new instance of RBracket
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9001
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9027
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9006
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9010
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9014
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9010
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9023
- def deconstruct_keys(_keys); end
-
- # [String] the right bracket
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8999
- def value; end
-end
-
-# RParen represents the use of a right parenthesis, i.e., +)+.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9767
-class SyntaxTree::RParen < ::SyntaxTree::Node
- # @return [RParen] a new instance of RParen
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9771
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9797
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9776
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9780
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9784
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9780
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9793
- def deconstruct_keys(_keys); end
-
- # [String] the parenthesis
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9769
- def value; end
-end
-
-# RangeNode represents using the .. or the ... operator between two
-# expressions. Usually this is to create a range object.
-#
-# 1..2
-#
-# Sometimes this operator is used to create a flip-flop.
-#
-# if value == 5 .. value == 10
-# end
-#
-# One of the sides of the expression may be nil, but not both.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#4537
-class SyntaxTree::RangeNode < ::SyntaxTree::Node
- # @return [RangeNode] a new instance of RangeNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4550
- def initialize(left:, operator:, right:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4604
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4558
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4562
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4548
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4566
- def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4562
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4581
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#4591
- def format(q); end
-
- # [nil | Node] the left side of the expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4539
- def left; end
-
- # [Op] the operator used for this range
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4542
- def operator; end
-
- # [nil | Node] the right side of the expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#4545
- def right; end
-end
-
-# RationalLiteral represents the use of a rational number literal.
-#
-# 1r
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#8913
-class SyntaxTree::RationalLiteral < ::SyntaxTree::Node
- # @return [RationalLiteral] a new instance of RationalLiteral
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8920
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8955
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8926
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8930
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8918
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8934
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8930
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8947
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#8951
- def format(q); end
-
- # [String] the rational number literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#8915
- def value; end
-end
-
-# Redo represents the use of the +redo+ keyword.
-#
-# redo
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9036
-class SyntaxTree::Redo < ::SyntaxTree::Node
- # @return [Redo] a new instance of Redo
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9040
- def initialize(location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9070
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9045
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9049
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9038
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9053
- def copy(location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9049
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9062
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9066
- def format(q); end
-end
-
-# RegexpBeg represents the start of a regular expression literal.
-#
-# /.+/
-#
-# In the example above, RegexpBeg represents the first / token. Regular
-# expression literals can also be declared using the %r syntax, as in:
-#
-# %r{.+}
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9132
-class SyntaxTree::RegexpBeg < ::SyntaxTree::Node
- # @return [RegexpBeg] a new instance of RegexpBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9136
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9162
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9141
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9145
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9149
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9145
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9158
- def deconstruct_keys(_keys); end
-
- # [String] the beginning of the regular expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9134
- def value; end
-end
-
-# RegexpContent represents the body of a regular expression.
-#
-# /.+ #{pattern} .+/
-#
-# In the example above, a RegexpContent node represents everything contained
-# within the forward slashes.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9081
-class SyntaxTree::RegexpContent < ::SyntaxTree::Node
- # @return [RegexpContent] a new instance of RegexpContent
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9089
- def initialize(beginning:, parts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9117
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9095
- def accept(visitor); end
-
- # [String] the opening of the regular expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9083
- def beginning; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9099
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9103
- def copy(beginning: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9099
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9113
- def deconstruct_keys(_keys); end
-
- # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the
- # regular expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9087
- def parts; end
-end
-
-# RegexpEnd represents the end of a regular expression literal.
-#
-# /.+/m
-#
-# In the example above, the RegexpEnd event represents the /m at the end of
-# the regular expression literal. You can also declare regular expression
-# literals using %r, as in:
-#
-# %r{.+}m
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9177
-class SyntaxTree::RegexpEnd < ::SyntaxTree::Node
- # @return [RegexpEnd] a new instance of RegexpEnd
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9181
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9207
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9186
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9190
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9194
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9190
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9203
- def deconstruct_keys(_keys); end
-
- # [String] the end of the regular expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9179
- def value; end
-end
-
-# RegexpLiteral represents a regular expression literal.
-#
-# /.+/
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9216
-class SyntaxTree::RegexpLiteral < ::SyntaxTree::Node
- # @return [RegexpLiteral] a new instance of RegexpLiteral
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9230
- def initialize(beginning:, ending:, parts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9312
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9238
- def accept(visitor); end
-
- # [String] the beginning of the regular expression literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9218
- def beginning; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9242
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9228
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9246
- def copy(beginning: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9242
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9261
- def deconstruct_keys(_keys); end
-
- # [String] the ending of the regular expression literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9221
- def ending; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9272
- def format(q); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9318
- def options; end
-
- # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the
- # regular expression literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9225
- def parts; end
-
- private
-
- # If the first part of this regex is plain string content, we have a space
- # or an =, and we're contained within a command or command_call node, then
- # we want to use braces because otherwise we could end up with an ambiguous
- # operator, e.g. foo / bar/ or foo /=bar/
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9334
- def ambiguous?(q); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9324
- def include?(pattern); end
-end
-
-# Rescue represents the use of the rescue keyword inside of a BodyStmt node.
-#
-# begin
-# rescue
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9424
-class SyntaxTree::Rescue < ::SyntaxTree::Node
- # @return [Rescue] a new instance of Rescue
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9440
- def initialize(keyword:, exception:, statements:, consequent:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9536
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9471
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9449
- def bind_end(end_char, end_column); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9475
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9438
- def comments; end
-
- # [nil | Rescue] the optional next clause in the chain
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9435
- def consequent; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9479
- def copy(keyword: T.unsafe(nil), exception: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9475
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9501
- def deconstruct_keys(_keys); end
-
- # [nil | RescueEx] the exceptions being rescued
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9429
- def exception; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9512
- def format(q); end
-
- # [Kw] the rescue keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9426
- def keyword; end
-
- # [Statements] the expressions to evaluate when an error is rescued
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9432
- def statements; end
-end
-
-# RescueEx represents the list of exceptions being rescued in a rescue clause.
-#
-# begin
-# rescue Exception => exception
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9349
-class SyntaxTree::RescueEx < ::SyntaxTree::Node
- # @return [RescueEx] a new instance of RescueEx
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9360
- def initialize(exceptions:, variable:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9412
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9367
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9371
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9358
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9375
- def copy(exceptions: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9371
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9389
- def deconstruct_keys(_keys); end
-
- # [nil | Node] the list of exceptions being rescued
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9351
- def exceptions; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9398
- def format(q); end
-
- # [nil | Field | VarField] the expression being used to capture the raised
- # exception
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9355
- def variable; end
-end
-
-# RescueMod represents the use of the modifier form of a +rescue+ clause.
-#
-# expression rescue value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9547
-class SyntaxTree::RescueMod < ::SyntaxTree::Node
- # @return [RescueMod] a new instance of RescueMod
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9557
- def initialize(statement:, value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9613
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9564
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9568
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9555
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9572
- def copy(statement: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9568
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9586
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9595
- def format(q); end
-
- # [Node] the expression to execute
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9549
- def statement; end
-
- # [Node] the value to use if the executed expression raises an error
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9552
- def value; end
-end
-
-# RestParam represents defining a parameter in a method definition that
-# accepts all remaining positional parameters.
-#
-# def method(*rest) end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9624
-class SyntaxTree::RestParam < ::SyntaxTree::Node
- # @return [RestParam] a new instance of RestParam
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9631
- def initialize(name:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9667
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9637
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9641
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9629
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9645
- def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9641
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9658
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9662
- def format(q); end
-
- # [nil | Ident] the name of the parameter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9626
- def name; end
-end
-
-# Retry represents the use of the +retry+ keyword.
-#
-# retry
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9676
-class SyntaxTree::Retry < ::SyntaxTree::Node
- # @return [Retry] a new instance of Retry
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9680
- def initialize(location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9710
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9685
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9689
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9678
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9693
- def copy(location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9689
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9702
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9706
- def format(q); end
-end
-
-# Return represents using the +return+ keyword with arguments.
-#
-# return value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9719
-class SyntaxTree::ReturnNode < ::SyntaxTree::Node
- # @return [ReturnNode] a new instance of ReturnNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9726
- def initialize(arguments:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9761
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9732
- def accept(visitor); end
-
- # [nil | Args] the arguments being passed to the keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9721
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9736
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9724
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9740
- def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9736
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9753
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9757
- def format(q); end
-end
-
-# SClass represents a block of statements that should be evaluated within the
-# context of the singleton class of an object. It's frequently used to define
-# singleton methods.
-#
-# class << self
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9809
-class SyntaxTree::SClass < ::SyntaxTree::Node
- # @return [SClass] a new instance of SClass
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9819
- def initialize(target:, bodystmt:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9870
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9826
- def accept(visitor); end
-
- # [BodyStmt] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9814
- def bodystmt; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9830
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9817
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9834
- def copy(target: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9830
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9848
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9857
- def format(q); end
-
- # [Node] the target of the singleton class to enter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9811
- def target; end
-end
-
-# Provides an interface for searching for a pattern of nodes against a
-# subtree of an AST.
-#
-# source://syntax_tree//lib/syntax_tree/search.rb#6
-class SyntaxTree::Search
- # @return [Search] a new instance of Search
- #
- # source://syntax_tree//lib/syntax_tree/search.rb#9
- def initialize(pattern); end
-
- # Returns the value of attribute pattern.
- #
- # source://syntax_tree//lib/syntax_tree/search.rb#7
- def pattern; end
-
- # source://syntax_tree//lib/syntax_tree/search.rb#13
- def scan(root); end
-end
-
-# Everything that has a block of code inside of it has a list of statements.
-# Normally we would just track those as a node that has an array body, but we
-# have some special handling in order to handle empty statement lists. They
-# need to have the right location information, so all of the parent node of
-# stmts nodes will report back down the location information. We then
-# propagate that onto void_stmt nodes inside the stmts in order to make sure
-# all comments get printed appropriately.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#9883
-class SyntaxTree::Statements < ::SyntaxTree::Node
- # @return [Statements] a new instance of Statements
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9890
- def initialize(body:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10016
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9943
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9896
- def bind(parser, start_char, start_column, end_char, end_column); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9925
- def bind_end(end_char, end_column); end
-
- # [Array[ Node ]] the list of expressions contained within this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9885
- def body; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9947
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9888
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9951
- def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9947
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9964
- def deconstruct_keys(_keys); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#9937
- def empty?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#9968
- def format(q); end
-
- private
-
- # As efficiently as possible, gather up all of the comments that have been
- # found while this statements list was being parsed and add them into the
- # body.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10025
- def attach_comments(parser, start_char, end_char); end
-end
-
-# StringConcat represents concatenating two strings together using a backward
-# slash.
-#
-# "first" \
-# "second"
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10140
-class SyntaxTree::StringConcat < ::SyntaxTree::Node
- # @return [StringConcat] a new instance of StringConcat
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10151
- def initialize(left:, right:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10195
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10158
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10162
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10149
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10166
- def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10162
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10180
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10184
- def format(q); end
-
- # [Heredoc | StringConcat | StringLiteral] the left side of the
- # concatenation
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10143
- def left; end
-
- # [StringLiteral] the right side of the concatenation
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10146
- def right; end
-end
-
-# StringContent represents the contents of a string-like value.
-#
-# "string"
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10067
-class SyntaxTree::StringContent < ::SyntaxTree::Node
- # @return [StringContent] a new instance of StringContent
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10075
- def initialize(parts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10102
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10081
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10085
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10073
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10089
- def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10085
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10098
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10106
- def format(q); end
-
- # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the
- # string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10070
- def parts; end
-end
-
-# StringDVar represents shorthand interpolation of a variable into a string.
-# It allows you to take an instance variable, class variable, or global
-# variable and omit the braces when interpolating.
-#
-# "#@variable"
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10206
-class SyntaxTree::StringDVar < ::SyntaxTree::Node
- # @return [StringDVar] a new instance of StringDVar
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10213
- def initialize(variable:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10250
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10219
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10223
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10211
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10227
- def copy(variable: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10223
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10240
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10244
- def format(q); end
-
- # [Backref | VarRef] the variable being interpolated
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10208
- def variable; end
-end
-
-# StringEmbExpr represents interpolated content. It can be contained within a
-# couple of different parent nodes, including regular expressions, strings,
-# and dynamic symbols.
-#
-# "string #{expression}"
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10261
-class SyntaxTree::StringEmbExpr < ::SyntaxTree::Node
- # @return [StringEmbExpr] a new instance of StringEmbExpr
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10268
- def initialize(statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10325
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10274
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10278
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10266
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10282
- def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10278
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10295
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10299
- def format(q); end
-
- # [Statements] the expressions to be interpolated
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10263
- def statements; end
-end
-
-# StringLiteral represents a string literal.
-#
-# "string"
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10334
-class SyntaxTree::StringLiteral < ::SyntaxTree::Node
- # @return [StringLiteral] a new instance of StringLiteral
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10345
- def initialize(parts:, quote:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10419
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10352
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10356
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10343
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10360
- def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10356
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10374
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10378
- def format(q); end
-
- # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the
- # string literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10337
- def parts; end
-
- # [nil | String] which quote was used by the string literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10340
- def quote; end
-end
-
-# Super represents using the +super+ keyword with arguments. It can optionally
-# use parentheses.
-#
-# super(value)
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10430
-class SyntaxTree::Super < ::SyntaxTree::Node
- # @return [Super] a new instance of Super
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10437
- def initialize(arguments:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10481
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10443
- def accept(visitor); end
-
- # [ArgParen | Args] the arguments to the keyword
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10432
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10447
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10435
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10451
- def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10447
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10464
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10468
- def format(q); end
-end
-
-# SymBeg represents the beginning of a symbol literal.
-#
-# :symbol
-#
-# SymBeg is also used for dynamic symbols, as in:
-#
-# :"symbol"
-#
-# Finally, SymBeg is also used for symbols using the %s syntax, as in:
-#
-# %s[symbol]
-#
-# The value of this node is a string. In most cases (as in the first example
-# above) it will contain just ":". In the case of dynamic symbols it will
-# contain ":'" or ":\"". In the case of %s symbols, it will contain the start
-# of the symbol including the %s and the delimiter.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10502
-class SyntaxTree::SymBeg < ::SyntaxTree::Node
- # @return [SymBeg] a new instance of SymBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10506
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10532
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10511
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10515
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10519
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10515
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10528
- def deconstruct_keys(_keys); end
-
- # [String] the beginning of the symbol
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10504
- def value; end
-end
-
-# SymbolContent represents symbol contents and is always the child of a
-# SymbolLiteral node.
-#
-# :symbol
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10542
-class SyntaxTree::SymbolContent < ::SyntaxTree::Node
- # @return [SymbolContent] a new instance of SymbolContent
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10547
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10573
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10552
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10556
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10560
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10556
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10569
- def deconstruct_keys(_keys); end
-
- # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op] the value of the
- # symbol
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10545
- def value; end
-end
-
-# SymbolLiteral represents a symbol in the system with no interpolation
-# (as opposed to a DynaSymbol which has interpolation).
-#
-# :symbol
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10583
-class SyntaxTree::SymbolLiteral < ::SyntaxTree::Node
- # @return [SymbolLiteral] a new instance of SymbolLiteral
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10591
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10628
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10597
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10601
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10589
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10605
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10601
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10618
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10622
- def format(q); end
-
- # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op | TStringContent]
- # the value of the symbol
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10586
- def value; end
-end
-
-# Symbols represents a symbol array literal with interpolation.
-#
-# %I[one two three]
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10637
-class SyntaxTree::Symbols < ::SyntaxTree::Node
- # @return [Symbols] a new instance of Symbols
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10647
- def initialize(beginning:, elements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10703
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10654
- def accept(visitor); end
-
- # [SymbolsBeg] the token that opens this array literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10639
- def beginning; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10658
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10645
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10662
- def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10658
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10672
- def deconstruct_keys(_keys); end
-
- # [Array[ Word ]] the words in the symbol array literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10642
- def elements; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10681
- def format(q); end
-end
-
-# SymbolsBeg represents the start of a symbol array literal with
-# interpolation.
-#
-# %I[one two three]
-#
-# In the snippet above, SymbolsBeg represents the "%I[" token. Note that these
-# kinds of arrays can start with a lot of different delimiter types
-# (e.g., %I| or %I<).
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10717
-class SyntaxTree::SymbolsBeg < ::SyntaxTree::Node
- # @return [SymbolsBeg] a new instance of SymbolsBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10721
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10747
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10726
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10730
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10734
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10730
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10743
- def deconstruct_keys(_keys); end
-
- # [String] the beginning of the symbol literal array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10719
- def value; end
-end
-
-# TLamBeg represents the beginning of the body of a lambda literal using
-# braces.
-#
-# -> { value }
-#
-# In the example above the TLamBeg represents the +{+ operator.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10798
-class SyntaxTree::TLamBeg < ::SyntaxTree::Node
- # @return [TLamBeg] a new instance of TLamBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10802
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10828
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10807
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10811
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10815
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10811
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10824
- def deconstruct_keys(_keys); end
-
- # [String] the beginning of the body of the lambda literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10800
- def value; end
-end
-
-# TLambda represents the beginning of a lambda literal.
-#
-# -> { value }
-#
-# In the example above the TLambda represents the +->+ operator.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10757
-class SyntaxTree::TLambda < ::SyntaxTree::Node
- # @return [TLambda] a new instance of TLambda
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10761
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10787
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10766
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10770
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10774
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10770
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10783
- def deconstruct_keys(_keys); end
-
- # [String] the beginning of the lambda literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10759
- def value; end
-end
-
-# TStringBeg represents the beginning of a string literal.
-#
-# "string"
-#
-# In the example above, TStringBeg represents the first set of quotes. Strings
-# can also use single quotes. They can also be declared using the +%q+ and
-# +%Q+ syntax, as in:
-#
-# %q{string}
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10950
-class SyntaxTree::TStringBeg < ::SyntaxTree::Node
- # @return [TStringBeg] a new instance of TStringBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10954
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10980
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10959
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10963
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10967
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10963
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10976
- def deconstruct_keys(_keys); end
-
- # [String] the beginning of the string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10952
- def value; end
-end
-
-# TStringContent represents plain characters inside of an entity that accepts
-# string content like a string, heredoc, command string, or regular
-# expression.
-#
-# "string"
-#
-# In the example above, TStringContent represents the +string+ token contained
-# within the string.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10993
-class SyntaxTree::TStringContent < ::SyntaxTree::Node
- # @return [TStringContent] a new instance of TStringContent
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11000
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11039
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11010
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11014
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10998
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11018
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11014
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11031
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11035
- def format(q); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11006
- def match?(pattern); end
-
- # [String] the content of the string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10995
- def value; end
-end
-
-# TStringEnd represents the end of a string literal.
-#
-# "string"
-#
-# In the example above, TStringEnd represents the second set of quotes.
-# Strings can also use single quotes. They can also be declared using the +%q+
-# and +%Q+ syntax, as in:
-#
-# %q{string}
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11054
-class SyntaxTree::TStringEnd < ::SyntaxTree::Node
- # @return [TStringEnd] a new instance of TStringEnd
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11058
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11084
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11063
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11067
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11071
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11067
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11080
- def deconstruct_keys(_keys); end
-
- # [String] the end of the string
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11056
- def value; end
-end
-
-# In order for an `if` or `unless` expression to be shortened to a ternary,
-# there has to be one and only one consequent clause which is an Else. Both
-# the body of the main node and the body of the Else node must have only one
-# statement, and that statement must not be on the denied list of potential
-# statements.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#6251
-module SyntaxTree::Ternaryable
- class << self
- # source://syntax_tree//lib/syntax_tree/node.rb#6253
- def call(q, node); end
-
- private
-
- # Certain expressions cannot be reduced to a ternary without adding
- # parentheses around them. In this case we say they cannot be ternaried
- # and default instead to breaking them into multiple lines.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#6291
- def ternaryable?(statement); end
- end
-end
-
-# TopConstField is always the child node of some kind of assignment. It
-# represents when you're assigning to a constant that is being referenced at
-# the top level.
-#
-# ::Constant = value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10839
-class SyntaxTree::TopConstField < ::SyntaxTree::Node
- # @return [TopConstField] a new instance of TopConstField
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10846
- def initialize(constant:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10882
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10852
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10856
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10844
- def comments; end
-
- # [Const] the constant being assigned
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10841
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10860
- def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10856
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10873
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10877
- def format(q); end
-end
-
-# TopConstRef is very similar to TopConstField except that it is not involved
-# in an assignment.
-#
-# ::Constant
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#10892
-class SyntaxTree::TopConstRef < ::SyntaxTree::Node
- # @return [TopConstRef] a new instance of TopConstRef
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10899
- def initialize(constant:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10935
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10905
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10909
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10897
- def comments; end
-
- # [Const] the constant being referenced
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#10894
- def constant; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10913
- def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10909
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10926
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#10930
- def format(q); end
-end
-
-# This module is responsible for translating the Syntax Tree syntax tree into
-# other representations.
-#
-# source://syntax_tree//lib/syntax_tree/translation.rb#6
-module SyntaxTree::Translation
- class << self
- # This method translates the given node into the representation defined by
- # the whitequark/parser gem. We don't explicitly list it as a dependency
- # because it's not required for the core functionality of Syntax Tree.
- #
- # source://syntax_tree//lib/syntax_tree/translation.rb#10
- def to_parser(node, buffer); end
-
- # This method translates the given node into the representation defined by
- # the rubocop/rubocop-ast gem. We don't explicitly list it as a dependency
- # because it's not required for the core functionality of Syntax Tree.
- #
- # source://syntax_tree//lib/syntax_tree/translation.rb#20
- def to_rubocop_ast(node, buffer); end
- end
-end
-
-# Unary represents a unary method being called on an expression, as in +!+ or
-# +~+.
-#
-# !value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11177
-class SyntaxTree::Unary < ::SyntaxTree::Node
- # @return [Unary] a new instance of Unary
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11187
- def initialize(operator:, statement:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11230
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11194
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11198
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11185
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11202
- def copy(operator: T.unsafe(nil), statement: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11198
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11216
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11225
- def format(q); end
-
- # [String] the operator being used
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11179
- def operator; end
-
- # [Node] the statement on which to operate
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11182
- def statement; end
-end
-
-# Undef represents the use of the +undef+ keyword.
-#
-# undef method
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11240
-class SyntaxTree::Undef < ::SyntaxTree::Node
- # @return [Undef] a new instance of Undef
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11271
- def initialize(symbols:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11314
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11277
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11281
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11269
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11285
- def copy(symbols: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11281
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11298
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11302
- def format(q); end
-
- # [Array[ DynaSymbol | SymbolLiteral ]] the symbols to undefine
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11266
- def symbols; end
-end
-
-# Undef accepts a variable number of arguments that can be either DynaSymbol
-# or SymbolLiteral objects. For SymbolLiteral objects we descend directly
-# into the value in order to have it come out as bare words.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11244
-class SyntaxTree::Undef::UndefArgumentFormatter
- # @return [UndefArgumentFormatter] a new instance of UndefArgumentFormatter
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11248
- def initialize(node); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11252
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11260
- def format(q); end
-
- # [DynaSymbol | SymbolLiteral] the symbol to undefine
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11246
- def node; end
-end
-
-# Unless represents the first clause in an +unless+ chain.
-#
-# unless predicate
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11324
-class SyntaxTree::UnlessNode < ::SyntaxTree::Node
- # @return [UnlessNode] a new instance of UnlessNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11337
- def initialize(predicate:, statements:, consequent:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11382
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11345
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11349
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11335
- def comments; end
-
- # [nil | Elsif | Else] the next clause in the chain
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11332
- def consequent; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11353
- def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11349
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11368
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11378
- def format(q); end
-
- # Checks if the node was originally found in the modifier form.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11388
- def modifier?; end
-
- # [Node] the expression to be checked
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11326
- def predicate; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11329
- def statements; end
-end
-
-# Until represents an +until+ loop.
-#
-# until predicate
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11470
-class SyntaxTree::UntilNode < ::SyntaxTree::Node
- # @return [UntilNode] a new instance of UntilNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11480
- def initialize(predicate:, statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11522
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11487
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11491
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11478
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11495
- def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11491
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11509
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11518
- def format(q); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11527
- def modifier?; end
-
- # [Node] the expression to be checked
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11472
- def predicate; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11475
- def statements; end
-end
-
-# VCall represent any plain named object with Ruby that could be either a
-# local variable or a method call.
-#
-# variable
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11732
-class SyntaxTree::VCall < ::SyntaxTree::Node
- # @return [VCall] a new instance of VCall
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11739
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11774
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11745
- def accept(visitor); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11778
- def access_control?; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11782
- def arity; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11749
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11737
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11753
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11749
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11766
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11770
- def format(q); end
-
- # [Ident] the value of this expression
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11734
- def value; end
-end
-
-# source://syntax_tree//lib/syntax_tree/version.rb#4
-SyntaxTree::VERSION = T.let(T.unsafe(nil), String)
-
-# VarField represents a variable that is being assigned a value. As such, it
-# is always a child of an assignment type node.
-#
-# variable = value
-#
-# In the example above, the VarField node represents the +variable+ token.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11538
-class SyntaxTree::VarField < ::SyntaxTree::Node
- # @return [VarField] a new instance of VarField
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11545
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11584
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11551
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11555
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11543
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11559
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11555
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11572
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11576
- def format(q); end
-
- # [nil | :nil | Const | CVar | GVar | Ident | IVar] the target of this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11540
- def value; end
-end
-
-# VarRef represents a variable reference.
-#
-# true
-#
-# This can be a plain local variable like the example above. It can also be a
-# constant, a class variable, a global variable, an instance variable, a
-# keyword (like +self+, +nil+, +true+, or +false+), or a numbered block
-# variable.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11597
-class SyntaxTree::VarRef < ::SyntaxTree::Node
- # @return [VarRef] a new instance of VarRef
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11604
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11639
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11610
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11614
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11602
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11618
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11614
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11631
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11635
- def format(q); end
-
- # Oh man I hate this so much. Basically, ripper doesn't provide enough
- # functionality to actually know where pins are within an expression. So we
- # have to walk the tree ourselves and insert more information. In doing so,
- # we have to replace this node by a pinned node when necessary.
- #
- # To be clear, this method should just not exist. It's not good. It's a
- # place of shame. But it's necessary for now, so I'm keeping it.
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11650
- def pin(parent, pin); end
-
- # [Const | CVar | GVar | Ident | IVar | Kw] the value of this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11599
- def value; end
-end
-
-# Visitor is a parent class that provides the ability to walk down the tree
-# and handle a subset of nodes. By defining your own subclass, you can
-# explicitly handle a node type by defining a visit_* method.
-#
-# source://syntax_tree//lib/syntax_tree/visitor.rb#7
-class SyntaxTree::Visitor < ::SyntaxTree::BasicVisitor
- # Visit a BEGINBlock node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_BEGIN(node); end
-
- # Visit a CHAR node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_CHAR(node); end
-
- # Visit an ENDBlock node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_END(node); end
-
- # Visit an EndContent node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit___end__(node); end
-
- # Visit an AliasNode node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_alias(node); end
-
- # Visit an ARef node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_aref(node); end
-
- # Visit an ARefField node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_aref_field(node); end
-
- # Visit an ArgBlock node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_arg_block(node); end
-
- # Visit an ArgParen node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_arg_paren(node); end
-
- # Visit an ArgStar node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_arg_star(node); end
-
- # Visit an Args node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_args(node); end
-
- # Visit an ArgsForward node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_args_forward(node); end
-
- # Visit an ArrayLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_array(node); end
-
- # Visit an AryPtn node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_aryptn(node); end
-
- # Visit an Assign node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_assign(node); end
-
- # Visit an Assoc node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_assoc(node); end
-
- # Visit an AssocSplat node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_assoc_splat(node); end
-
- # Visit a Backref node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_backref(node); end
-
- # Visit a Backtick node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_backtick(node); end
-
- # Visit a BareAssocHash node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_bare_assoc_hash(node); end
-
- # Visit a Begin node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_begin(node); end
-
- # Visit a Binary node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_binary(node); end
-
- # Visit a Block node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_block(node); end
-
- # Visit a BlockVar node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_block_var(node); end
-
- # Visit a BlockArg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_blockarg(node); end
-
- # Visit a BodyStmt node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_bodystmt(node); end
-
- # Visit a Break node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_break(node); end
-
- # Visit a Call node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_call(node); end
-
- # Visit a Case node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_case(node); end
-
- # Visit a ClassDeclaration node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_class(node); end
-
- # Visit a Comma node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_comma(node); end
-
- # Visit a Command node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_command(node); end
-
- # Visit a CommandCall node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_command_call(node); end
-
- # Visit a Comment node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_comment(node); end
-
- # Visit a Const node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_const(node); end
-
- # Visit a ConstPathField node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_const_path_field(node); end
-
- # Visit a ConstPathRef node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_const_path_ref(node); end
-
- # Visit a ConstRef node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_const_ref(node); end
-
- # Visit a CVar node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_cvar(node); end
-
- # Visit a Def node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_def(node); end
-
- # Visit a Defined node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_defined(node); end
-
- # Visit a DynaSymbol node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_dyna_symbol(node); end
-
- # Visit an Else node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_else(node); end
-
- # Visit an Elsif node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_elsif(node); end
-
- # Visit an EmbDoc node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_embdoc(node); end
-
- # Visit an EmbExprBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_embexpr_beg(node); end
-
- # Visit an EmbExprEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_embexpr_end(node); end
-
- # Visit an EmbVar node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_embvar(node); end
-
- # Visit an Ensure node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_ensure(node); end
-
- # Visit an ExcessedComma node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_excessed_comma(node); end
-
- # Visit a Field node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_field(node); end
-
- # Visit a FloatLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_float(node); end
-
- # Visit a FndPtn node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_fndptn(node); end
-
- # Visit a For node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_for(node); end
-
- # Visit a GVar node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_gvar(node); end
-
- # Visit a HashLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_hash(node); end
-
- # Visit a Heredoc node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_heredoc(node); end
-
- # Visit a HeredocBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_heredoc_beg(node); end
-
- # Visit a HeredocEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_heredoc_end(node); end
-
- # Visit a HshPtn node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_hshptn(node); end
-
- # Visit an Ident node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_ident(node); end
-
- # Visit an IfNode node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_if(node); end
-
- # Visit an IfOp node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_if_op(node); end
-
- # Visit an Imaginary node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_imaginary(node); end
-
- # Visit an In node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_in(node); end
-
- # Visit an Int node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_int(node); end
-
- # Visit an IVar node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_ivar(node); end
-
- # Visit a Kw node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_kw(node); end
-
- # Visit a KwRestParam node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_kwrest_param(node); end
-
- # Visit a Label node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_label(node); end
-
- # Visit a LabelEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_label_end(node); end
-
- # Visit a Lambda node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_lambda(node); end
-
- # Visit a LambdaVar node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_lambda_var(node); end
-
- # Visit a LBrace node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_lbrace(node); end
-
- # Visit a LBracket node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_lbracket(node); end
-
- # Visit a LParen node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_lparen(node); end
-
- # Visit a MAssign node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_massign(node); end
-
- # Visit a MethodAddBlock node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_method_add_block(node); end
-
- # Visit a MLHS node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_mlhs(node); end
-
- # Visit a MLHSParen node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_mlhs_paren(node); end
-
- # Visit a ModuleDeclaration node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_module(node); end
-
- # Visit a MRHS node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_mrhs(node); end
-
- # Visit a Next node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_next(node); end
-
- # Visit a Not node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_not(node); end
-
- # Visit an Op node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_op(node); end
-
- # Visit an OpAssign node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_opassign(node); end
-
- # Visit a Params node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_params(node); end
-
- # Visit a Paren node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_paren(node); end
-
- # Visit a Period node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_period(node); end
-
- # Visit a PinnedBegin node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_pinned_begin(node); end
-
- # Visit a PinnedVarRef node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_pinned_var_ref(node); end
-
- # Visit a Program node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_program(node); end
-
- # Visit a QSymbols node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_qsymbols(node); end
-
- # Visit a QSymbolsBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_qsymbols_beg(node); end
-
- # Visit a QWords node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_qwords(node); end
-
- # Visit a QWordsBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_qwords_beg(node); end
-
- # Visit a RangeNode node
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_range(node); end
-
- # Visit a RAssign node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rassign(node); end
-
- # Visit a RationalLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rational(node); end
-
- # Visit a RBrace node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rbrace(node); end
-
- # Visit a RBracket node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rbracket(node); end
-
- # Visit a Redo node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_redo(node); end
-
- # Visit a RegexpBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_regexp_beg(node); end
-
- # Visit a RegexpContent node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_regexp_content(node); end
-
- # Visit a RegexpEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_regexp_end(node); end
-
- # Visit a RegexpLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_regexp_literal(node); end
-
- # Visit a Rescue node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rescue(node); end
-
- # Visit a RescueEx node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rescue_ex(node); end
-
- # Visit a RescueMod node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rescue_mod(node); end
-
- # Visit a RestParam node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rest_param(node); end
-
- # Visit a Retry node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_retry(node); end
-
- # Visit a Return node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_return(node); end
-
- # Visit a RParen node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_rparen(node); end
-
- # Visit a SClass node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_sclass(node); end
-
- # Visit a Statements node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_statements(node); end
-
- # Visit a StringConcat node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_string_concat(node); end
-
- # Visit a StringContent node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_string_content(node); end
-
- # Visit a StringDVar node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_string_dvar(node); end
-
- # Visit a StringEmbExpr node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_string_embexpr(node); end
-
- # Visit a StringLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_string_literal(node); end
-
- # Visit a Super node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_super(node); end
-
- # Visit a SymBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_symbeg(node); end
-
- # Visit a SymbolContent node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_symbol_content(node); end
-
- # Visit a SymbolLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_symbol_literal(node); end
-
- # Visit a Symbols node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_symbols(node); end
-
- # Visit a SymbolsBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_symbols_beg(node); end
-
- # Visit a TLambda node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_tlambda(node); end
-
- # Visit a TLamBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_tlambeg(node); end
-
- # Visit a TopConstField node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_top_const_field(node); end
-
- # Visit a TopConstRef node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_top_const_ref(node); end
-
- # Visit a TStringBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_tstring_beg(node); end
-
- # Visit a TStringContent node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_tstring_content(node); end
-
- # Visit a TStringEnd node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_tstring_end(node); end
-
- # Visit an Unary node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_unary(node); end
-
- # Visit an Undef node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_undef(node); end
-
- # Visit an UnlessNode node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_unless(node); end
-
- # Visit an UntilNode node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_until(node); end
-
- # Visit a VarField node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_var_field(node); end
-
- # Visit a VarRef node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_var_ref(node); end
-
- # Visit a VCall node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_vcall(node); end
-
- # Visit a VoidStmt node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_void_stmt(node); end
-
- # Visit a When node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_when(node); end
-
- # Visit a WhileNode node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_while(node); end
-
- # Visit a Word node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_word(node); end
-
- # Visit a Words node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_words(node); end
-
- # Visit a WordsBeg node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_words_beg(node); end
-
- # Visit a XString node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_xstring(node); end
-
- # Visit a XStringLiteral node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_xstring_literal(node); end
-
- # Visit a YieldNode node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_yield(node); end
-
- # Visit a ZSuper node.
- #
- # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113
- def visit_zsuper(node); end
-end
-
-# VoidStmt represents an empty lexical block of code.
-#
-# ;;
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11791
-class SyntaxTree::VoidStmt < ::SyntaxTree::Node
- # @return [VoidStmt] a new instance of VoidStmt
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11795
- def initialize(location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11824
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11800
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11804
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11793
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11808
- def copy(location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11804
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11817
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11821
- def format(q); end
-end
-
-# When represents a +when+ clause in a +case+ chain.
-#
-# case value
-# when predicate
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11835
-class SyntaxTree::When < ::SyntaxTree::Node
- # @return [When] a new instance of When
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11848
- def initialize(arguments:, statements:, consequent:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11940
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11856
- def accept(visitor); end
-
- # [Args] the arguments to the when clause
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11837
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11860
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11846
- def comments; end
-
- # [nil | Else | When] the next clause in the chain
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11843
- def consequent; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11864
- def copy(arguments: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11860
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11879
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11905
- def format(q); end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11840
- def statements; end
-end
-
-# We're going to keep a single instance of this separator around so we don't
-# have to allocate a new one every time we format a when clause.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11903
-SyntaxTree::When::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::When::Separator)
-
-# We have a special separator here for when clauses which causes them to
-# fill as much of the line as possible as opposed to everything breaking
-# into its own line as soon as you hit the print limit.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11892
-class SyntaxTree::When::Separator
- # source://syntax_tree//lib/syntax_tree/node.rb#11893
- def call(q); end
-end
-
-# While represents a +while+ loop.
-#
-# while predicate
-# end
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#11951
-class SyntaxTree::WhileNode < ::SyntaxTree::Node
- # @return [WhileNode] a new instance of WhileNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11961
- def initialize(predicate:, statements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12003
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11968
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11972
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11959
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11976
- def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11972
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11990
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#11999
- def format(q); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12008
- def modifier?; end
-
- # [Node] the expression to be checked
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11953
- def predicate; end
-
- # [Statements] the expressions to be executed
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#11956
- def statements; end
-end
-
-# WithScope is a module intended to be included in classes inheriting from
-# Visitor. The module overrides a few visit methods to automatically keep
-# track of local variables and arguments defined in the current scope.
-# Example usage:
-#
-# class MyVisitor < Visitor
-# include WithScope
-#
-# def visit_ident(node)
-# # Check if we're visiting an identifier for an argument, a local
-# # variable or something else
-# local = current_scope.find_local(node)
-#
-# if local.type == :argument
-# # handle identifiers for arguments
-# elsif local.type == :variable
-# # handle identifiers for variables
-# else
-# # handle other identifiers, such as method names
-# end
-# end
-# end
-#
-# source://syntax_tree//lib/syntax_tree/with_scope.rb#27
-module SyntaxTree::WithScope
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#122
- def initialize(*args, **kwargs, &block); end
-
- # Returns the value of attribute current_scope.
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#120
- def current_scope; end
-
- # Visit for capturing local variables defined in regex named capture groups
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#239
- def visit_binary(node); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#192
- def visit_block_var(node); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#185
- def visit_blockarg(node); end
-
- # Visits for nodes that create new scopes, such as classes, modules
- # and method definitions.
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#131
- def visit_class(node); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#147
- def visit_def(node); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#178
- def visit_kwrest_param(node); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#192
- def visit_lambda_var(node); end
-
- # When we find a method invocation with a block, only the code that happens
- # inside of the block needs a fresh scope. The method invocation
- # itself happens in the same scope.
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#142
- def visit_method_add_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#135
- def visit_module(node); end
-
- # Visit for keeping track of local arguments, such as method and block
- # arguments.
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#153
- def visit_params(node); end
-
- # Visit for keeping track of local variable definitions
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#210
- def visit_pinned_var_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#171
- def visit_rest_param(node); end
-
- # Visit for keeping track of local variable definitions
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#202
- def visit_var_field(node); end
-
- # Visits for keeping track of variable and argument usages
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#218
- def visit_var_ref(node); end
-
- # When using regex named capture groups, vcalls might actually be a variable
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#230
- def visit_vcall(node); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#288
- def add_argument_definitions(list); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#302
- def next_scope_id; end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#306
- def with_scope(parent_scope = T.unsafe(nil)); end
-end
-
-# The scope class is used to keep track of local variables and arguments
-# inside a particular scope.
-#
-# source://syntax_tree//lib/syntax_tree/with_scope.rb#30
-class SyntaxTree::WithScope::Scope
- # @return [Scope] a new instance of Scope
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#68
- def initialize(id, parent = T.unsafe(nil)); end
-
- # Adding a local definition will either insert a new entry in the locals
- # hash or append a new definition location to an existing local. Notice
- # that it's not possible to change the type of a local after it has been
- # registered.
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#78
- def add_local_definition(identifier, type); end
-
- # Adding a local usage will either insert a new entry in the locals
- # hash or append a new usage location to an existing local. Notice that
- # it's not possible to change the type of a local after it has been
- # registered.
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#95
- def add_local_usage(identifier, type); end
-
- # Try to find the local given its name in this scope or any of its
- # parents.
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#102
- def find_local(name); end
-
- # [Integer] a unique identifier for this scope
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#59
- def id; end
-
- # [Hash[String, Local]] The local variables and arguments defined in this
- # scope
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#66
- def locals; end
-
- # [scope | nil] The parent scope
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#62
- def parent; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#108
- def resolve_local(name, type); end
-end
-
-# This class tracks the occurrences of a local variable or argument.
-#
-# source://syntax_tree//lib/syntax_tree/with_scope.rb#32
-class SyntaxTree::WithScope::Scope::Local
- # @return [Local] a new instance of Local
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#43
- def initialize(type); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#49
- def add_definition(location); end
-
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#53
- def add_usage(location); end
-
- # [Array[Location]] The locations of all definitions and assignments of
- # this local
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#38
- def definitions; end
-
- # [Symbol] The type of the local (e.g. :argument, :variable)
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#34
- def type; end
-
- # [Array[Location]] The locations of all usages of this local
- #
- # source://syntax_tree//lib/syntax_tree/with_scope.rb#41
- def usages; end
-end
-
-# Word represents an element within a special array literal that accepts
-# interpolation.
-#
-# %W[a#{b}c xyz]
-#
-# In the example above, there would be two Word nodes within a parent Words
-# node.
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#12020
-class SyntaxTree::Word < ::SyntaxTree::Node
- # @return [Word] a new instance of Word
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12028
- def initialize(parts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12067
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12038
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12042
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12026
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12046
- def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12042
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12059
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12063
- def format(q); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12034
- def match?(pattern); end
-
- # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the
- # word
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12023
- def parts; end
-end
-
-# Words represents a string literal array with interpolation.
-#
-# %W[one two three]
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#12076
-class SyntaxTree::Words < ::SyntaxTree::Node
- # @return [Words] a new instance of Words
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12086
- def initialize(beginning:, elements:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12142
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12093
- def accept(visitor); end
-
- # [WordsBeg] the token that opens this array literal
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12078
- def beginning; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12097
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12084
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12101
- def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12097
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12111
- def deconstruct_keys(_keys); end
-
- # [Array[ Word ]] the elements of this array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12081
- def elements; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12120
- def format(q); end
-end
-
-# WordsBeg represents the beginning of a string literal array with
-# interpolation.
-#
-# %W[one two three]
-#
-# In the snippet above, a WordsBeg would be created with the value of "%W[".
-# Note that these kinds of arrays can start with a lot of different delimiter
-# types (e.g., %W| or %W<).
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#12156
-class SyntaxTree::WordsBeg < ::SyntaxTree::Node
- # @return [WordsBeg] a new instance of WordsBeg
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12160
- def initialize(value:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12186
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12165
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12169
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12173
- def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12169
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12182
- def deconstruct_keys(_keys); end
-
- # [String] the start of the word literal array
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12158
- def value; end
-end
-
-# XString represents the contents of an XStringLiteral.
-#
-# `ls`
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#12195
-class SyntaxTree::XString < ::SyntaxTree::Node
- # @return [XString] a new instance of XString
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12200
- def initialize(parts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12226
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12205
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12209
- def child_nodes; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12213
- def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12209
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12222
- def deconstruct_keys(_keys); end
-
- # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the
- # xstring
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12198
- def parts; end
-end
-
-# XStringLiteral represents a string that gets executed.
-#
-# `ls`
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#12235
-class SyntaxTree::XStringLiteral < ::SyntaxTree::Node
- # @return [XStringLiteral] a new instance of XStringLiteral
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12243
- def initialize(parts:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12280
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12249
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12253
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12241
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12257
- def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12253
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12270
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12274
- def format(q); end
-
- # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the
- # xstring
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12238
- def parts; end
-end
-
-# This module provides an object representation of the YARV bytecode.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#4
-module SyntaxTree::YARV
- class << self
- # A convenience method for creating a CallData object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#82
- def calldata(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end
-
- # Compile the given source into a YARV instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv.rb#25
- def compile(source, options = T.unsafe(nil)); end
-
- # Compile and interpret the given source.
- #
- # source://syntax_tree//lib/syntax_tree/yarv.rb#30
- def interpret(source, options = T.unsafe(nil)); end
- end
-end
-
-# ### Summary
-#
-# `adjuststack` accepts a single integer argument and removes that many
-# elements from the top of the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# x = [true]
-# x[0] ||= nil
-# x[0]
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#69
-class SyntaxTree::YARV::AdjustStack < ::SyntaxTree::YARV::Instruction
- # @return [AdjustStack] a new instance of AdjustStack
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#72
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#88
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#100
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#84
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#76
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#92
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#70
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#96
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#80
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `anytostring` ensures that the value on top of the stack is a string.
-#
-# It pops two values off the stack. If the first value is a string it
-# pushes it back on the stack. If the first value is not a string, it uses
-# Ruby's built in string coercion to coerce the second value to a string
-# and then pushes that back on the stack.
-#
-# This is used in conjunction with `objtostring` as a fallback for when an
-# object's `to_s` method does not return a string.
-#
-# ### Usage
-#
-# ~~~ruby
-# "#{5}"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#123
-class SyntaxTree::YARV::AnyToString < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#136
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#148
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#132
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#124
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#140
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#144
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#128
- def to_a(_iseq); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#5
-class SyntaxTree::YARV::Assembler
- # @return [Assembler] a new instance of Assembler
- #
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#67
- def initialize(lines); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#71
- def assemble; end
-
- # Returns the value of attribute lines.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#65
- def lines; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#89
- def assemble_iseq(iseq, lines); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#409
- def find_local(iseq, operands); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#418
- def parse(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#450
- def parse_calldata(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#445
- def parse_nested(lines); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#433
- def parse_number(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#425
- def parse_options(value, options); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#437
- def parse_string(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#441
- def parse_symbol(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#429
- def parse_type(value, type); end
-
- class << self
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#79
- def assemble(source); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#83
- def assemble_file(filepath); end
- end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#28
-SyntaxTree::YARV::Assembler::CALLDATA_FLAGS = T.let(T.unsafe(nil), Hash)
-
-# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#44
-SyntaxTree::YARV::Assembler::DEFINED_TYPES = T.let(T.unsafe(nil), Array)
-
-# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#6
-class SyntaxTree::YARV::Assembler::ObjectVisitor < ::SyntaxTree::YARV::Compiler::RubyVisitor
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#7
- def visit_dyna_symbol(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#15
- def visit_string_literal(node); end
-end
-
-# This object represents a single basic block, wherein all contained
-# instructions do not branch except for the last one.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#7
-class SyntaxTree::YARV::BasicBlock
- # @return [BasicBlock] a new instance of BasicBlock
- #
- # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#23
- def initialize(block_start, insns); end
-
- # This is the index into the list of instructions where this block starts.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#12
- def block_start; end
-
- # Yield each instruction in this basic block along with its index from the
- # original instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#35
- def each_with_length; end
-
- # This is the unique identifier for this basic block.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#9
- def id; end
-
- # This is an array of basic blocks that lead into this block.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#18
- def incoming_blocks; end
-
- # This is the set of instructions that this block contains.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#15
- def insns; end
-
- # This is an array of basic blocks that this block leads into.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#21
- def outgoing_blocks; end
-
- # This method is used to verify that the basic block is well formed. It
- # checks that the only instruction in this basic block that branches is
- # the last instruction.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#48
- def verify; end
-end
-
-# Parses the given source code into a syntax tree, compiles that syntax tree
-# into YARV bytecode.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/bf.rb#7
-class SyntaxTree::YARV::Bf
- # @return [Bf] a new instance of Bf
- #
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#10
- def initialize(source); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#14
- def compile; end
-
- # Returns the value of attribute source.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#8
- def source; end
-
- private
-
- # $tape[$cursor] += value
- #
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#84
- def change_by(iseq, value); end
-
- # $tape[$cursor] = $stdin.getc.ord
- #
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#133
- def input_char(iseq); end
-
- # Jump back to the start of the loop.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#163
- def loop_end(iseq, start_label, end_label); end
-
- # unless $tape[$cursor] == 0
- #
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#146
- def loop_start(iseq); end
-
- # $stdout.putc($tape[$cursor].chr)
- #
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#120
- def output_char(iseq); end
-
- # $cursor += value
- #
- # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#105
- def shift_by(iseq, value); end
-end
-
-# ### Summary
-#
-# `branchif` has one argument: the jump index. It pops one value off the
-# stack: the jump condition.
-#
-# If the value popped off the stack is true, `branchif` jumps to
-# the jump index and continues executing there.
-#
-# ### Usage
-#
-# ~~~ruby
-# x = true
-# x ||= "foo"
-# puts x
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#175
-class SyntaxTree::YARV::BranchIf < ::SyntaxTree::YARV::Instruction
- # @return [BranchIf] a new instance of BranchIf
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#178
- def initialize(label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#194
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#210
- def branch_targets; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#206
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#190
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#182
- def disasm(fmt); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#214
- def falls_through?; end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#176
- def label; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#198
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#202
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#186
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `branchnil` has one argument: the jump index. It pops one value off the
-# stack: the jump condition.
-#
-# If the value popped off the stack is nil, `branchnil` jumps to
-# the jump index and continues executing there.
-#
-# ### Usage
-#
-# ~~~ruby
-# x = nil
-# if x&.to_s
-# puts "hi"
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#236
-class SyntaxTree::YARV::BranchNil < ::SyntaxTree::YARV::Instruction
- # @return [BranchNil] a new instance of BranchNil
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#239
- def initialize(label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#255
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#271
- def branch_targets; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#267
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#251
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#243
- def disasm(fmt); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#275
- def falls_through?; end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#237
- def label; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#259
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#263
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#247
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `branchunless` has one argument: the jump index. It pops one value off
-# the stack: the jump condition.
-#
-# If the value popped off the stack is false or nil, `branchunless` jumps
-# to the jump index and continues executing there.
-#
-# ### Usage
-#
-# ~~~ruby
-# if 2 + 3
-# puts "foo"
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#296
-class SyntaxTree::YARV::BranchUnless < ::SyntaxTree::YARV::Instruction
- # @return [BranchUnless] a new instance of BranchUnless
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#299
- def initialize(label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#315
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#331
- def branch_targets; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#327
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#311
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#303
- def disasm(fmt); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#335
- def falls_through?; end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#297
- def label; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#319
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#323
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#307
- def to_a(_iseq); end
-end
-
-# This is an operand to various YARV instructions that represents the
-# information about a specific call site.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#7
-class SyntaxTree::YARV::CallData
- # @return [CallData] a new instance of CallData
- #
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#24
- def initialize(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end
-
- # Returns the value of attribute argc.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22
- def argc; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#36
- def flag?(mask); end
-
- # Returns the value of attribute flags.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22
- def flags; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#46
- def inspect; end
-
- # Returns the value of attribute kw_arg.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22
- def kw_arg; end
-
- # Returns the value of attribute method.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22
- def method; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#40
- def to_h; end
-
- class << self
- # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#71
- def from(serialized); end
- end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#9
-SyntaxTree::YARV::CallData::CALL_ARGS_BLOCKARG = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#12
-SyntaxTree::YARV::CallData::CALL_ARGS_SIMPLE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#8
-SyntaxTree::YARV::CallData::CALL_ARGS_SPLAT = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#13
-SyntaxTree::YARV::CallData::CALL_BLOCKISEQ = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#10
-SyntaxTree::YARV::CallData::CALL_FCALL = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#14
-SyntaxTree::YARV::CallData::CALL_KWARG = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#15
-SyntaxTree::YARV::CallData::CALL_KW_SPLAT = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#20
-SyntaxTree::YARV::CallData::CALL_KW_SPLAT_MUT = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#19
-SyntaxTree::YARV::CallData::CALL_OPT_SEND = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#17
-SyntaxTree::YARV::CallData::CALL_SUPER = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#16
-SyntaxTree::YARV::CallData::CALL_TAILCALL = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#11
-SyntaxTree::YARV::CallData::CALL_VCALL = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#18
-SyntaxTree::YARV::CallData::CALL_ZSUPER = T.let(T.unsafe(nil), Integer)
-
-# ### Summary
-#
-# `checkkeyword` checks if a keyword was passed at the callsite that
-# called into the method represented by the instruction sequence. It has
-# two arguments: the index of the local variable that stores the keywords
-# metadata and the index of the keyword within that metadata. It pushes
-# a boolean onto the stack indicating whether or not the keyword was
-# given.
-#
-# ### Usage
-#
-# ~~~ruby
-# def evaluate(value: rand)
-# value
-# end
-#
-# evaluate(value: 3)
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#359
-class SyntaxTree::YARV::CheckKeyword < ::SyntaxTree::YARV::Instruction
- # @return [CheckKeyword] a new instance of CheckKeyword
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#362
- def initialize(keyword_bits_index, keyword_index); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#386
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#400
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#382
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#367
- def disasm(fmt); end
-
- # Returns the value of attribute keyword_bits_index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360
- def keyword_bits_index; end
-
- # Returns the value of attribute keyword_index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360
- def keyword_index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#392
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#396
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#374
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `checkmatch` checks if the current pattern matches the current value. It
-# pops the target and the pattern off the stack and pushes a boolean onto
-# the stack if it matches or not.
-#
-# ### Usage
-#
-# ~~~ruby
-# foo in Foo
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#417
-class SyntaxTree::YARV::CheckMatch < ::SyntaxTree::YARV::Instruction
- # @return [CheckMatch] a new instance of CheckMatch
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#426
- def initialize(type); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#442
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#458
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#438
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#430
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#446
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#450
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#454
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#434
- def to_a(_iseq); end
-
- # Returns the value of attribute type.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#424
- def type; end
-
- private
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#472
- def check?(pattern, target); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#422
-SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_ARRAY = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#419
-SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_CASE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#421
-SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_MASK = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#420
-SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_RESCUE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#418
-SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_WHEN = T.let(T.unsafe(nil), Integer)
-
-# ### Summary
-#
-# `checktype` checks if the value on top of the stack is of a certain type.
-# The type is the only argument. It pops the value off the stack and pushes
-# a boolean onto the stack indicating whether or not the value is of the
-# given type.
-#
-# ### Usage
-#
-# ~~~ruby
-# foo in [bar]
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#501
-class SyntaxTree::YARV::CheckType < ::SyntaxTree::YARV::Instruction
- # @return [CheckType] a new instance of CheckType
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#526
- def initialize(type); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#588
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#608
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#584
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#530
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#592
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#596
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#600
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#580
- def to_a(_iseq); end
-
- # Returns the value of attribute type.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#524
- def type; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#508
-SyntaxTree::YARV::CheckType::TYPE_ARRAY = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#511
-SyntaxTree::YARV::CheckType::TYPE_BIGNUM = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#503
-SyntaxTree::YARV::CheckType::TYPE_CLASS = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#515
-SyntaxTree::YARV::CheckType::TYPE_COMPLEX = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#513
-SyntaxTree::YARV::CheckType::TYPE_DATA = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#519
-SyntaxTree::YARV::CheckType::TYPE_FALSE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#512
-SyntaxTree::YARV::CheckType::TYPE_FILE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#521
-SyntaxTree::YARV::CheckType::TYPE_FIXNUM = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#505
-SyntaxTree::YARV::CheckType::TYPE_FLOAT = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#509
-SyntaxTree::YARV::CheckType::TYPE_HASH = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#514
-SyntaxTree::YARV::CheckType::TYPE_MATCH = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#504
-SyntaxTree::YARV::CheckType::TYPE_MODULE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#517
-SyntaxTree::YARV::CheckType::TYPE_NIL = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#502
-SyntaxTree::YARV::CheckType::TYPE_OBJECT = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#516
-SyntaxTree::YARV::CheckType::TYPE_RATIONAL = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#507
-SyntaxTree::YARV::CheckType::TYPE_REGEXP = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#506
-SyntaxTree::YARV::CheckType::TYPE_STRING = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#510
-SyntaxTree::YARV::CheckType::TYPE_STRUCT = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#520
-SyntaxTree::YARV::CheckType::TYPE_SYMBOL = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#518
-SyntaxTree::YARV::CheckType::TYPE_TRUE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#522
-SyntaxTree::YARV::CheckType::TYPE_UNDEF = T.let(T.unsafe(nil), Integer)
-
-# This class is an experiment in transforming Syntax Tree nodes into their
-# corresponding YARV instruction sequences. It attempts to mirror the
-# behavior of RubyVM::InstructionSequence.compile.
-#
-# You use this as with any other visitor. First you parse code into a tree,
-# then you visit it with this compiler. Visiting the root node of the tree
-# will return a SyntaxTree::YARV::Compiler::InstructionSequence object.
-# With that object you can call #to_a on it, which will return a serialized
-# form of the instruction sequence as an array. This array _should_ mirror
-# the array given by RubyVM::InstructionSequence#to_a.
-#
-# As an example, here is how you would compile a single expression:
-#
-# program = SyntaxTree.parse("1 + 2")
-# program.accept(SyntaxTree::YARV::Compiler.new).to_a
-#
-# [
-# "YARVInstructionSequence/SimpleDataFormat",
-# 3,
-# 1,
-# 1,
-# {:arg_size=>0, :local_size=>0, :stack_max=>2},
-# "",
-# "",
-# "",
-# 1,
-# :top,
-# [],
-# {},
-# [],
-# [
-# [:putobject_INT2FIX_1_],
-# [:putobject, 2],
-# [:opt_plus, {:mid=>:+, :flag=>16, :orig_argc=>1}],
-# [:leave]
-# ]
-# ]
-#
-# Note that this is the same output as calling:
-#
-# RubyVM::InstructionSequence.compile("1 + 2").to_a
-#
-# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#47
-class SyntaxTree::YARV::Compiler < ::SyntaxTree::BasicVisitor
- # @return [Compiler] a new instance of Compiler
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#293
- def initialize(options = T.unsafe(nil)); end
-
- # The current instruction sequence that is being compiled.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#286
- def iseq; end
-
- # A boolean to track if we're currently compiling the last statement
- # within a set of statements. This information is necessary to determine
- # if we need to return the value of the last statement.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#291
- def last_statement; end
-
- # These options mirror the compilation options that we currently support
- # that can be also passed to RubyVM::InstructionSequence.compile.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#283
- def options; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#299
- def visit_BEGIN(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#303
- def visit_CHAR(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#311
- def visit_END(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#339
- def visit_alias(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#347
- def visit_aref(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#369
- def visit_arg_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#373
- def visit_arg_paren(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#377
- def visit_arg_star(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#382
- def visit_args(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#386
- def visit_array(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#421
- def visit_aryptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#424
- def visit_assign(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#522
- def visit_assoc(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#527
- def visit_assoc_splat(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#531
- def visit_backref(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#535
- def visit_bare_assoc_hash(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#543
- def visit_begin(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#546
- def visit_binary(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#575
- def visit_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#585
- def visit_block_var(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#599
- def visit_blockarg(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#605
- def visit_bodystmt(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#609
- def visit_break(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#612
- def visit_call(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#712
- def visit_case(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#757
- def visit_class(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#792
- def visit_command(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#805
- def visit_command_call(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#818
- def visit_const_path_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#822
- def visit_const_path_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#827
- def visit_def(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#850
- def visit_defined(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#907
- def visit_dyna_symbol(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#913
- def visit_else(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#918
- def visit_elsif(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#929
- def visit_ensure(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#932
- def visit_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#936
- def visit_float(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#940
- def visit_fndptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#943
- def visit_for(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#976
- def visit_hash(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#988
- def visit_heredoc(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#985
- def visit_hshptn(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#999
- def visit_if(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1053
- def visit_if_op(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1074
- def visit_imaginary(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1078
- def visit_int(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1082
- def visit_kwrest_param(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1088
- def visit_label(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1092
- def visit_lambda(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1106
- def visit_lambda_var(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1110
- def visit_massign(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1116
- def visit_method_add_block(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1129
- def visit_mlhs(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1142
- def visit_module(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1171
- def visit_mrhs(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1180
- def visit_next(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1183
- def visit_not(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1188
- def visit_opassign(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1254
- def visit_params(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1360
- def visit_paren(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1364
- def visit_pinned_begin(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1367
- def visit_pinned_var_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1370
- def visit_program(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1421
- def visit_qsymbols(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1425
- def visit_qwords(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1434
- def visit_range(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1444
- def visit_rassign(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1521
- def visit_rational(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1525
- def visit_redo(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1528
- def visit_regexp_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1538
- def visit_rescue(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1541
- def visit_rescue_ex(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1544
- def visit_rescue_mod(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1547
- def visit_rest_param(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1553
- def visit_retry(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1556
- def visit_return(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1559
- def visit_sclass(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1580
- def visit_statements(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1594
- def visit_string_concat(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1606
- def visit_string_embexpr(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1610
- def visit_string_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1619
- def visit_super(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1633
- def visit_symbol_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1637
- def visit_symbols(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1656
- def visit_top_const_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1660
- def visit_tstring_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1668
- def visit_unary(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1689
- def visit_undef(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1699
- def visit_unless(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1725
- def visit_until(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1744
- def visit_var_field(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1761
- def visit_var_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1796
- def visit_vcall(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1808
- def visit_when(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1812
- def visit_while(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1831
- def visit_word(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1840
- def visit_words(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1850
- def visit_xstring_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1863
- def visit_yield(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1869
- def visit_zsuper(_node); end
-
- private
-
- # This is a helper that is used in places where arguments may be present
- # or they may be wrapped in parentheses. It's meant to descend down the
- # tree and return an array of argument nodes.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1887
- def argument_parts(node); end
-
- # Constant names when they are being assigned or referenced come in as a
- # tree, but it's more convenient to work with them as an array. This
- # method converts them into that array. This is nice because it's the
- # operand that goes to opt_getconstant_path in Ruby 3.2.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1908
- def constant_names(node); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2196
- def last_statement?; end
-
- # For the most part when an OpAssign (operator assignment) node with a ||=
- # operator is being compiled it's a matter of reading the target, checking
- # if the value should be evaluated, evaluating it if so, and then writing
- # the result back to the target.
- #
- # However, in certain kinds of assignments (X, ::X, X::Y, @@x, and $x) we
- # first check if the value is defined using the defined instruction. I
- # don't know why it is necessary, and suspect that it isn't.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1936
- def opassign_defined(node); end
-
- # Whenever a value is interpolated into a string-like structure, these
- # three instructions are pushed.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2016
- def push_interpolate; end
-
- # Visit a type of pattern in a pattern match.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2029
- def visit_pattern(node, end_label); end
-
- # There are a lot of nodes in the AST that act as contains of parts of
- # strings. This includes things like string literals, regular expressions,
- # heredocs, etc. This method will visit all the parts of a string within
- # those containers.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2137
- def visit_string_parts(node); end
-
- # The current instruction sequence that we're compiling is always stored
- # on the compiler. When we descend into a node that has its own
- # instruction sequence, this method can be called to temporarily set the
- # new value of the instruction sequence, yield, and then set it back.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2167
- def with_child_iseq(child_iseq); end
-
- # When we're compiling the last statement of a set of statements within a
- # scope, the instructions sometimes change from pops to leaves. These
- # kinds of peephole optimizations can reduce the overall number of
- # instructions. Therefore, we keep track of whether we're compiling the
- # last statement of a scope and allow visit methods to query that
- # information.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2185
- def with_last_statement; end
-
- # OpAssign nodes can have a number of different kinds of nodes as their
- # "target" (i.e., the left-hand side of the assignment). When compiling
- # these nodes we typically need to first fetch the current value of the
- # variable, then perform some kind of action, then store the result back
- # into the variable. This method handles that by first fetching the value,
- # then yielding to the block, then storing the result.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2206
- def with_opassign(node); end
-end
-
-# This represents a set of options that can be passed to the compiler to
-# control how it compiles the code. It mirrors the options that can be
-# passed to RubyVM::InstructionSequence.compile, except it only includes
-# options that actually change the behavior.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#52
-class SyntaxTree::YARV::Compiler::Options
- # @return [Options] a new instance of Options
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#53
- def initialize(frozen_string_literal: T.unsafe(nil), inline_const_cache: T.unsafe(nil), operands_unification: T.unsafe(nil), peephole_optimization: T.unsafe(nil), specialized_instruction: T.unsafe(nil), tailcall_optimization: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#80
- def frozen_string_literal!; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#84
- def frozen_string_literal?; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#88
- def inline_const_cache?; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#92
- def operands_unification?; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#96
- def peephole_optimization?; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#100
- def specialized_instruction?; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#104
- def tailcall_optimization?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#69
- def to_hash; end
-end
-
-# This visitor is responsible for converting Syntax Tree nodes into their
-# corresponding Ruby structures. This is used to convert the operands of
-# some instructions like putobject that push a Ruby object directly onto
-# the stack. It is only used when the entire structure can be represented
-# at compile-time, as opposed to constructed at run-time.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#114
-class SyntaxTree::YARV::Compiler::RubyVisitor < ::SyntaxTree::BasicVisitor
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_BEGIN(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_CHAR(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_END(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit___end__(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_alias(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_aref(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_aref_field(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_arg_block(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_arg_paren(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_arg_star(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_args(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_args_forward(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#128
- def visit_array(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_aryptn(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_assign(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_assoc(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_assoc_splat(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_backref(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_backtick(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132
- def visit_bare_assoc_hash(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_begin(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_binary(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_block(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_block_var(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_blockarg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_bodystmt(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_break(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_call(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_case(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_class(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_comma(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_command(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_command_call(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_comment(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_const(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_const_path_field(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_const_path_ref(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_const_ref(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_cvar(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_def(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_defined(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_dyna_symbol(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_else(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_elsif(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_embdoc(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_embexpr_beg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_embexpr_end(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_embvar(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_ensure(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_excessed_comma(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_field(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#141
- def visit_float(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_fndptn(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_for(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_gvar(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132
- def visit_hash(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_heredoc(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_heredoc_beg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_heredoc_end(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_hshptn(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_ident(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_if(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_if_op(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#147
- def visit_imaginary(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_in(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#151
- def visit_int(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_ivar(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_kw(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_kwrest_param(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#166
- def visit_label(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_label_end(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_lambda(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_lambda_var(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_lbrace(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_lbracket(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_lparen(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_massign(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_method_add_block(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_mlhs(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_mlhs_paren(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_module(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#170
- def visit_mrhs(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_next(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_not(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_op(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_opassign(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_params(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_paren(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_period(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_pinned_begin(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_pinned_var_ref(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_program(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#174
- def visit_qsymbols(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_qsymbols_beg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#178
- def visit_qwords(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_qwords_beg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#182
- def visit_range(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_rassign(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#187
- def visit_rational(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_rbrace(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_rbracket(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_redo(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_regexp_beg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_regexp_content(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_regexp_end(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#191
- def visit_regexp_literal(node); end
-
- # This isn't actually a visit method, though maybe it should be. It is
- # responsible for converting the set of string options on a regular
- # expression into its equivalent integer.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#249
- def visit_regexp_literal_flags(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_rescue(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_rescue_ex(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_rescue_mod(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_rest_param(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_retry(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_return(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_rparen(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_sclass(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_statements(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_string_concat(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_string_content(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_string_dvar(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_string_embexpr(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_string_literal(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_super(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_symbeg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_symbol_content(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#204
- def visit_symbol_literal(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#208
- def visit_symbols(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_symbols_beg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_tlambda(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_tlambeg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_top_const_field(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_top_const_ref(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_tstring_beg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#212
- def visit_tstring_content(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_tstring_end(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_unary(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_undef(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_unless(_node); end
-
- # @raise [CompilationError]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_unsupported(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_until(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_var_field(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#216
- def visit_var_ref(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_vcall(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_void_stmt(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_when(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_while(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#231
- def visit_word(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#241
- def visit_words(node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_words_beg(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_xstring(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_xstring_literal(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_yield(_node); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268
- def visit_zsuper(_node); end
-
- class << self
- # This will attempt to compile the given node. If it's possible, then
- # it will return the compiled object. Otherwise it will return nil.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#122
- def compile(node); end
- end
-end
-
-# This error is raised whenever a node cannot be converted into a Ruby
-# object at compile-time.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#117
-class SyntaxTree::YARV::Compiler::RubyVisitor::CompilationError < ::StandardError; end
-
-# ### Summary
-#
-# `concatarray` concatenates the two Arrays on top of the stack.
-#
-# It coerces the two objects at the top of the stack into Arrays by
-# calling `to_a` if necessary, and makes sure to `dup` the first Array if
-# it was already an Array, to avoid mutating it when concatenating.
-#
-# ### Usage
-#
-# ~~~ruby
-# [1, *2]
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#674
-class SyntaxTree::YARV::ConcatArray < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#687
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#699
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#683
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#675
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#691
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#695
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#679
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `concatstrings` pops a number of strings from the stack joins them
-# together into a single string and pushes that string back on the stack.
-#
-# This does no coercion and so is always used in conjunction with
-# `objtostring` and `anytostring` to ensure the stack contents are always
-# strings.
-#
-# ### Usage
-#
-# ~~~ruby
-# "#{5}"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#720
-class SyntaxTree::YARV::ConcatStrings < ::SyntaxTree::YARV::Instruction
- # @return [ConcatStrings] a new instance of ConcatStrings
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#723
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#739
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#755
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#735
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#727
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#743
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#721
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#747
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#751
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#731
- def to_a(_iseq); end
-end
-
-# This class represents a control flow graph of a YARV instruction sequence.
-# It constructs a graph of basic blocks that hold subsets of the list of
-# instructions from the instruction sequence.
-#
-# You can use this class by calling the ::compile method and passing it a
-# YARV instruction sequence. It will return a control flow graph object.
-#
-# iseq = RubyVM::InstructionSequence.compile("1 + 2")
-# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a)
-# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq)
-#
-# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#16
-class SyntaxTree::YARV::ControlFlowGraph
- # @return [ControlFlowGraph] a new instance of ControlFlowGraph
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#173
- def initialize(iseq, insns, blocks); end
-
- # This is the set of basic blocks that this control-flow graph contains.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#171
- def blocks; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#179
- def disasm; end
-
- # This is the list of instructions that this control flow graph contains.
- # It is effectively the same as the list of instructions in the
- # instruction sequence but with line numbers and events filtered out.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#168
- def insns; end
-
- # This is the instruction sequence that this control flow graph
- # corresponds to.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#163
- def iseq; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#202
- def to_dfg; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#210
- def to_mermaid; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#206
- def to_son; end
-
- # This method is used to verify that the control flow graph is well
- # formed. It does this by checking that each basic block is itself well
- # formed.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#248
- def verify; end
-
- class << self
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#252
- def compile(iseq); end
- end
-end
-
-# This class is responsible for creating a control flow graph from the
-# given instruction sequence.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#19
-class SyntaxTree::YARV::ControlFlowGraph::Compiler
- # @return [Compiler] a new instance of Compiler
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#34
- def initialize(iseq); end
-
- # This method is used to compile the instruction sequence into a control
- # flow graph. It returns an instance of ControlFlowGraph.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#54
- def compile; end
-
- # This is a hash of indices in the YARV instruction sequence that point
- # to their corresponding instruction.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#25
- def insns; end
-
- # This is the instruction sequence that is being compiled.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#21
- def iseq; end
-
- # This is a hash of labels that point to their corresponding index into
- # the YARV instruction sequence. Note that this is not the same as the
- # index into the list of instructions on the instruction sequence
- # object. Instead, this is the index into the C array, so it includes
- # operands.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#32
- def labels; end
-
- private
-
- # Builds up a set of basic blocks by iterating over the starts of each
- # block. They are keyed by the index of their first instruction.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#92
- def build_basic_blocks; end
-
- # Connect the blocks by letting them know which blocks are incoming and
- # outgoing from each block.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#123
- def connect_basic_blocks(blocks); end
-
- # Finds the indices of the instructions that start a basic block because
- # they're either:
- #
- # * the start of an instruction sequence
- # * the target of a branch
- # * fallen through to from a branch
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#72
- def find_basic_block_starts; end
-
- # If there are blocks that are unreachable, we can remove them from the
- # graph entirely at this point.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#145
- def prune_basic_blocks(blocks); end
-end
-
-# Constructs a data-flow-graph of a YARV instruction sequence, via a
-# control-flow-graph. Data flow is discovered locally and then globally. The
-# graph only considers data flow through the stack - local variables and
-# objects are considered fully escaped in this analysis.
-#
-# You can use this class by calling the ::compile method and passing it a
-# control flow graph. It will return a data flow graph object.
-#
-# iseq = RubyVM::InstructionSequence.compile("1 + 2")
-# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a)
-# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq)
-# dfg = SyntaxTree::YARV::DataFlowGraph.compile(cfg)
-#
-# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#18
-class SyntaxTree::YARV::DataFlowGraph
- # @return [DataFlowGraph] a new instance of DataFlowGraph
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#68
- def initialize(cfg, insn_flows, block_flows); end
-
- # Returns the value of attribute block_flows.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66
- def block_flows; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#74
- def blocks; end
-
- # Returns the value of attribute cfg.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66
- def cfg; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#78
- def disasm; end
-
- # Returns the value of attribute insn_flows.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66
- def insn_flows; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#127
- def to_mermaid; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#123
- def to_son; end
-
- # Verify that we constructed the data flow graph correctly.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#179
- def verify; end
-
- class << self
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#204
- def compile(cfg); end
- end
-end
-
-# This represents an object that goes on the stack that is passed between
-# basic blocks.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#32
-class SyntaxTree::YARV::DataFlowGraph::BlockArgument
- # @return [BlockArgument] a new instance of BlockArgument
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#35
- def initialize(name); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#39
- def local?; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#33
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#43
- def to_str; end
-end
-
-# This class is responsible for creating a data flow graph from the given
-# control flow graph.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#210
-class SyntaxTree::YARV::DataFlowGraph::Compiler
- # @return [Compiler] a new instance of Compiler
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#221
- def initialize(cfg); end
-
- # This data structure will hold the data flow between basic blocks.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#219
- def block_flows; end
-
- # This is the control flow graph that is being compiled.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#212
- def cfg; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#227
- def compile; end
-
- # This data structure will hold the data flow between instructions
- # within individual basic blocks.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#216
- def insn_flows; end
-
- private
-
- # Find the data that flows between basic blocks.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#304
- def find_external_flow; end
-
- # Find the data flow within each basic block. Using an abstract stack,
- # connect from consumers of data to the producers of that data.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#237
- def find_internal_flow; end
-end
-
-# This object represents the flow of data between instructions.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#20
-class SyntaxTree::YARV::DataFlowGraph::DataFlow
- # @return [DataFlow] a new instance of DataFlow
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#24
- def initialize; end
-
- # Returns the value of attribute in.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#21
- def in; end
-
- # Returns the value of attribute out.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#22
- def out; end
-end
-
-# This represents an object that goes on the stack that is passed between
-# instructions within a basic block.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#50
-class SyntaxTree::YARV::DataFlowGraph::LocalArgument
- # @return [LocalArgument] a new instance of LocalArgument
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#53
- def initialize(length); end
-
- # Returns the value of attribute length.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51
- def length; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#57
- def local?; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#61
- def to_str; end
-end
-
-# This class is responsible for taking a compiled instruction sequence and
-# walking through it to generate equivalent Ruby code.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#7
-class SyntaxTree::YARV::Decompiler
- include ::SyntaxTree::DSL
-
- # @return [Decompiler] a new instance of Decompiler
- #
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#32
- def initialize(iseq); end
-
- # Returns the value of attribute block_label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30
- def block_label; end
-
- # Returns the value of attribute iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30
- def iseq; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#37
- def to_ruby; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#52
- def decompile(iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#256
- def local_name(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#43
- def node_for(value); end
-end
-
-# When we're decompiling, we use a looped case statement to emulate
-# jumping around in the same way the virtual machine would. This class
-# provides convenience methods for generating the AST nodes that have to
-# do with that label.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#12
-class SyntaxTree::YARV::Decompiler::BlockLabel
- include ::SyntaxTree::DSL
-
- # @return [BlockLabel] a new instance of BlockLabel
- #
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#16
- def initialize(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#20
- def field; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#14
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#24
- def ref; end
-end
-
-# ### Summary
-#
-# `defineclass` defines a class. First it pops the superclass off the
-# stack, then it pops the object off the stack that the class should be
-# defined under. It has three arguments: the name of the constant, the
-# instruction sequence associated with the class, and various flags that
-# indicate if it is a singleton class, a module, or a regular class.
-#
-# ### Usage
-#
-# ~~~ruby
-# class Foo
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#775
-class SyntaxTree::YARV::DefineClass < ::SyntaxTree::YARV::Instruction
- # @return [DefineClass] a new instance of DefineClass
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#784
- def initialize(name, class_iseq, flags); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#806
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#823
- def call(vm); end
-
- # Returns the value of attribute class_iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782
- def class_iseq; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#802
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#790
- def disasm(fmt); end
-
- # Returns the value of attribute flags.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782
- def flags; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#811
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#815
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#819
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#798
- def to_a(_iseq); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#780
-SyntaxTree::YARV::DefineClass::FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#779
-SyntaxTree::YARV::DefineClass::FLAG_SCOPED = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#776
-SyntaxTree::YARV::DefineClass::TYPE_CLASS = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#778
-SyntaxTree::YARV::DefineClass::TYPE_MODULE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#777
-SyntaxTree::YARV::DefineClass::TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer)
-
-# ### Summary
-#
-# `definemethod` defines a method on the class of the current value of
-# `self`. It accepts two arguments. The first is the name of the method
-# being defined. The second is the instruction sequence representing the
-# body of the method.
-#
-# ### Usage
-#
-# ~~~ruby
-# def value = "value"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1068
-class SyntaxTree::YARV::DefineMethod < ::SyntaxTree::YARV::Instruction
- # @return [DefineMethod] a new instance of DefineMethod
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1071
- def initialize(method_name, method_iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1092
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1101
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1088
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1076
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1097
- def length; end
-
- # Returns the value of attribute method_iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069
- def method_iseq; end
-
- # Returns the value of attribute method_name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069
- def method_name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1084
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `definesmethod` defines a method on the singleton class of the current
-# value of `self`. It accepts two arguments. The first is the name of the
-# method being defined. The second is the instruction sequence representing
-# the body of the method. It pops the object off the stack that the method
-# should be defined on.
-#
-# ### Usage
-#
-# ~~~ruby
-# def self.value = "value"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1137
-class SyntaxTree::YARV::DefineSMethod < ::SyntaxTree::YARV::Instruction
- # @return [DefineSMethod] a new instance of DefineSMethod
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1140
- def initialize(method_name, method_iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1161
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1174
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1157
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1145
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1166
- def length; end
-
- # Returns the value of attribute method_iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138
- def method_iseq; end
-
- # Returns the value of attribute method_name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138
- def method_name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1170
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1153
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `defined` checks if the top value of the stack is defined. If it is, it
-# pushes its value onto the stack. Otherwise it pushes `nil`.
-#
-# ### Usage
-#
-# ~~~ruby
-# defined?(x)
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#859
-class SyntaxTree::YARV::Defined < ::SyntaxTree::YARV::Instruction
- # @return [Defined] a new instance of Defined
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#880
- def initialize(type, name, message); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#939
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#956
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#935
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#886
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#944
- def length; end
-
- # Returns the value of attribute message.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878
- def message; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#948
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#952
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#931
- def to_a(_iseq); end
-
- # Returns the value of attribute type.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878
- def type; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#872
-SyntaxTree::YARV::Defined::TYPE_ASGN = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#865
-SyntaxTree::YARV::Defined::TYPE_CONST = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#876
-SyntaxTree::YARV::Defined::TYPE_CONST_FROM = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#864
-SyntaxTree::YARV::Defined::TYPE_CVAR = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#873
-SyntaxTree::YARV::Defined::TYPE_EXPR = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#871
-SyntaxTree::YARV::Defined::TYPE_FALSE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#875
-SyntaxTree::YARV::Defined::TYPE_FUNC = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#863
-SyntaxTree::YARV::Defined::TYPE_GVAR = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#861
-SyntaxTree::YARV::Defined::TYPE_IVAR = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#862
-SyntaxTree::YARV::Defined::TYPE_LVAR = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#866
-SyntaxTree::YARV::Defined::TYPE_METHOD = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#860
-SyntaxTree::YARV::Defined::TYPE_NIL = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#874
-SyntaxTree::YARV::Defined::TYPE_REF = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#869
-SyntaxTree::YARV::Defined::TYPE_SELF = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#870
-SyntaxTree::YARV::Defined::TYPE_TRUE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#867
-SyntaxTree::YARV::Defined::TYPE_YIELD = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#868
-SyntaxTree::YARV::Defined::TYPE_ZSUPER = T.let(T.unsafe(nil), Integer)
-
-# ### Summary
-#
-# `definedivar` checks if an instance variable is defined. It is a
-# specialization of the `defined` instruction. It accepts three arguments:
-# the name of the instance variable, an inline cache, and the string that
-# should be pushed onto the stack in the event that the instance variable
-# is defined.
-#
-# ### Usage
-#
-# ~~~ruby
-# defined?(@value)
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1011
-class SyntaxTree::YARV::DefinedIVar < ::SyntaxTree::YARV::Instruction
- # @return [DefinedIVar] a new instance of DefinedIVar
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1014
- def initialize(name, cache, message); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1035
- def ==(other); end
-
- # Returns the value of attribute cache.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012
- def cache; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1048
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1031
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1020
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1040
- def length; end
-
- # Returns the value of attribute message.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012
- def message; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1044
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1027
- def to_a(_iseq); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#5
-class SyntaxTree::YARV::Disassembler
- # @return [Disassembler] a new instance of Disassembler
- #
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#46
- def initialize(current_iseq = T.unsafe(nil)); end
-
- # Helpers for various instructions
- #
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#58
- def calldata(value); end
-
- # Returns the value of attribute current_iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44
- def current_iseq; end
-
- # Sets the attribute current_iseq
- #
- # @param value the value to set the attribute current_iseq to.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44
- def current_iseq=(_arg0); end
-
- # Returns the value of attribute current_prefix.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#43
- def current_prefix; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#62
- def enqueue(iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#66
- def event(name); end
-
- # Entrypoints
- #
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#116
- def format!; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#123
- def format_insns!(insns, length = T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#87
- def inline_storage(cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#91
- def instruction(name, operands = T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#95
- def label(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#99
- def local(index, explicit: T.unsafe(nil), implicit: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#108
- def object(value); end
-
- # Returns the value of attribute output.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41
- def output; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#167
- def print(string); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#171
- def puts(string); end
-
- # Returns the value of attribute queue.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41
- def queue; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#175
- def string; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#179
- def with_prefix(value); end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#192
- def format_iseq(iseq); end
-end
-
-# This class is another object that handles disassembling a YARV
-# instruction sequence but it renders it without any of the extra spacing
-# or alignment.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#9
-class SyntaxTree::YARV::Disassembler::Squished
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#10
- def calldata(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#14
- def enqueue(iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#17
- def event(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#20
- def inline_storage(cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#24
- def instruction(name, operands = T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#28
- def label(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#32
- def local(index, **_arg1); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#36
- def object(value); end
-end
-
-# ### Summary
-#
-# `dup` copies the top value of the stack and pushes it onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# $global = 5
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1206
-class SyntaxTree::YARV::Dup < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1219
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1231
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1215
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1207
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1223
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1227
- def pushes; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1235
- def side_effects?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1211
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `duparray` dups an Array literal and pushes it onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# [true]
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1250
-class SyntaxTree::YARV::DupArray < ::SyntaxTree::YARV::Instruction
- # @return [DupArray] a new instance of DupArray
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1253
- def initialize(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1269
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1281
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1265
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1257
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1273
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1251
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1277
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1261
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `duphash` dups a Hash literal and pushes it onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# { a: 1 }
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1296
-class SyntaxTree::YARV::DupHash < ::SyntaxTree::YARV::Instruction
- # @return [DupHash] a new instance of DupHash
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1299
- def initialize(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1315
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1327
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1311
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1303
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1319
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1297
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1323
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1307
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `dupn` duplicates the top `n` stack elements.
-#
-# ### Usage
-#
-# ~~~ruby
-# Object::X ||= true
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1342
-class SyntaxTree::YARV::DupN < ::SyntaxTree::YARV::Instruction
- # @return [DupN] a new instance of DupN
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1345
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1361
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1373
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1357
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1349
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1365
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1343
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1369
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1353
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `expandarray` looks at the top of the stack, and if the value is an array
-# it replaces it on the stack with `number` elements of the array, or `nil`
-# if the elements are missing.
-#
-# ### Usage
-#
-# ~~~ruby
-# x, = [true, false, nil]
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1392
-class SyntaxTree::YARV::ExpandArray < ::SyntaxTree::YARV::Instruction
- # @return [ExpandArray] a new instance of ExpandArray
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1395
- def initialize(number, flags); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1412
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1429
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1408
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1400
- def disasm(fmt); end
-
- # Returns the value of attribute flags.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393
- def flags; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1417
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1421
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1425
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1404
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `getblockparam` is a similar instruction to `getlocal` in that it looks
-# for a local variable in the current instruction sequence's local table and
-# walks recursively up the parent instruction sequences until it finds it.
-# The local it retrieves, however, is a special block local that was passed
-# to the current method. It pushes the value of the block local onto the
-# stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# def foo(&block)
-# block
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1486
-class SyntaxTree::YARV::GetBlockParam < ::SyntaxTree::YARV::Instruction
- # @return [GetBlockParam] a new instance of GetBlockParam
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1489
- def initialize(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1508
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1521
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1504
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1494
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1513
- def length; end
-
- # Returns the value of attribute level.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487
- def level; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1517
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1498
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `getblockparamproxy` is almost the same as `getblockparam` except that it
-# pushes a proxy object onto the stack instead of the actual value of the
-# block local. This is used when a method is being called on the block
-# local.
-#
-# ### Usage
-#
-# ~~~ruby
-# def foo(&block)
-# block.call
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1541
-class SyntaxTree::YARV::GetBlockParamProxy < ::SyntaxTree::YARV::Instruction
- # @return [GetBlockParamProxy] a new instance of GetBlockParamProxy
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1544
- def initialize(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1566
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1579
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1562
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1549
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1571
- def length; end
-
- # Returns the value of attribute level.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542
- def level; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1575
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1556
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `getclassvariable` looks for a class variable in the current class and
-# pushes its value onto the stack. It uses an inline cache to reduce the
-# need to lookup the class variable in the class hierarchy every time.
-#
-# ### Usage
-#
-# ~~~ruby
-# @@class_variable
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1596
-class SyntaxTree::YARV::GetClassVariable < ::SyntaxTree::YARV::Instruction
- # @return [GetClassVariable] a new instance of GetClassVariable
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1599
- def initialize(name, cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1619
- def ==(other); end
-
- # Returns the value of attribute cache.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597
- def cache; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1632
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1615
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1604
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1624
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1628
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1611
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `getconstant` performs a constant lookup and pushes the value of the
-# constant onto the stack. It pops both the class it should look in and
-# whether or not it should look globally as well.
-#
-# ### Usage
-#
-# ~~~ruby
-# Constant
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1651
-class SyntaxTree::YARV::GetConstant < ::SyntaxTree::YARV::Instruction
- # @return [GetConstant] a new instance of GetConstant
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1654
- def initialize(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1670
- def ==(other); end
-
- # @raise [NameError]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1686
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1666
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1658
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1674
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1652
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1678
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1682
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1662
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `getglobal` pushes the value of a global variables onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# $$
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1717
-class SyntaxTree::YARV::GetGlobal < ::SyntaxTree::YARV::Instruction
- # @return [GetGlobal] a new instance of GetGlobal
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1720
- def initialize(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1736
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1748
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1732
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1724
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1740
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1718
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1744
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1728
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `getinstancevariable` pushes the value of an instance variable onto the
-# stack. It uses an inline cache to avoid having to look up the instance
-# variable in the class hierarchy every time.
-#
-# This instruction has two forms, but both have the same structure. Before
-# Ruby 3.2, the inline cache corresponded to both the get and set
-# instructions and could be shared. Since Ruby 3.2, it uses object shapes
-# instead so the caches are unique per instruction.
-#
-# ### Usage
-#
-# ~~~ruby
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1772
-class SyntaxTree::YARV::GetInstanceVariable < ::SyntaxTree::YARV::Instruction
- # @return [GetInstanceVariable] a new instance of GetInstanceVariable
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1775
- def initialize(name, cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1795
- def ==(other); end
-
- # Returns the value of attribute cache.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773
- def cache; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1808
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1791
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1780
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1800
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1804
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1787
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `getlocal` fetches the value of a local variable from a frame determined
-# by the level and index arguments. The level is the number of frames back
-# to look and the index is the index in the local table. It pushes the value
-# it finds onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# value = 5
-# tap { tap { value } }
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1828
-class SyntaxTree::YARV::GetLocal < ::SyntaxTree::YARV::Instruction
- # @return [GetLocal] a new instance of GetLocal
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1831
- def initialize(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1850
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1862
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1846
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1836
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1854
- def length; end
-
- # Returns the value of attribute level.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829
- def level; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1858
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1840
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `getlocal_WC_0` is a specialized version of the `getlocal` instruction. It
-# fetches the value of a local variable from the current frame determined by
-# the index given as its only argument.
-#
-# ### Usage
-#
-# ~~~ruby
-# value = 5
-# value
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1880
-class SyntaxTree::YARV::GetLocalWC0 < ::SyntaxTree::YARV::Instruction
- # @return [GetLocalWC0] a new instance of GetLocalWC0
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1883
- def initialize(index); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1899
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1915
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1911
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1895
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1887
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1881
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1903
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1907
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1891
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `getlocal_WC_1` is a specialized version of the `getlocal` instruction. It
-# fetches the value of a local variable from the parent frame determined by
-# the index given as its only argument.
-#
-# ### Usage
-#
-# ~~~ruby
-# value = 5
-# self.then { value }
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1933
-class SyntaxTree::YARV::GetLocalWC1 < ::SyntaxTree::YARV::Instruction
- # @return [GetLocalWC1] a new instance of GetLocalWC1
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1936
- def initialize(index); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1952
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1968
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1964
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1948
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1940
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1934
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1956
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1960
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1944
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `getspecial` pushes the value of a special local variable onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# 1 if (a == 1) .. (b == 2)
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1983
-class SyntaxTree::YARV::GetSpecial < ::SyntaxTree::YARV::Instruction
- # @return [GetSpecial] a new instance of GetSpecial
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1990
- def initialize(key, type); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2007
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2019
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2003
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1995
- def disasm(fmt); end
-
- # Returns the value of attribute key.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988
- def key; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2011
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2015
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1999
- def to_a(_iseq); end
-
- # Returns the value of attribute type.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988
- def type; end
-end
-
-# $~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1985
-SyntaxTree::YARV::GetSpecial::SVAR_BACKREF = T.let(T.unsafe(nil), Integer)
-
-# flipflop
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1986
-SyntaxTree::YARV::GetSpecial::SVAR_FLIPFLOP_START = T.let(T.unsafe(nil), Integer)
-
-# $_
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1984
-SyntaxTree::YARV::GetSpecial::SVAR_LASTLINE = T.let(T.unsafe(nil), Integer)
-
-# This is a base class for all YARV instructions. It provides a few
-# convenience methods for working with instructions.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#7
-class SyntaxTree::YARV::Instruction
- # This returns an array of labels.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#33
- def branch_targets; end
-
- # This method creates an instruction that represents the canonical
- # (non-specialized) form of this instruction. If this instruction is not
- # a specialized instruction, then this method returns `self`.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#11
- def canonical; end
-
- # Whether or not this instruction falls through to the next instruction if
- # its branching fails.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#44
- def falls_through?; end
-
- # Whether or not this instruction leaves the current frame.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#38
- def leaves?; end
-
- # This returns the size of the instruction in terms of the number of slots
- # it occupies in the instruction sequence. Effectively this is 1 plus the
- # number of operands.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#18
- def length; end
-
- # This returns the number of values that are popped off the stack.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#28
- def pops; end
-
- # This returns the number of values that are pushed onto the stack.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#23
- def pushes; end
-
- # Does the instruction have side effects? Control-flow counts as a
- # side-effect, as do some special-case instructions like Leave. By default
- # every instruction is marked as having side effects.
- #
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#51
- def side_effects?; end
-end
-
-# This class is meant to mirror RubyVM::InstructionSequence. It contains a
-# list of instructions along with the metadata pertaining to them. It also
-# functions as a builder for the instruction sequence.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#9
-class SyntaxTree::YARV::InstructionSequence
- # @return [InstructionSequence] a new instance of InstructionSequence
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#168
- def initialize(name, file, line, type, parent_iseq = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#636
- def adjuststack(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#640
- def anytostring; end
-
- # Returns the value of attribute argument_options.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#143
- def argument_options; end
-
- # This is the list of information about the arguments to this
- # instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142
- def argument_size; end
-
- # This is the list of information about the arguments to this
- # instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142
- def argument_size=(_arg0); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#456
- def block_child_iseq(line); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#644
- def branchif(label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#648
- def branchnil(label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#652
- def branchunless(label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#549
- def catch_break(iseq, begin_label, end_label, exit_label, restore_sp); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#559
- def catch_ensure(iseq, begin_label, end_label, exit_label, restore_sp); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#569
- def catch_next(begin_label, end_label, exit_label, restore_sp); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#579
- def catch_redo(begin_label, end_label, exit_label, restore_sp); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#589
- def catch_rescue(iseq, begin_label, end_label, exit_label, restore_sp); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#599
- def catch_retry(begin_label, end_label, exit_label, restore_sp); end
-
- # The catch table for this instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#146
- def catch_table; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#656
- def checkkeyword(keyword_bits_index, keyword_index); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#660
- def checkmatch(type); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#664
- def checktype(type); end
-
- # Child instruction sequence methods
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#452
- def child_iseq(name, line, type); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#462
- def class_child_iseq(name, line); end
-
- # This method converts our linked list of instructions into a final array
- # and performs any other compilation steps necessary.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#305
- def compile!; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#668
- def concatarray; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#672
- def concatstrings(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#676
- def defineclass(name, class_iseq, flags); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#680
- def defined(type, name, message); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#684
- def definedivar(name, cache, message); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#693
- def definemethod(name, method_iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#697
- def definesmethod(name, method_iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#292
- def disasm; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#701
- def dup; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#705
- def duparray(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#709
- def duphash(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#713
- def dupn(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#232
- def eval; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#632
- def event(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#717
- def expandarray(length, flags); end
-
- # The source location of the instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132
- def file; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#721
- def getblockparam(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#725
- def getblockparamproxy(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#729
- def getclassvariable(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#737
- def getconstant(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#741
- def getglobal(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#745
- def getinstancevariable(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#753
- def getlocal(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#772
- def getspecial(key, type); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#207
- def inline_storage; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#213
- def inline_storage_for(name); end
-
- # The hash of names of instance and class variables pointing to the
- # index of their associated inline storage.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#156
- def inline_storages; end
-
- # The list of instructions for this instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#149
- def insns; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#299
- def inspect; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#776
- def intern; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#780
- def invokeblock(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#784
- def invokesuper(calldata, block_iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#788
- def jump(label); end
-
- # Instruction push methods
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#613
- def label; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#792
- def leave; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#219
- def length; end
-
- # The source location of the instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132
- def line; end
-
- # The table of local variables.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#152
- def local_table; end
-
- # Query methods
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#199
- def local_variable(name, level = T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#466
- def method_child_iseq(name, line); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#470
- def module_child_iseq(name, line); end
-
- # The name of the instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#129
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#796
- def newarray(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#800
- def newarraykwsplat(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#804
- def newhash(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#808
- def newrange(exclude_end); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#812
- def nop; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#816
- def objtostring(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#820
- def once(iseq, cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#824
- def opt_aref_with(object, calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#828
- def opt_aset_with(object, calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#832
- def opt_case_dispatch(case_dispatch_hash, else_label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#836
- def opt_getconstant_path(names); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#872
- def opt_getinlinecache(label, cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#876
- def opt_setinlinecache(cache); end
-
- # These are various compilation options provided.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#166
- def options; end
-
- # The parent instruction sequence, if there is one.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#138
- def parent_iseq; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#880
- def pop; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#617
- def push(value); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#884
- def putnil; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#888
- def putobject(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#906
- def putself; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#910
- def putspecialobject(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#914
- def putstring(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#918
- def send(calldata, block_iseq = T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#922
- def setblockparam(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#926
- def setclassvariable(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#934
- def setconstant(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#938
- def setglobal(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#942
- def setinstancevariable(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#950
- def setlocal(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#969
- def setn(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#973
- def setspecial(key); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#474
- def singleton_class_child_iseq(line); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#341
- def specialize_instructions!; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#977
- def splatarray(flag); end
-
- # An object that will track the current size of the stack and the
- # maximum size of the stack for this instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#163
- def stack; end
-
- # The index of the next inline storage that will be created.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#159
- def storage_index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#981
- def swap; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#985
- def throw(type); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#236
- def to_a; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#280
- def to_cfg; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#284
- def to_dfg; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#288
- def to_son; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#989
- def topn(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#993
- def toregexp(options, length); end
-
- # The type of the instruction sequence.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#135
- def type; end
-
- class << self
- # This method will create a new instruction sequence from a serialized
- # RubyVM::InstructionSequence object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#999
- def from(source, options = T.unsafe(nil), parent_iseq = T.unsafe(nil)); end
-
- # This provides a handle to the rb_iseq_load function, which allows you
- # to pass a serialized iseq to Ruby and have it return a
- # RubyVM::InstructionSequence object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#13
- def iseq_load(iseq); end
- end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#494
-class SyntaxTree::YARV::InstructionSequence::CatchBreak < ::SyntaxTree::YARV::InstructionSequence::CatchEntry
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#495
- def to_a; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#507
-class SyntaxTree::YARV::InstructionSequence::CatchEnsure < ::SyntaxTree::YARV::InstructionSequence::CatchEntry
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#508
- def to_a; end
-end
-
-# Catch table methods
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#482
-class SyntaxTree::YARV::InstructionSequence::CatchEntry
- # @return [CatchEntry] a new instance of CatchEntry
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#485
- def initialize(iseq, begin_label, end_label, exit_label, restore_sp); end
-
- # Returns the value of attribute begin_label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483
- def begin_label; end
-
- # Returns the value of attribute end_label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483
- def end_label; end
-
- # Returns the value of attribute exit_label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483
- def exit_label; end
-
- # Returns the value of attribute iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483
- def iseq; end
-
- # Returns the value of attribute restore_sp.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483
- def restore_sp; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#519
-class SyntaxTree::YARV::InstructionSequence::CatchNext < ::SyntaxTree::YARV::InstructionSequence::CatchEntry
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#520
- def to_a; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#525
-class SyntaxTree::YARV::InstructionSequence::CatchRedo < ::SyntaxTree::YARV::InstructionSequence::CatchEntry
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#526
- def to_a; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#531
-class SyntaxTree::YARV::InstructionSequence::CatchRescue < ::SyntaxTree::YARV::InstructionSequence::CatchEntry
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#532
- def to_a; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#543
-class SyntaxTree::YARV::InstructionSequence::CatchRetry < ::SyntaxTree::YARV::InstructionSequence::CatchEntry
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#544
- def to_a; end
-end
-
-# When the list of instructions is first being created, it's stored as a
-# linked list. This is to make it easier to perform peephole optimizations
-# and other transformations like instruction specialization.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#35
-class SyntaxTree::YARV::InstructionSequence::InstructionList
- include ::Enumerable
-
- # @return [InstructionList] a new instance of InstructionList
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#48
- def initialize; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#53
- def each(&_blk); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#58
- def each_node; end
-
- # Returns the value of attribute head_node.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46
- def head_node; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#68
- def push(instruction); end
-
- # Returns the value of attribute tail_node.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46
- def tail_node; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#36
-class SyntaxTree::YARV::InstructionSequence::InstructionList::Node
- # @return [Node] a new instance of Node
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#39
- def initialize(value, next_node = T.unsafe(nil)); end
-
- # Returns the value of attribute next_node.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37
- def next_node; end
-
- # Sets the attribute next_node
- #
- # @param value the value to set the attribute next_node to.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37
- def next_node=(_arg0); end
-
- # Returns the value of attribute value.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37
- def value; end
-
- # Sets the attribute value
- #
- # @param value the value to set the attribute value to.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37
- def value=(_arg0); end
-end
-
-# This represents the destination of instructions that jump. Initially it
-# does not track its position so that when we perform optimizations the
-# indices don't get messed up.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#107
-class SyntaxTree::YARV::InstructionSequence::Label
- # @return [Label] a new instance of Label
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#115
- def initialize(name = T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#123
- def inspect; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#108
- def name; end
-
- # When we're serializing the instruction sequence, we need to be able to
- # look up the label from the branch instructions and then access the
- # subsequent node. So we'll store the reference here.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113
- def node; end
-
- # When we're serializing the instruction sequence, we need to be able to
- # look up the label from the branch instructions and then access the
- # subsequent node. So we'll store the reference here.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113
- def node=(_arg0); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#119
- def patch!(name); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#83
-SyntaxTree::YARV::InstructionSequence::MAGIC = T.let(T.unsafe(nil), String)
-
-# This object is used to track the size of the stack at any given time. It
-# is effectively a mini symbolic interpreter. It's necessary because when
-# instruction sequences get serialized they include a :stack_max field on
-# them. This field is used to determine how much stack space to allocate
-# for the instruction sequence.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#90
-class SyntaxTree::YARV::InstructionSequence::Stack
- # @return [Stack] a new instance of Stack
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#93
- def initialize; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#98
- def change_by(value); end
-
- # Returns the value of attribute current_size.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91
- def current_size; end
-
- # Returns the value of attribute maximum_size.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91
- def maximum_size; end
-end
-
-# ### Summary
-#
-# `intern` converts the top element of the stack to a symbol and pushes the
-# symbol onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# :"#{"foo"}"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2042
-class SyntaxTree::YARV::Intern < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2055
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2067
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2051
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2043
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2059
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2063
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2047
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `invokeblock` invokes the block given to the current method. It pops the
-# arguments for the block off the stack and pushes the result of running the
-# block onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# def foo
-# yield
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2086
-class SyntaxTree::YARV::InvokeBlock < ::SyntaxTree::YARV::Instruction
- # @return [InvokeBlock] a new instance of InvokeBlock
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2089
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2105
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2121
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2087
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2101
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2093
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2109
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2113
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2117
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2097
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `invokesuper` is similar to the `send` instruction, except that it calls
-# the super method. It pops the receiver and arguments off the stack and
-# pushes the return value onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# def foo
-# super
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2140
-class SyntaxTree::YARV::InvokeSuper < ::SyntaxTree::YARV::Instruction
- # @return [InvokeSuper] a new instance of InvokeSuper
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2143
- def initialize(calldata, block_iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2164
- def ==(other); end
-
- # Returns the value of attribute block_iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141
- def block_iseq; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2178
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2160
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2148
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2169
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2174
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2156
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `jump` unconditionally jumps to the label given as its only argument.
-#
-# ### Usage
-#
-# ~~~ruby
-# x = 0
-# if x == 0
-# puts "0"
-# else
-# puts "2"
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2217
-class SyntaxTree::YARV::Jump < ::SyntaxTree::YARV::Instruction
- # @return [Jump] a new instance of Jump
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2220
- def initialize(label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2236
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2248
- def branch_targets; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2244
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2232
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2224
- def disasm(fmt); end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2218
- def label; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2240
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2228
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `leave` exits the current frame.
-#
-# ### Usage
-#
-# ~~~ruby
-# ;;
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2263
-class SyntaxTree::YARV::Leave < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2276
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2290
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2272
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2264
- def disasm(fmt); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2294
- def leaves?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2280
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2284
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2268
- def to_a(_iseq); end
-end
-
-# This module contains the instructions that used to be a part of YARV but
-# have been replaced or removed in more recent versions.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#7
-module SyntaxTree::YARV::Legacy; end
-
-# ### Summary
-#
-# `getclassvariable` looks for a class variable in the current class and
-# pushes its value onto the stack.
-#
-# This version of the `getclassvariable` instruction is no longer used
-# since in Ruby 3.0 it gained an inline cache.`
-#
-# ### Usage
-#
-# ~~~ruby
-# @@class_variable
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#22
-class SyntaxTree::YARV::Legacy::GetClassVariable < ::SyntaxTree::YARV::Instruction
- # @return [GetClassVariable] a new instance of GetClassVariable
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#25
- def initialize(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#41
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#57
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#53
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#37
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#29
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#45
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#23
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#49
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#33
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_getinlinecache` is a wrapper around a series of `putobject` and
-# `getconstant` instructions that allows skipping past them if the inline
-# cache is currently set. It pushes the value of the cache onto the stack
-# if it is set, otherwise it pushes `nil`.
-#
-# This instruction is no longer used since in Ruby 3.2 it was replaced by
-# the consolidated `opt_getconstant_path` instruction.
-#
-# ### Usage
-#
-# ~~~ruby
-# Constant
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#78
-class SyntaxTree::YARV::Legacy::OptGetInlineCache < ::SyntaxTree::YARV::Instruction
- # @return [OptGetInlineCache] a new instance of OptGetInlineCache
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#81
- def initialize(label, cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#101
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#118
- def branch_targets; end
-
- # Returns the value of attribute cache.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79
- def cache; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#114
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#97
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#86
- def disasm(fmt); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#122
- def falls_through?; end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79
- def label; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#106
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#110
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#93
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_setinlinecache` sets an inline cache for a constant lookup. It pops
-# the value it should set off the top of the stack. It uses this value to
-# set the cache. It then pushes that value back onto the top of the stack.
-#
-# This instruction is no longer used since in Ruby 3.2 it was replaced by
-# the consolidated `opt_getconstant_path` instruction.
-#
-# ### Usage
-#
-# ~~~ruby
-# Constant
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#142
-class SyntaxTree::YARV::Legacy::OptSetInlineCache < ::SyntaxTree::YARV::Instruction
- # @return [OptSetInlineCache] a new instance of OptSetInlineCache
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#145
- def initialize(cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#161
- def ==(other); end
-
- # Returns the value of attribute cache.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#143
- def cache; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#177
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#157
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#149
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#165
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#169
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#173
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#153
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `setclassvariable` looks for a class variable in the current class and
-# sets its value to the value it pops off the top of the stack.
-#
-# This version of the `setclassvariable` instruction is no longer used
-# since in Ruby 3.0 it gained an inline cache.
-#
-# ### Usage
-#
-# ~~~ruby
-# @@class_variable = 1
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#195
-class SyntaxTree::YARV::Legacy::SetClassVariable < ::SyntaxTree::YARV::Instruction
- # @return [SetClassVariable] a new instance of SetClassVariable
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#198
- def initialize(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#214
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#230
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#226
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#210
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#202
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#218
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#196
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#222
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#206
- def to_a(_iseq); end
-end
-
-# This represents every local variable associated with an instruction
-# sequence. There are two kinds of locals: plain locals that are what you
-# expect, and block proxy locals, which represent local variables
-# associated with blocks that were passed into the current instruction
-# sequence.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#10
-class SyntaxTree::YARV::LocalTable
- # @return [LocalTable] a new instance of LocalTable
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#43
- def initialize; end
-
- # Add a BlockLocal to the local table.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#73
- def block(name); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#47
- def empty?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#51
- def find(name, level = T.unsafe(nil)); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#56
- def has?(name); end
-
- # Returns the value of attribute locals.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#41
- def locals; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#64
- def name_at(index); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#60
- def names; end
-
- # This is the offset from the top of the stack where this local variable
- # lives.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#84
- def offset(index); end
-
- # Add a PlainLocal to the local table.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#78
- def plain(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#68
- def size; end
-end
-
-# A local representing a block passed into the current instruction
-# sequence.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#13
-class SyntaxTree::YARV::LocalTable::BlockLocal
- # @return [BlockLocal] a new instance of BlockLocal
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#16
- def initialize(name); end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#14
- def name; end
-end
-
-# The result of looking up a local variable in the current local table.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#31
-class SyntaxTree::YARV::LocalTable::Lookup
- # @return [Lookup] a new instance of Lookup
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#34
- def initialize(local, index, level); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32
- def index; end
-
- # Returns the value of attribute level.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32
- def level; end
-
- # Returns the value of attribute local.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32
- def local; end
-end
-
-# A regular local variable.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#22
-class SyntaxTree::YARV::LocalTable::PlainLocal
- # @return [PlainLocal] a new instance of PlainLocal
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#25
- def initialize(name); end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#23
- def name; end
-end
-
-# ### Summary
-#
-# `newarray` puts a new array initialized with `number` values from the
-# stack. It pops `number` values off the stack and pushes the array onto the
-# stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# ["string"]
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2311
-class SyntaxTree::YARV::NewArray < ::SyntaxTree::YARV::Instruction
- # @return [NewArray] a new instance of NewArray
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2314
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2330
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2346
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2326
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2318
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2334
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2312
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2338
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2342
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2322
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `newarraykwsplat` is a specialized version of `newarray` that takes a **
-# splat argument. It pops `number` values off the stack and pushes the array
-# onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# ["string", **{ foo: "bar" }]
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2363
-class SyntaxTree::YARV::NewArrayKwSplat < ::SyntaxTree::YARV::Instruction
- # @return [NewArrayKwSplat] a new instance of NewArrayKwSplat
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2366
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2382
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2398
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2378
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2370
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2386
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2364
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2390
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2394
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2374
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `newhash` puts a new hash onto the stack, using `number` elements from the
-# stack. `number` needs to be even. It pops `number` elements off the stack
-# and pushes a hash onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# def foo(key, value)
-# { key => value }
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2417
-class SyntaxTree::YARV::NewHash < ::SyntaxTree::YARV::Instruction
- # @return [NewHash] a new instance of NewHash
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2420
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2436
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2452
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2432
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2424
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2440
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2418
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2444
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2448
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2428
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `newrange` creates a new range object from the top two values on the
-# stack. It pops both of them off, and then pushes on the new range. It
-# takes one argument which is 0 if the end is included or 1 if the end value
-# is excluded.
-#
-# ### Usage
-#
-# ~~~ruby
-# x = 0
-# y = 1
-# p (x..y), (x...y)
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2472
-class SyntaxTree::YARV::NewRange < ::SyntaxTree::YARV::Instruction
- # @return [NewRange] a new instance of NewRange
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2475
- def initialize(exclude_end); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2491
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2507
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2487
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2479
- def disasm(fmt); end
-
- # Returns the value of attribute exclude_end.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2473
- def exclude_end; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2495
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2499
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2503
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2483
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `nop` is a no-operation instruction. It is used to pad the instruction
-# sequence so there is a place for other instructions to jump to.
-#
-# ### Usage
-#
-# ~~~ruby
-# raise rescue true
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2523
-class SyntaxTree::YARV::Nop < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2536
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2540
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2532
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2524
- def disasm(fmt); end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2543
- def side_effects?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2528
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `objtostring` pops a value from the stack, calls `to_s` on that value and
-# then pushes the result back to the stack.
-#
-# It has various fast paths for classes like String, Symbol, Module, Class,
-# etc. For everything else it calls `to_s`.
-#
-# ### Usage
-#
-# ~~~ruby
-# "#{5}"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2562
-class SyntaxTree::YARV::ObjToString < ::SyntaxTree::YARV::Instruction
- # @return [ObjToString] a new instance of ObjToString
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2565
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2581
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2597
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2563
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2577
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2569
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2585
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2589
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2593
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2573
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `once` is an instruction that wraps an instruction sequence and ensures
-# that is it only ever executed once for the lifetime of the program. It
-# uses a cache to ensure that it is only executed once. It pushes the result
-# of running the instruction sequence onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# END { puts "END" }
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2615
-class SyntaxTree::YARV::Once < ::SyntaxTree::YARV::Instruction
- # @return [Once] a new instance of Once
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2618
- def initialize(iseq, cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2636
- def ==(other); end
-
- # Returns the value of attribute cache.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616
- def cache; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2648
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2632
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2623
- def disasm(fmt); end
-
- # Returns the value of attribute iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616
- def iseq; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2640
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2644
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2628
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_and` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the `&` operator is used. There is a fast path for if
-# both operands are integers. It pops both the receiver and the argument off
-# the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 2 & 3
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2668
-class SyntaxTree::YARV::OptAnd < ::SyntaxTree::YARV::Instruction
- # @return [OptAnd] a new instance of OptAnd
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2671
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2687
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2707
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2669
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2703
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2683
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2675
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2691
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2695
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2699
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2679
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_aref` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the `[]` operator is used. There are fast paths if the
-# receiver is an integer, array, or hash.
-#
-# ### Usage
-#
-# ~~~ruby
-# 7[2]
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2724
-class SyntaxTree::YARV::OptAref < ::SyntaxTree::YARV::Instruction
- # @return [OptAref] a new instance of OptAref
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2727
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2743
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2763
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2725
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2759
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2739
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2731
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2747
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2751
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2755
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2735
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_aref_with` is a specialization of the `opt_aref` instruction that
-# occurs when the `[]` operator is used with a string argument known at
-# compile time. There are fast paths if the receiver is a hash. It pops the
-# receiver off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# { 'test' => true }['test']
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2781
-class SyntaxTree::YARV::OptArefWith < ::SyntaxTree::YARV::Instruction
- # @return [OptArefWith] a new instance of OptArefWith
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2784
- def initialize(object, calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2804
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2821
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2800
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2789
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2809
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2813
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2817
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2796
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_aset` is an instruction for setting the hash value by the key in
-# the `recv[obj] = set` format. It is a specialization of the
-# `opt_send_without_block` instruction. It pops the receiver, the key, and
-# the value off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# {}[:key] = value
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2839
-class SyntaxTree::YARV::OptAset < ::SyntaxTree::YARV::Instruction
- # @return [OptAset] a new instance of OptAset
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2842
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2858
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2878
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2840
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2874
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2854
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2846
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2862
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2866
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2870
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2850
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_aset_with` is an instruction for setting the hash value by the known
-# string key in the `recv[obj] = set` format. It pops the receiver and the
-# value off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# {}["key"] = value
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2895
-class SyntaxTree::YARV::OptAsetWith < ::SyntaxTree::YARV::Instruction
- # @return [OptAsetWith] a new instance of OptAsetWith
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2898
- def initialize(object, calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2918
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2935
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2914
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2903
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2923
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2927
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2931
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2910
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_case_dispatch` is a branch instruction that moves the control flow
-# for case statements that have clauses where they can all be used as hash
-# keys for an internal hash.
-#
-# It has two arguments: the `case_dispatch_hash` and an `else_label`. It
-# pops one value off the stack: a hash key. `opt_case_dispatch` looks up the
-# key in the `case_dispatch_hash` and jumps to the corresponding label if
-# there is one. If there is no value in the `case_dispatch_hash`,
-# `opt_case_dispatch` jumps to the `else_label` index.
-#
-# ### Usage
-#
-# ~~~ruby
-# case 1
-# when 1
-# puts "foo"
-# else
-# puts "bar"
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2964
-class SyntaxTree::YARV::OptCaseDispatch < ::SyntaxTree::YARV::Instruction
- # @return [OptCaseDispatch] a new instance of OptCaseDispatch
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2967
- def initialize(case_dispatch_hash, else_label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2991
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3009
- def branch_targets; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3005
- def call(vm); end
-
- # Returns the value of attribute case_dispatch_hash.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965
- def case_dispatch_hash; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2987
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2972
- def disasm(fmt); end
-
- # Returns the value of attribute else_label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965
- def else_label; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3013
- def falls_through?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2997
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3001
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2979
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_div` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the `/` operator is used. There are fast paths for if
-# both operands are integers, or if both operands are floats. It pops both
-# the receiver and the argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 2 / 3
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3031
-class SyntaxTree::YARV::OptDiv < ::SyntaxTree::YARV::Instruction
- # @return [OptDiv] a new instance of OptDiv
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3034
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3050
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3070
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3032
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3066
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3046
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3038
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3054
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3058
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3062
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3042
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_empty_p` is an optimization applied when the method `empty?` is
-# called. It pops the receiver off the stack and pushes on the result of the
-# method call.
-#
-# ### Usage
-#
-# ~~~ruby
-# "".empty?
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3087
-class SyntaxTree::YARV::OptEmptyP < ::SyntaxTree::YARV::Instruction
- # @return [OptEmptyP] a new instance of OptEmptyP
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3090
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3106
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3126
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3088
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3122
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3102
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3094
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3110
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3114
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3118
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3098
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_eq` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the == operator is used. Fast paths exist when both
-# operands are integers, floats, symbols or strings. It pops both the
-# receiver and the argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 2 == 2
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3144
-class SyntaxTree::YARV::OptEq < ::SyntaxTree::YARV::Instruction
- # @return [OptEq] a new instance of OptEq
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3147
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3163
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3183
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3145
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3179
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3159
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3151
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3167
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3171
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3175
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3155
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_ge` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the >= operator is used. Fast paths exist when both
-# operands are integers or floats. It pops both the receiver and the
-# argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 4 >= 3
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3201
-class SyntaxTree::YARV::OptGE < ::SyntaxTree::YARV::Instruction
- # @return [OptGE] a new instance of OptGE
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3204
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3220
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3240
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3202
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3236
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3216
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3208
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3224
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3228
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3232
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3212
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_gt` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the > operator is used. Fast paths exist when both
-# operands are integers or floats. It pops both the receiver and the
-# argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 4 > 3
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3314
-class SyntaxTree::YARV::OptGT < ::SyntaxTree::YARV::Instruction
- # @return [OptGT] a new instance of OptGT
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3317
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3333
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3353
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3315
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3349
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3329
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3321
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3337
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3341
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3345
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3325
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_getconstant_path` performs a constant lookup on a chain of constant
-# names. It accepts as its argument an array of constant names, and pushes
-# the value of the constant onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# ::Object
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3257
-class SyntaxTree::YARV::OptGetConstantPath < ::SyntaxTree::YARV::Instruction
- # @return [OptGetConstantPath] a new instance of OptGetConstantPath
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3260
- def initialize(names); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3277
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3289
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3273
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3264
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3281
- def length; end
-
- # Returns the value of attribute names.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3258
- def names; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3285
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3269
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_le` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the <= operator is used. Fast paths exist when both
-# operands are integers or floats. It pops both the receiver and the
-# argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 3 <= 4
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3371
-class SyntaxTree::YARV::OptLE < ::SyntaxTree::YARV::Instruction
- # @return [OptLE] a new instance of OptLE
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3374
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3390
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3410
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3372
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3406
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3386
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3378
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3394
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3398
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3402
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3382
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_lt` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the < operator is used. Fast paths exist when both
-# operands are integers or floats. It pops both the receiver and the
-# argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 3 < 4
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3485
-class SyntaxTree::YARV::OptLT < ::SyntaxTree::YARV::Instruction
- # @return [OptLT] a new instance of OptLT
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3488
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3504
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3524
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3486
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3520
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3500
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3492
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3508
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3512
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3516
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3496
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_ltlt` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the `<<` operator is used. Fast paths exists when the
-# receiver is either a String or an Array. It pops both the receiver and the
-# argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# "" << 2
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3542
-class SyntaxTree::YARV::OptLTLT < ::SyntaxTree::YARV::Instruction
- # @return [OptLTLT] a new instance of OptLTLT
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3545
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3561
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3581
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3543
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3577
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3557
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3549
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3565
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3569
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3573
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3553
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_length` is a specialization of `opt_send_without_block`, when the
-# `length` method is called. There are fast paths when the receiver is
-# either a string, hash, or array. It pops the receiver off the stack and
-# pushes on the result of the method call.
-#
-# ### Usage
-#
-# ~~~ruby
-# "".length
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3428
-class SyntaxTree::YARV::OptLength < ::SyntaxTree::YARV::Instruction
- # @return [OptLength] a new instance of OptLength
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3431
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3447
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3467
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3429
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3463
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3443
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3435
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3451
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3455
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3459
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3439
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_minus` is a specialization of the `opt_send_without_block`
-# instruction that occurs when the `-` operator is used. There are fast
-# paths for if both operands are integers or if both operands are floats. It
-# pops both the receiver and the argument off the stack and pushes on the
-# result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 3 - 2
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3600
-class SyntaxTree::YARV::OptMinus < ::SyntaxTree::YARV::Instruction
- # @return [OptMinus] a new instance of OptMinus
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3603
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3619
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3639
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3601
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3635
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3615
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3607
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3623
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3627
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3631
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3611
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_mod` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the `%` operator is used. There are fast paths for if
-# both operands are integers or if both operands are floats. It pops both
-# the receiver and the argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 4 % 2
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3657
-class SyntaxTree::YARV::OptMod < ::SyntaxTree::YARV::Instruction
- # @return [OptMod] a new instance of OptMod
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3660
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3676
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3696
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3658
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3692
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3672
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3664
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3680
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3684
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3688
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3668
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_mult` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the `*` operator is used. There are fast paths for if
-# both operands are integers or floats. It pops both the receiver and the
-# argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 3 * 2
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3714
-class SyntaxTree::YARV::OptMult < ::SyntaxTree::YARV::Instruction
- # @return [OptMult] a new instance of OptMult
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3717
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3733
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3753
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3715
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3749
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3729
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3721
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3737
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3741
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3745
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3725
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_neq` is an optimization that tests whether two values at the top of
-# the stack are not equal by testing their equality and calling the `!` on
-# the result. This allows `opt_neq` to use the fast paths optimized in
-# `opt_eq` when both operands are Integers, Floats, Symbols, or Strings. It
-# pops both the receiver and the argument off the stack and pushes on the
-# result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 2 != 2
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3773
-class SyntaxTree::YARV::OptNEq < ::SyntaxTree::YARV::Instruction
- # @return [OptNEq] a new instance of OptNEq
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3776
- def initialize(eq_calldata, neq_calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3796
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3813
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3792
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3781
- def disasm(fmt); end
-
- # Returns the value of attribute eq_calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774
- def eq_calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3801
- def length; end
-
- # Returns the value of attribute neq_calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774
- def neq_calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3805
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3809
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3788
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_newarray_max` is a specialization that occurs when the `max` method
-# is called on an array literal. It pops the values of the array off the
-# stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# [a, b, c].max
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3831
-class SyntaxTree::YARV::OptNewArrayMax < ::SyntaxTree::YARV::Instruction
- # @return [OptNewArrayMax] a new instance of OptNewArrayMax
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3834
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3850
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3866
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3846
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3838
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3854
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3832
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3858
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3862
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3842
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_newarray_min` is a specialization that occurs when the `min` method
-# is called on an array literal. It pops the values of the array off the
-# stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# [a, b, c].min
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3883
-class SyntaxTree::YARV::OptNewArrayMin < ::SyntaxTree::YARV::Instruction
- # @return [OptNewArrayMin] a new instance of OptNewArrayMin
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3886
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3902
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3918
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3898
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3890
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3906
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3884
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3910
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3914
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3894
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_nil_p` is an optimization applied when the method `nil?` is called.
-# It returns true immediately when the receiver is `nil` and defers to the
-# `nil?` method in other cases. It pops the receiver off the stack and
-# pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# "".nil?
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3936
-class SyntaxTree::YARV::OptNilP < ::SyntaxTree::YARV::Instruction
- # @return [OptNilP] a new instance of OptNilP
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3939
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3955
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3975
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3937
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3971
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3951
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3943
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3959
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3963
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3967
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3947
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_not` negates the value on top of the stack by calling the `!` method
-# on it. It pops the receiver off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# !true
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3991
-class SyntaxTree::YARV::OptNot < ::SyntaxTree::YARV::Instruction
- # @return [OptNot] a new instance of OptNot
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3994
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4010
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4030
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3992
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4026
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4006
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3998
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4014
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4018
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4022
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4002
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_or` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the `|` operator is used. There is a fast path for if
-# both operands are integers. It pops both the receiver and the argument off
-# the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 2 | 3
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4048
-class SyntaxTree::YARV::OptOr < ::SyntaxTree::YARV::Instruction
- # @return [OptOr] a new instance of OptOr
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4051
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4067
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4087
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4049
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4083
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4063
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4055
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4071
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4075
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4079
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4059
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_plus` is a specialization of the `opt_send_without_block` instruction
-# that occurs when the `+` operator is used. There are fast paths for if
-# both operands are integers, floats, strings, or arrays. It pops both the
-# receiver and the argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# 2 + 3
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4105
-class SyntaxTree::YARV::OptPlus < ::SyntaxTree::YARV::Instruction
- # @return [OptPlus] a new instance of OptPlus
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4108
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4124
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4144
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4106
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4140
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4120
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4112
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4128
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4132
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4136
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4116
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_regexpmatch2` is a specialization of the `opt_send_without_block`
-# instruction that occurs when the `=~` operator is used. It pops both the
-# receiver and the argument off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# /a/ =~ "a"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4161
-class SyntaxTree::YARV::OptRegExpMatch2 < ::SyntaxTree::YARV::Instruction
- # @return [OptRegExpMatch2] a new instance of OptRegExpMatch2
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4164
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4180
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4200
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4162
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4196
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4176
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4168
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4184
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4188
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4192
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4172
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_send_without_block` is a specialization of the send instruction that
-# occurs when a method is being called without a block. It pops the receiver
-# and the arguments off the stack and pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# puts "Hello, world!"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4217
-class SyntaxTree::YARV::OptSendWithoutBlock < ::SyntaxTree::YARV::Instruction
- # @return [OptSendWithoutBlock] a new instance of OptSendWithoutBlock
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4220
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4236
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4256
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4218
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4252
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4232
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4224
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4240
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4244
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4248
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4228
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_size` is a specialization of `opt_send_without_block`, when the
-# `size` method is called. There are fast paths when the receiver is either
-# a string, hash, or array. It pops the receiver off the stack and pushes on
-# the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# "".size
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4274
-class SyntaxTree::YARV::OptSize < ::SyntaxTree::YARV::Instruction
- # @return [OptSize] a new instance of OptSize
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4277
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4293
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4313
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4275
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4309
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4289
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4281
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4297
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4301
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4305
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_str_freeze` pushes a frozen known string value with no interpolation
-# onto the stack using the #freeze method. If the method gets overridden,
-# this will fall back to a send.
-#
-# ### Usage
-#
-# ~~~ruby
-# "hello".freeze
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4330
-class SyntaxTree::YARV::OptStrFreeze < ::SyntaxTree::YARV::Instruction
- # @return [OptStrFreeze] a new instance of OptStrFreeze
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4333
- def initialize(object, calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4353
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4366
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4331
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4349
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4358
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4331
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4362
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4345
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_str_uminus` pushes a frozen known string value with no interpolation
-# onto the stack. If the method gets overridden, this will fall back to a
-# send.
-#
-# ### Usage
-#
-# ~~~ruby
-# -"string"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4383
-class SyntaxTree::YARV::OptStrUMinus < ::SyntaxTree::YARV::Instruction
- # @return [OptStrUMinus] a new instance of OptStrUMinus
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4386
- def initialize(object, calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4406
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4419
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4384
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4402
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4391
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4411
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4384
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4415
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4398
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `opt_succ` is a specialization of the `opt_send_without_block` instruction
-# when the method being called is `succ`. Fast paths exist when the receiver
-# is either a String or a Fixnum. It pops the receiver off the stack and
-# pushes on the result.
-#
-# ### Usage
-#
-# ~~~ruby
-# "".succ
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4437
-class SyntaxTree::YARV::OptSucc < ::SyntaxTree::YARV::Instruction
- # @return [OptSucc] a new instance of OptSucc
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4440
- def initialize(calldata); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4456
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4476
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4438
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4472
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4452
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4444
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4460
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4464
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4468
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4448
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `pop` pops the top value off the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# a ||= 2
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4491
-class SyntaxTree::YARV::Pop < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4504
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4512
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4500
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4492
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4508
- def pops; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4516
- def side_effects?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4496
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `putnil` pushes a global nil object onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# nil
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4531
-class SyntaxTree::YARV::PutNil < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4544
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4556
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4552
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4540
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4532
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4548
- def pushes; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4560
- def side_effects?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4536
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `putobject` pushes a known value onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# 5
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4575
-class SyntaxTree::YARV::PutObject < ::SyntaxTree::YARV::Instruction
- # @return [PutObject] a new instance of PutObject
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4578
- def initialize(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4594
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4606
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4590
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4582
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4598
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4576
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4602
- def pushes; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4610
- def side_effects?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4586
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `putobject_INT2FIX_0_` pushes 0 on the stack. It is a specialized
-# instruction resulting from the operand unification optimization. It is
-# equivalent to `putobject 0`.
-#
-# ### Usage
-#
-# ~~~ruby
-# 0
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4627
-class SyntaxTree::YARV::PutObjectInt2Fix0 < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4640
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4652
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4648
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4636
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4628
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4644
- def pushes; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4656
- def side_effects?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4632
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `putobject_INT2FIX_1_` pushes 1 on the stack. It is a specialized
-# instruction resulting from the operand unification optimization. It is
-# equivalent to `putobject 1`.
-#
-# ### Usage
-#
-# ~~~ruby
-# 1
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4673
-class SyntaxTree::YARV::PutObjectInt2Fix1 < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4686
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4698
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4694
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4682
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4674
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4690
- def pushes; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4702
- def side_effects?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4678
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `putself` pushes the current value of self onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# puts "Hello, world!"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4717
-class SyntaxTree::YARV::PutSelf < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4730
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4738
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4726
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4718
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4734
- def pushes; end
-
- # @return [Boolean]
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4742
- def side_effects?; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4722
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `putspecialobject` pushes one of three special objects onto the stack.
-# These are either the VM core special object, the class base special
-# object, or the constant base special object.
-#
-# ### Usage
-#
-# ~~~ruby
-# alias foo bar
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4759
-class SyntaxTree::YARV::PutSpecialObject < ::SyntaxTree::YARV::Instruction
- # @return [PutSpecialObject] a new instance of PutSpecialObject
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4766
- def initialize(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4782
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4794
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4778
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4770
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4786
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4764
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4790
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4774
- def to_a(_iseq); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4761
-SyntaxTree::YARV::PutSpecialObject::OBJECT_CBASE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4762
-SyntaxTree::YARV::PutSpecialObject::OBJECT_CONST_BASE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4760
-SyntaxTree::YARV::PutSpecialObject::OBJECT_VMCORE = T.let(T.unsafe(nil), Integer)
-
-# ### Summary
-#
-# `putstring` pushes an unfrozen string literal onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# "foo"
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4818
-class SyntaxTree::YARV::PutString < ::SyntaxTree::YARV::Instruction
- # @return [PutString] a new instance of PutString
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4821
- def initialize(object); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4837
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4849
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4833
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4825
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4841
- def length; end
-
- # Returns the value of attribute object.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4819
- def object; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4845
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4829
- def to_a(_iseq); end
-end
-
-# A sea of nodes is an intermediate representation used by a compiler to
-# represent both control and data flow in the same graph. The way we use it
-# allows us to have the vertices of the graph represent either an
-# instruction in the instruction sequence or a synthesized node that we add
-# to the graph. The edges of the graph represent either control flow or data
-# flow.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#11
-class SyntaxTree::YARV::SeaOfNodes
- # @return [SeaOfNodes] a new instance of SeaOfNodes
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#462
- def initialize(dfg, nodes, local_graphs); end
-
- # Returns the value of attribute dfg.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460
- def dfg; end
-
- # Returns the value of attribute local_graphs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460
- def local_graphs; end
-
- # Returns the value of attribute nodes.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460
- def nodes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#468
- def to_mermaid; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#499
- def verify; end
-
- class << self
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#529
- def compile(dfg); end
- end
-end
-
-# The compiler is responsible for taking a data flow graph and turning it
-# into a sea of nodes.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#100
-class SyntaxTree::YARV::SeaOfNodes::Compiler
- # @return [Compiler] a new instance of Compiler
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#103
- def initialize(dfg); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#113
- def compile; end
-
- # Returns the value of attribute dfg.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101
- def dfg; end
-
- # Returns the value of attribute nodes.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101
- def nodes; end
-
- private
-
- # Eliminate as many unnecessary nodes as we can.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#339
- def cleanup_insn_nodes; end
-
- # We don't always build things in an optimal way. Go back and fix up
- # some mess we left. Ideally we wouldn't create these problems in the
- # first place.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#315
- def cleanup_phi_nodes; end
-
- # Connect one node to another.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#423
- def connect(from, to, type, label = T.unsafe(nil)); end
-
- # Connect control flow that flows between basic blocks.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#246
- def connect_local_graphs_control(local_graphs); end
-
- # Connect data flow that flows between basic blocks.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#271
- def connect_local_graphs_data(local_graphs); end
-
- # Connect all of the inputs to all of the outputs of a node.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#433
- def connect_over(node); end
-
- # Create a sub-graph for a single basic block - block block argument
- # inputs and outputs will be left dangling, to be connected later.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#136
- def create_local_graph(block); end
-
- # Counter for synthetic nodes.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#130
- def id_counter; end
-
- # Remove a node from the graph.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#447
- def remove(node); end
-end
-
-# The edge of a graph represents either control flow or data flow.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#67
-class SyntaxTree::YARV::SeaOfNodes::Edge
- # @return [Edge] a new instance of Edge
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#75
- def initialize(from, to, type, label); end
-
- # Returns the value of attribute from.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#70
- def from; end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#73
- def label; end
-
- # Returns the value of attribute to.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#71
- def to; end
-
- # Returns the value of attribute type.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#72
- def type; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#68
-SyntaxTree::YARV::SeaOfNodes::Edge::TYPES = T.let(T.unsafe(nil), Array)
-
-# This object represents a node in the graph that holds a YARV
-# instruction.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#14
-class SyntaxTree::YARV::SeaOfNodes::InsnNode
- # @return [InsnNode] a new instance of InsnNode
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#17
- def initialize(insn, offset); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#25
- def id; end
-
- # Returns the value of attribute inputs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15
- def inputs; end
-
- # Returns the value of attribute insn.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15
- def insn; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#29
- def label; end
-
- # Returns the value of attribute offset.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15
- def offset; end
-
- # Returns the value of attribute outputs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15
- def outputs; end
-end
-
-# Merge nodes are present in any block that has multiple incoming blocks.
-# It provides a place for Phi nodes to attach their results.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#52
-class SyntaxTree::YARV::SeaOfNodes::MergeNode
- # @return [MergeNode] a new instance of MergeNode
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#55
- def initialize(id); end
-
- # Returns the value of attribute id.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53
- def id; end
-
- # Returns the value of attribute inputs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53
- def inputs; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#61
- def label; end
-
- # Returns the value of attribute outputs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53
- def outputs; end
-end
-
-# Phi nodes are used to represent the merging of data flow from multiple
-# incoming blocks.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#36
-class SyntaxTree::YARV::SeaOfNodes::PhiNode
- # @return [PhiNode] a new instance of PhiNode
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#39
- def initialize(id); end
-
- # Returns the value of attribute id.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37
- def id; end
-
- # Returns the value of attribute inputs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37
- def inputs; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#45
- def label; end
-
- # Returns the value of attribute outputs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37
- def outputs; end
-end
-
-# A subgraph represents the local data and control flow of a single basic
-# block.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#87
-class SyntaxTree::YARV::SeaOfNodes::SubGraph
- # @return [SubGraph] a new instance of SubGraph
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#90
- def initialize(first_fixed, last_fixed, inputs, outputs); end
-
- # Returns the value of attribute first_fixed.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88
- def first_fixed; end
-
- # Returns the value of attribute inputs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88
- def inputs; end
-
- # Returns the value of attribute last_fixed.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88
- def last_fixed; end
-
- # Returns the value of attribute outputs.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88
- def outputs; end
-end
-
-# ### Summary
-#
-# `send` invokes a method with an optional block. It pops its receiver and
-# the arguments for the method off the stack and pushes the return value
-# onto the stack. It has two arguments: the calldata for the call site and
-# the optional block instruction sequence.
-#
-# ### Usage
-#
-# ~~~ruby
-# "hello".tap { |i| p i }
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4867
-class SyntaxTree::YARV::Send < ::SyntaxTree::YARV::Instruction
- # @return [Send] a new instance of Send
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4870
- def initialize(calldata, block_iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4891
- def ==(other); end
-
- # Returns the value of attribute block_iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4868
- def block_iseq; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4909
- def call(vm); end
-
- # Returns the value of attribute calldata.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4868
- def calldata; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4887
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4875
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4896
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4900
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4905
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4883
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `setblockparam` sets the value of a block local variable on a frame
-# determined by the level and index arguments. The level is the number of
-# frames back to look and the index is the index in the local table. It pops
-# the value it is setting off the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# def foo(&bar)
-# bar = baz
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4951
-class SyntaxTree::YARV::SetBlockParam < ::SyntaxTree::YARV::Instruction
- # @return [SetBlockParam] a new instance of SetBlockParam
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4954
- def initialize(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4973
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4986
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4969
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4952
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4978
- def length; end
-
- # Returns the value of attribute level.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4952
- def level; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4982
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4963
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `setclassvariable` looks for a class variable in the current class and
-# sets its value to the value it pops off the top of the stack. It uses an
-# inline cache to reduce the need to lookup the class variable in the class
-# hierarchy every time.
-#
-# ### Usage
-#
-# ~~~ruby
-# @@class_variable = 1
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5004
-class SyntaxTree::YARV::SetClassVariable < ::SyntaxTree::YARV::Instruction
- # @return [SetClassVariable] a new instance of SetClassVariable
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5007
- def initialize(name, cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5027
- def ==(other); end
-
- # Returns the value of attribute cache.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5005
- def cache; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5040
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5023
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5012
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5032
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5005
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5036
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5019
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `setconstant` pops two values off the stack: the value to set the
-# constant to and the constant base to set it in.
-#
-# ### Usage
-#
-# ~~~ruby
-# Constant = 1
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5058
-class SyntaxTree::YARV::SetConstant < ::SyntaxTree::YARV::Instruction
- # @return [SetConstant] a new instance of SetConstant
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5061
- def initialize(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5077
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5089
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5073
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5065
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5081
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5059
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5085
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5069
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `setglobal` sets the value of a global variable to a value popped off the
-# top of the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# $global = 5
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5106
-class SyntaxTree::YARV::SetGlobal < ::SyntaxTree::YARV::Instruction
- # @return [SetGlobal] a new instance of SetGlobal
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5109
- def initialize(name); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5125
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5137
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5121
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5113
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5129
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5107
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5133
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5117
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `setinstancevariable` pops a value off the top of the stack and then sets
-# the instance variable associated with the instruction to that value.
-#
-# This instruction has two forms, but both have the same structure. Before
-# Ruby 3.2, the inline cache corresponded to both the get and set
-# instructions and could be shared. Since Ruby 3.2, it uses object shapes
-# instead so the caches are unique per instruction.
-#
-# ### Usage
-#
-# ~~~ruby
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5160
-class SyntaxTree::YARV::SetInstanceVariable < ::SyntaxTree::YARV::Instruction
- # @return [SetInstanceVariable] a new instance of SetInstanceVariable
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5163
- def initialize(name, cache); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5183
- def ==(other); end
-
- # Returns the value of attribute cache.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5161
- def cache; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5196
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5179
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5168
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5188
- def length; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5161
- def name; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5192
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5175
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `setlocal` sets the value of a local variable on a frame determined by the
-# level and index arguments. The level is the number of frames back to
-# look and the index is the index in the local table. It pops the value it
-# is setting off the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# value = 5
-# tap { tap { value = 10 } }
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5216
-class SyntaxTree::YARV::SetLocal < ::SyntaxTree::YARV::Instruction
- # @return [SetLocal] a new instance of SetLocal
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5219
- def initialize(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5238
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5250
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5234
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5224
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5217
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5242
- def length; end
-
- # Returns the value of attribute level.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5217
- def level; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5246
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5228
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `setlocal_WC_0` is a specialized version of the `setlocal` instruction. It
-# sets the value of a local variable on the current frame to the value at
-# the top of the stack as determined by the index given as its only
-# argument.
-#
-# ### Usage
-#
-# ~~~ruby
-# value = 5
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5268
-class SyntaxTree::YARV::SetLocalWC0 < ::SyntaxTree::YARV::Instruction
- # @return [SetLocalWC0] a new instance of SetLocalWC0
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5271
- def initialize(index); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5287
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5303
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5299
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5283
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5275
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5269
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5291
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5295
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5279
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `setlocal_WC_1` is a specialized version of the `setlocal` instruction. It
-# sets the value of a local variable on the parent frame to the value at the
-# top of the stack as determined by the index given as its only argument.
-#
-# ### Usage
-#
-# ~~~ruby
-# value = 5
-# self.then { value = 10 }
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5321
-class SyntaxTree::YARV::SetLocalWC1 < ::SyntaxTree::YARV::Instruction
- # @return [SetLocalWC1] a new instance of SetLocalWC1
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5324
- def initialize(index); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5340
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5356
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5352
- def canonical; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5336
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5328
- def disasm(fmt); end
-
- # Returns the value of attribute index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5322
- def index; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5344
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5348
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5332
- def to_a(iseq); end
-end
-
-# ### Summary
-#
-# `setn` sets a value in the stack to a value popped off the top of the
-# stack. It then pushes that value onto the top of the stack as well.
-#
-# ### Usage
-#
-# ~~~ruby
-# {}[:key] = 'val'
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5372
-class SyntaxTree::YARV::SetN < ::SyntaxTree::YARV::Instruction
- # @return [SetN] a new instance of SetN
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5375
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5391
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5407
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5387
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5379
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5395
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5373
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5399
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5403
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5383
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `setspecial` pops a value off the top of the stack and sets a special
-# local variable to that value. The special local variable is determined by
-# the key given as its only argument.
-#
-# ### Usage
-#
-# ~~~ruby
-# baz if (foo == 1) .. (bar == 1)
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5424
-class SyntaxTree::YARV::SetSpecial < ::SyntaxTree::YARV::Instruction
- # @return [SetSpecial] a new instance of SetSpecial
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5427
- def initialize(key); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5443
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5455
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5439
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5431
- def disasm(fmt); end
-
- # Returns the value of attribute key.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5425
- def key; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5447
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5451
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5435
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `splatarray` coerces the array object at the top of the stack into Array
-# by calling `to_a`. It pushes a duplicate of the array if there is a flag,
-# and the original array if there isn't one.
-#
-# ### Usage
-#
-# ~~~ruby
-# x = *(5)
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5479
-class SyntaxTree::YARV::SplatArray < ::SyntaxTree::YARV::Instruction
- # @return [SplatArray] a new instance of SplatArray
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5482
- def initialize(flag); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5498
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5514
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5494
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5486
- def disasm(fmt); end
-
- # Returns the value of attribute flag.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5480
- def flag; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5502
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5506
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5510
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5490
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `swap` swaps the top two elements in the stack.
-#
-# ### TracePoint
-#
-# `swap` does not dispatch any events.
-#
-# ### Usage
-#
-# ~~~ruby
-# !!defined?([[]])
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5553
-class SyntaxTree::YARV::Swap < ::SyntaxTree::YARV::Instruction
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5566
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5578
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5562
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5554
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5570
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5574
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5558
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `throw` pops a value off the top of the stack and throws it. It is caught
-# using the instruction sequence's (or an ancestor's) catch table. It pushes
-# on the result of throwing the value.
-#
-# ### Usage
-#
-# ~~~ruby
-# [1, 2, 3].map { break 2 }
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5596
-class SyntaxTree::YARV::Throw < ::SyntaxTree::YARV::Instruction
- # @return [Throw] a new instance of Throw
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5612
- def initialize(type); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5628
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5644
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5624
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5616
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5632
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5636
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5640
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5620
- def to_a(_iseq); end
-
- # Returns the value of attribute type.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5610
- def type; end
-
- private
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5671
- def error_backtrace(vm); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5599
-SyntaxTree::YARV::Throw::RUBY_TAG_BREAK = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5605
-SyntaxTree::YARV::Throw::RUBY_TAG_FATAL = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5600
-SyntaxTree::YARV::Throw::RUBY_TAG_NEXT = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5597
-SyntaxTree::YARV::Throw::RUBY_TAG_NONE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5603
-SyntaxTree::YARV::Throw::RUBY_TAG_RAISE = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5602
-SyntaxTree::YARV::Throw::RUBY_TAG_REDO = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5601
-SyntaxTree::YARV::Throw::RUBY_TAG_RETRY = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5598
-SyntaxTree::YARV::Throw::RUBY_TAG_RETURN = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5604
-SyntaxTree::YARV::Throw::RUBY_TAG_THROW = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5607
-SyntaxTree::YARV::Throw::VM_THROW_NO_ESCAPE_FLAG = T.let(T.unsafe(nil), Integer)
-
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5608
-SyntaxTree::YARV::Throw::VM_THROW_STATE_MASK = T.let(T.unsafe(nil), Integer)
-
-# ### Summary
-#
-# `toregexp` pops a number of values off the stack, combines them into a new
-# regular expression, and pushes the new regular expression onto the stack.
-#
-# ### Usage
-#
-# ~~~ruby
-# /foo #{bar}/
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5746
-class SyntaxTree::YARV::ToRegExp < ::SyntaxTree::YARV::Instruction
- # @return [ToRegExp] a new instance of ToRegExp
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5749
- def initialize(options, length); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5766
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5779
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5762
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5754
- def disasm(fmt); end
-
- # Returns the value of attribute length.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5747
- def length; end
-
- # Returns the value of attribute options.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5747
- def options; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5771
- def pops; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5775
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5758
- def to_a(_iseq); end
-end
-
-# ### Summary
-#
-# `topn` pushes a single value onto the stack that is a copy of the value
-# within the stack that is `number` of slots down from the top.
-#
-# ### Usage
-#
-# ~~~ruby
-# case 3
-# when 1..5
-# puts "foo"
-# end
-# ~~~
-#
-# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5699
-class SyntaxTree::YARV::TopN < ::SyntaxTree::YARV::Instruction
- # @return [TopN] a new instance of TopN
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5702
- def initialize(number); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5718
- def ==(other); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5730
- def call(vm); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5714
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5706
- def disasm(fmt); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5722
- def length; end
-
- # Returns the value of attribute number.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5700
- def number; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5726
- def pushes; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5710
- def to_a(_iseq); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#8
-class SyntaxTree::YARV::VM
- extend ::Forwardable
-
- # @return [VM] a new instance of VM
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#216
- def initialize(events = T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#623
- def catch(tag, &block); end
-
- # Helper methods for instructions
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#494
- def const_base; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#610
- def eval(source, binding = T.unsafe(nil), filename = T.unsafe(nil), lineno = T.unsafe(nil)); end
-
- # Returns the value of attribute events.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#209
- def events; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#344
- def find_catch_entry(frame, type); end
-
- # Returns the value of attribute frame.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#214
- def frame; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#498
- def frame_at(level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#504
- def frame_svar; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#510
- def frame_yield; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#516
- def frozen_core; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#520
- def jump(label); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#524
- def leave; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#606
- def load(filepath); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#528
- def local_get(index, level); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#532
- def local_set(index, level, value); end
-
- # source://forwardable/1.3.3/forwardable.rb#231
- def pop(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.3/forwardable.rb#231
- def push(*args, **_arg1, &block); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#598
- def require(filepath); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#549
- def require_internal(filepath, loading: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#602
- def require_relative(filepath); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#543
- def require_resolved(filepath); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#360
- def run_block_frame(iseq, frame, *args, **kwargs, &block); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#366
- def run_class_frame(iseq, clazz); end
-
- # Helper methods for frames
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#230
- def run_frame(frame); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#370
- def run_method_frame(name, nesting, iseq, _self, *args, **kwargs, &block); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#384
- def run_rescue_frame(iseq, frame, error); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#356
- def run_top_frame(iseq); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#391
- def setup_arguments(iseq, args, kwargs, block); end
-
- # Returns the value of attribute stack.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#211
- def stack; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#619
- def throw(tag, value = T.unsafe(nil)); end
-
- class << self
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#222
- def run(iseq); end
- end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#48
-class SyntaxTree::YARV::VM::BlockFrame < ::SyntaxTree::YARV::VM::Frame
- # @return [BlockFrame] a new instance of BlockFrame
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#49
- def initialize(iseq, parent, stack_index); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#89
-class SyntaxTree::YARV::VM::BreakError < ::SyntaxTree::YARV::VM::ThrownError; end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#64
-class SyntaxTree::YARV::VM::ClassFrame < ::SyntaxTree::YARV::VM::Frame
- # @return [ClassFrame] a new instance of ClassFrame
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#65
- def initialize(iseq, parent, stack_index, _self); end
-end
-
-# Methods for overriding runtime behavior
-#
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#540
-SyntaxTree::YARV::VM::DLEXT = T.let(T.unsafe(nil), String)
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#205
-SyntaxTree::YARV::VM::FROZEN_CORE = T.let(T.unsafe(nil), SyntaxTree::YARV::VM::FrozenCore)
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#25
-class SyntaxTree::YARV::VM::Frame
- # @return [Frame] a new instance of Frame
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#29
- def initialize(iseq, parent, stack_index, _self, nesting); end
-
- # Returns the value of attribute _self.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26
- def _self; end
-
- # Returns the value of attribute iseq.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26
- def iseq; end
-
- # Returns the value of attribute line.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27
- def line; end
-
- # Sets the attribute line
- #
- # @param value the value to set the attribute line to.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27
- def line=(_arg0); end
-
- # Returns the value of attribute nesting.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26
- def nesting; end
-
- # Returns the value of attribute parent.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26
- def parent; end
-
- # Returns the value of attribute pc.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27
- def pc; end
-
- # Sets the attribute pc
- #
- # @param value the value to set the attribute pc to.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27
- def pc=(_arg0); end
-
- # Returns the value of attribute stack_index.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26
- def stack_index; end
-
- # Returns the value of attribute svars.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26
- def svars; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#95
-class SyntaxTree::YARV::VM::FrozenCore; end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#9
-class SyntaxTree::YARV::VM::Jump
- # @return [Jump] a new instance of Jump
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#12
- def initialize(label); end
-
- # Returns the value of attribute label.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#10
- def label; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#17
-class SyntaxTree::YARV::VM::Leave
- # @return [Leave] a new instance of Leave
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#20
- def initialize(value); end
-
- # Returns the value of attribute value.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#18
- def value; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#54
-class SyntaxTree::YARV::VM::MethodFrame < ::SyntaxTree::YARV::VM::Frame
- # @return [MethodFrame] a new instance of MethodFrame
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#57
- def initialize(iseq, nesting, parent, stack_index, _self, name, block); end
-
- # Returns the value of attribute block.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55
- def block; end
-
- # Returns the value of attribute name.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55
- def name; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#92
-class SyntaxTree::YARV::VM::NextError < ::SyntaxTree::YARV::VM::ThrownError; end
-
-# This is the main entrypoint for events firing in the VM, which allows
-# us to implement tracing.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#122
-class SyntaxTree::YARV::VM::NullEvents
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#123
- def publish_frame_change(frame); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#126
- def publish_instruction(iseq, insn); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#129
- def publish_stack_change(stack); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#132
- def publish_tracepoint(event); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#70
-class SyntaxTree::YARV::VM::RescueFrame < ::SyntaxTree::YARV::VM::Frame
- # @return [RescueFrame] a new instance of RescueFrame
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#71
- def initialize(iseq, parent, stack_index); end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#86
-class SyntaxTree::YARV::VM::ReturnError < ::SyntaxTree::YARV::VM::ThrownError; end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#541
-SyntaxTree::YARV::VM::SOEXT = T.let(T.unsafe(nil), String)
-
-# This is a simple implementation of tracing that prints to STDOUT.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#137
-class SyntaxTree::YARV::VM::STDOUTEvents
- # @return [STDOUTEvents] a new instance of STDOUTEvents
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#140
- def initialize; end
-
- # Returns the value of attribute disassembler.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#138
- def disassembler; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#144
- def publish_frame_change(frame); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#148
- def publish_instruction(iseq, insn); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#153
- def publish_stack_change(stack); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#157
- def publish_tracepoint(event); end
-end
-
-# This represents the global VM stack. It effectively is an array, but
-# wraps mutating functions with instrumentation.
-#
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#164
-class SyntaxTree::YARV::VM::Stack
- # @return [Stack] a new instance of Stack
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#167
- def initialize(events); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#196
- def [](*_arg0, **_arg1, &_arg2); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#200
- def []=(*_arg0, **_arg1, &_arg2); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#172
- def concat(*_arg0, **_arg1, &_arg2); end
-
- # Returns the value of attribute events.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165
- def events; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#176
- def last; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#180
- def length; end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#188
- def pop(*_arg0, **_arg1, &_arg2); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#184
- def push(*_arg0, **_arg1, &_arg2); end
-
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#192
- def slice!(*_arg0, **_arg1, &_arg2); end
-
- # Returns the value of attribute values.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165
- def values; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#76
-class SyntaxTree::YARV::VM::ThrownError < ::StandardError
- # @return [ThrownError] a new instance of ThrownError
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#79
- def initialize(value, backtrace); end
-
- # Returns the value of attribute value.
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#77
- def value; end
-end
-
-# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#42
-class SyntaxTree::YARV::VM::TopFrame < ::SyntaxTree::YARV::VM::Frame
- # @return [TopFrame] a new instance of TopFrame
- #
- # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#43
- def initialize(iseq); end
-end
-
-# Yield represents using the +yield+ keyword with arguments.
-#
-# yield value
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#12289
-class SyntaxTree::YieldNode < ::SyntaxTree::Node
- # @return [YieldNode] a new instance of YieldNode
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12296
- def initialize(arguments:, location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12350
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12302
- def accept(visitor); end
-
- # [nil | Args | Paren] the arguments passed to the yield
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12291
- def arguments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12306
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12294
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12310
- def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12306
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12323
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12327
- def format(q); end
-end
-
-# ZSuper represents the bare +super+ keyword with no arguments.
-#
-# super
-#
-# source://syntax_tree//lib/syntax_tree/node.rb#12359
-class SyntaxTree::ZSuper < ::SyntaxTree::Node
- # @return [ZSuper] a new instance of ZSuper
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12363
- def initialize(location:); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12393
- def ===(other); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12368
- def accept(visitor); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12372
- def child_nodes; end
-
- # [Array[ Comment | EmbDoc ]] the comments attached to this node
- #
- # source://syntax_tree//lib/syntax_tree/node.rb#12361
- def comments; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12376
- def copy(location: T.unsafe(nil)); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12372
- def deconstruct; end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12385
- def deconstruct_keys(_keys); end
-
- # source://syntax_tree//lib/syntax_tree/node.rb#12389
- def format(q); end
-end
diff --git a/sorbet/rbi/gems/tapioca@0.11.8.rbi b/sorbet/rbi/gems/tapioca@0.12.0.rbi
similarity index 85%
rename from sorbet/rbi/gems/tapioca@0.11.8.rbi
rename to sorbet/rbi/gems/tapioca@0.12.0.rbi
index 87d85021..18dc495e 100644
--- a/sorbet/rbi/gems/tapioca@0.11.8.rbi
+++ b/sorbet/rbi/gems/tapioca@0.12.0.rbi
@@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `tapioca` gem.
@@ -8,6 +8,25 @@ class Bundler::Dependency < ::Gem::Dependency
include ::Tapioca::BundlerExt::AutoRequireHook
end
+# source://tapioca//lib/tapioca/helpers/git_attributes.rb#4
+class GitAttributes
+ class << self
+ # source://tapioca//lib/tapioca/helpers/git_attributes.rb#9
+ sig { params(path: ::Pathname).void }
+ def create_generated_attribute_file(path); end
+
+ # source://tapioca//lib/tapioca/helpers/git_attributes.rb#16
+ sig { params(path: ::Pathname).void }
+ def create_vendored_attribute_file(path); end
+
+ private
+
+ # source://tapioca//lib/tapioca/helpers/git_attributes.rb#25
+ sig { params(path: ::Pathname, content: ::String).void }
+ def create_gitattributes_file(path, content); end
+ end
+end
+
# We need to do the alias-method-chain dance since Bootsnap does the same,
# and prepended modules and alias-method-chain don't play well together.
#
@@ -35,7 +54,7 @@ module RBI; end
# source://tapioca//lib/tapioca/rbi_ext/model.rb#5
class RBI::Tree < ::RBI::NodeWithComments
- # source://rbi/0.0.17/lib/rbi/model.rb#119
+ # source://rbi/0.1.6/lib/rbi/model.rb#119
sig do
params(
loc: T.nilable(::RBI::Loc),
@@ -45,19 +64,19 @@ class RBI::Tree < ::RBI::NodeWithComments
end
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi/0.0.17/lib/rbi/model.rb#126
+ # source://rbi/0.1.6/lib/rbi/model.rb#126
sig { params(node: ::RBI::Node).void }
def <<(node); end
- # source://rbi/0.0.17/lib/rbi/printer.rb#226
+ # source://rbi/0.1.6/lib/rbi/printer.rb#226
sig { override.params(v: ::RBI::Printer).void }
def accept_printer(v); end
- # source://rbi/0.0.17/lib/rbi/rewriters/add_sig_templates.rb#66
+ # source://rbi/0.1.6/lib/rbi/rewriters/add_sig_templates.rb#66
sig { params(with_todo_comment: T::Boolean).void }
def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
- # source://rbi/0.0.17/lib/rbi/rewriters/annotate.rb#49
+ # source://rbi/0.1.6/lib/rbi/rewriters/annotate.rb#49
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
@@ -121,23 +140,23 @@ class RBI::Tree < ::RBI::NodeWithComments
end
def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
- # source://rbi/0.0.17/lib/rbi/rewriters/deannotate.rb#41
+ # source://rbi/0.1.6/lib/rbi/rewriters/deannotate.rb#41
sig { params(annotation: ::String).void }
def deannotate!(annotation); end
- # source://rbi/0.0.17/lib/rbi/model.rb#132
+ # source://rbi/0.1.6/lib/rbi/model.rb#132
sig { returns(T::Boolean) }
def empty?; end
- # source://rbi/0.0.17/lib/rbi/rewriters/group_nodes.rb#38
+ # source://rbi/0.1.6/lib/rbi/rewriters/group_nodes.rb#38
sig { void }
def group_nodes!; end
- # source://rbi/0.0.17/lib/rbi/index.rb#68
+ # source://rbi/0.1.6/lib/rbi/index.rb#68
sig { returns(::RBI::Index) }
def index; end
- # source://rbi/0.0.17/lib/rbi/rewriters/merge_trees.rb#324
+ # source://rbi/0.1.6/lib/rbi/rewriters/merge_trees.rb#324
sig do
params(
other: ::RBI::Tree,
@@ -148,23 +167,23 @@ class RBI::Tree < ::RBI::NodeWithComments
end
def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
- # source://rbi/0.0.17/lib/rbi/rewriters/nest_non_public_methods.rb#46
+ # source://rbi/0.1.6/lib/rbi/rewriters/nest_non_public_methods.rb#46
sig { void }
def nest_non_public_methods!; end
- # source://rbi/0.0.17/lib/rbi/rewriters/nest_singleton_methods.rb#36
+ # source://rbi/0.1.6/lib/rbi/rewriters/nest_singleton_methods.rb#36
sig { void }
def nest_singleton_methods!; end
- # source://rbi/0.0.17/lib/rbi/model.rb#110
+ # source://rbi/0.1.6/lib/rbi/model.rb#110
sig { returns(T::Array[::RBI::Node]) }
def nodes; end
- # source://rbi/0.0.17/lib/rbi/printer.rb#233
+ # source://rbi/0.1.6/lib/rbi/printer.rb#233
sig { override.returns(T::Boolean) }
def oneline?; end
- # source://rbi/0.0.17/lib/rbi/rewriters/sort_nodes.rb#119
+ # source://rbi/0.1.6/lib/rbi/rewriters/sort_nodes.rb#119
sig { void }
def sort_nodes!; end
@@ -185,7 +204,7 @@ class RBI::TypedParam < ::T::Struct
const :type, ::String
class << self
- # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11219/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -197,14 +216,14 @@ module T::Generic
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13
def [](*types); end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#47
def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21
- def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end
+ def type_member(variance = T.unsafe(nil), &bounds_proc); end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#37
- def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34
+ def type_template(variance = T.unsafe(nil), &bounds_proc); end
end
# This module intercepts calls to generic type instantiations and type variable definitions.
@@ -219,14 +238,14 @@ module T::Generic::TypeStoragePatch
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13
def [](*types); end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#47
def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21
- def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end
+ def type_member(variance = T.unsafe(nil), &bounds_proc); end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#37
- def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34
+ def type_template(variance = T.unsafe(nil), &bounds_proc); end
end
# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#28
@@ -310,18 +329,18 @@ end
# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#6
class T::Types::Simple < ::T::Types::Base
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70
def name; end
end
-# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#74
+# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#65
module T::Types::Simple::GenericPatch
# This method intercepts calls to the `name` method for simple types, so that
# it can ask the name to the type if the type is generic, since, by this point,
# we've created a clone of that type with the `name` method returning the
# appropriate name for that specific concrete type.
#
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70
def name; end
end
@@ -337,17 +356,17 @@ end
# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8
T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod)
-# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#99
+# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#87
module T::Utils::Private
class << self
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89
def coerce_and_check_module_types(val, check_val, check_module_type); end
end
end
-# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#100
+# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#88
module T::Utils::Private::PrivateCoercePatch
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89
def coerce_and_check_module_types(val, check_val, check_module_type); end
end
@@ -420,40 +439,42 @@ class Tapioca::Cli < ::Thor
include ::Tapioca::ConfigHelper
include ::Tapioca::EnvHelper
- # source://tapioca//lib/tapioca/cli.rb#346
+ # source://tapioca//lib/tapioca/cli.rb#355
def __print_version; end
- # source://tapioca//lib/tapioca/cli.rb#326
+ # source://tapioca//lib/tapioca/cli.rb#337
def annotations; end
- # source://tapioca//lib/tapioca/cli.rb#296
+ # source://tapioca//lib/tapioca/cli.rb#309
def check_shims; end
- # source://tapioca//lib/tapioca/cli.rb#41
+ # source://tapioca//lib/tapioca/cli.rb#46
def configure; end
- # source://tapioca//lib/tapioca/cli.rb#137
+ # source://tapioca//lib/tapioca/cli.rb#138
def dsl(*constant_or_paths); end
- # source://tapioca//lib/tapioca/cli.rb#247
+ # @raise [MalformattedArgumentError]
+ #
+ # source://tapioca//lib/tapioca/cli.rb#253
def gem(*gems); end
# source://tapioca//lib/tapioca/cli.rb#27
def init; end
- # source://tapioca//lib/tapioca/cli.rb#52
+ # source://tapioca//lib/tapioca/cli.rb#57
def require; end
- # source://tapioca//lib/tapioca/cli.rb#71
+ # source://tapioca//lib/tapioca/cli.rb#74
def todo; end
private
- # source://tapioca//lib/tapioca/cli.rb#360
+ # source://tapioca//lib/tapioca/cli.rb#369
def print_init_next_steps; end
class << self
- # source://tapioca//lib/tapioca/cli.rb#352
+ # source://tapioca//lib/tapioca/cli.rb#361
def exit_on_failure?; end
end
end
@@ -481,6 +502,239 @@ end
# source://tapioca//lib/tapioca/commands.rb#5
module Tapioca::Commands; end
+# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
+#
+# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#6
+class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracker
+ include ::Tapioca::SorbetHelper
+ include ::Tapioca::RBIFilesHelper
+
+ abstract!
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#31
+ sig do
+ params(
+ requested_constants: T::Array[::String],
+ requested_paths: T::Array[::Pathname],
+ outpath: ::Pathname,
+ only: T::Array[::String],
+ exclude: T::Array[::String],
+ file_header: T::Boolean,
+ tapioca_path: ::String,
+ quiet: T::Boolean,
+ verbose: T::Boolean,
+ number_of_workers: T.nilable(::Integer),
+ auto_strictness: T::Boolean,
+ gem_dir: ::String,
+ rbi_formatter: ::Tapioca::RBIFormatter,
+ app_root: ::String,
+ halt_upon_load_error: T::Boolean
+ ).void
+ end
+ def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end
+
+ private
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#94
+ sig { returns(T::Array[::String]) }
+ def all_requested_constants; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#284
+ sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
+ def build_error_for_files(cause, files); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#208
+ sig do
+ params(
+ constant_name: ::String,
+ rbi: ::RBI::File,
+ outpath: ::Pathname,
+ quiet: T::Boolean
+ ).returns(T.nilable(::Pathname))
+ end
+ def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#146
+ sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) }
+ def constantize(constant_names, ignore_missing: T.unsafe(nil)); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#169
+ sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) }
+ def constantize_compilers(compiler_names); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#344
+ sig { returns(T::Array[::String]) }
+ def constants_from_requested_paths; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#117
+ sig { returns(::Tapioca::Dsl::Pipeline) }
+ def create_pipeline; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#247
+ sig { params(constant_name: ::String).returns(::Pathname) }
+ def dsl_rbi_filename(constant_name); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#132
+ sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) }
+ def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#339
+ sig { params(constant: ::String).returns(::String) }
+ def generate_command_for(constant); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#70
+ sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) }
+ def generate_dsl_rbi_files(outpath, quiet:); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#107
+ sig { void }
+ def load_application; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#226
+ sig { params(dir: ::Pathname).void }
+ def perform_dsl_verification(dir); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#102
+ sig { returns(::Tapioca::Dsl::Pipeline) }
+ def pipeline; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235
+ sig { params(files: T::Set[::Pathname]).void }
+ def purge_stale_dsl_rbi_files(files); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#334
+ sig { params(constant: ::String).returns(::String) }
+ def rbi_filename_for(constant); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#315
+ sig { params(path: ::Pathname).returns(T::Array[::Pathname]) }
+ def rbi_files_in(path); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293
+ sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
+ def report_diff_and_exit_if_out_of_date(diff, command); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#188
+ sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) }
+ def resolve(name); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#322
+ sig { params(class_name: ::String).returns(::String) }
+ def underscore(class_name); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#252
+ sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) }
+ def verify_dsl_rbi(tmp_dir:); end
+end
+
+# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
+#
+# source://tapioca//lib/tapioca/commands/abstract_gem.rb#6
+class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command
+ include ::Tapioca::SorbetHelper
+ include ::Tapioca::RBIFilesHelper
+
+ abstract!
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#32
+ sig do
+ params(
+ gem_names: T::Array[::String],
+ exclude: T::Array[::String],
+ include_dependencies: T::Boolean,
+ prerequire: T.nilable(::String),
+ postrequire: ::String,
+ typed_overrides: T::Hash[::String, ::String],
+ outpath: ::Pathname,
+ file_header: T::Boolean,
+ include_doc: T::Boolean,
+ include_loc: T::Boolean,
+ include_exported_rbis: T::Boolean,
+ number_of_workers: T.nilable(::Integer),
+ auto_strictness: T::Boolean,
+ dsl_dir: ::String,
+ rbi_formatter: ::Tapioca::RBIFormatter,
+ halt_upon_load_error: T::Boolean
+ ).void
+ end
+ def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end
+
+ private
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#221
+ sig { returns(T::Array[::String]) }
+ def added_rbis; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#282
+ sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
+ def build_error_for_files(cause, files); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#110
+ sig { params(gem: ::Tapioca::Gemfile::GemSpec).void }
+ def compile_gem_rbi(gem); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#216
+ sig { params(gem_name: ::String).returns(::Pathname) }
+ def existing_rbi(gem_name); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#264
+ sig { returns(T::Hash[::String, ::String]) }
+ def existing_rbis; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#228
+ sig { params(gem_name: ::String).returns(::Pathname) }
+ def expected_rbi(gem_name); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#270
+ sig { returns(T::Hash[::String, ::String]) }
+ def expected_rbis; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#98
+ sig do
+ params(
+ gem: ::Tapioca::Gemfile::GemSpec,
+ dependencies: T::Array[::Tapioca::Gemfile::GemSpec]
+ ).returns(T::Array[::Tapioca::Gemfile::GemSpec])
+ end
+ def gem_dependencies(gem, dependencies = T.unsafe(nil)); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#233
+ sig { params(gem_name: ::String).returns(T::Boolean) }
+ def gem_rbi_exists?(gem_name); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#277
+ sig { params(gem_name: ::String, version: ::String).returns(::Pathname) }
+ def gem_rbi_filename(gem_name, version); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#77
+ sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) }
+ def gems_to_generate(gem_names); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#287
+ sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void }
+ def merge_with_exported_rbi(gem, file); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#258
+ sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void }
+ def move(old_filename, new_filename); end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#168
+ sig { void }
+ def perform_additions; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#141
+ sig { void }
+ def perform_removals; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#211
+ sig { returns(T::Array[::String]) }
+ def removed_rbis; end
+
+ # source://tapioca//lib/tapioca/commands/abstract_gem.rb#238
+ sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
+ def report_diff_and_exit_if_out_of_date(diff, command); end
+end
+
# source://tapioca//lib/tapioca/commands/annotations.rb#6
class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker
# source://tapioca//lib/tapioca/commands/annotations.rb#18
@@ -495,69 +749,69 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke
end
def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#36
- sig { override.void }
- def execute; end
-
private
- # source://tapioca//lib/tapioca/commands/annotations.rb#191
+ # source://tapioca//lib/tapioca/commands/annotations.rb#193
sig { params(name: ::String, content: ::String).returns(::String) }
def add_header(name, content); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#211
+ # source://tapioca//lib/tapioca/commands/annotations.rb#213
sig { params(name: ::String, content: ::String).returns(::String) }
def apply_typed_override(name, content); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#132
+ # source://tapioca//lib/tapioca/commands/annotations.rb#39
+ sig { override.void }
+ def execute; end
+
+ # source://tapioca//lib/tapioca/commands/annotations.rb#136
sig { params(repo_uris: T::Array[::String], gem_name: ::String).void }
def fetch_annotation(repo_uris, gem_name); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#109
+ # source://tapioca//lib/tapioca/commands/annotations.rb#113
sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) }
def fetch_annotations(gem_names); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#150
+ # source://tapioca//lib/tapioca/commands/annotations.rb#152
sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
def fetch_file(repo_uri, path); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#167
+ # source://tapioca//lib/tapioca/commands/annotations.rb#169
sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
def fetch_http_file(repo_uri, path); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#98
+ # source://tapioca//lib/tapioca/commands/annotations.rb#102
sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) }
def fetch_index(repo_uri, repo_number:); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#77
+ # source://tapioca//lib/tapioca/commands/annotations.rb#81
sig { returns(T::Hash[::String, Tapioca::RepoIndex]) }
def fetch_indexes; end
- # source://tapioca//lib/tapioca/commands/annotations.rb#159
+ # source://tapioca//lib/tapioca/commands/annotations.rb#161
sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
def fetch_local_file(repo_uri, path); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#46
+ # source://tapioca//lib/tapioca/commands/annotations.rb#50
sig { returns(T::Array[::String]) }
def list_gemfile_gems; end
- # source://tapioca//lib/tapioca/commands/annotations.rb#223
+ # source://tapioca//lib/tapioca/commands/annotations.rb#225
sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) }
def merge_files(gem_name, contents); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#56
+ # source://tapioca//lib/tapioca/commands/annotations.rb#60
sig { params(project_gems: T::Array[::String]).void }
def remove_expired_annotations(project_gems); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#250
+ # source://tapioca//lib/tapioca/commands/annotations.rb#252
sig { returns(T::Hash[::String, T.nilable(::String)]) }
def repo_tokens; end
- # source://tapioca//lib/tapioca/commands/annotations.rb#278
+ # source://tapioca//lib/tapioca/commands/annotations.rb#280
sig { params(path: ::String, repo_uri: ::String, message: ::String).void }
def say_http_error(path, repo_uri, message:); end
- # source://tapioca//lib/tapioca/commands/annotations.rb#262
+ # source://tapioca//lib/tapioca/commands/annotations.rb#264
sig { params(repo_uri: ::String).returns(T.nilable(::String)) }
def token_for(repo_uri); end
end
@@ -581,7 +835,9 @@ class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker
end
def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end
- # source://tapioca//lib/tapioca/commands/check_shims.rb#42
+ private
+
+ # source://tapioca//lib/tapioca/commands/check_shims.rb#44
sig { override.void }
def execute; end
end
@@ -603,19 +859,17 @@ class Tapioca::Commands::Command
sig { void }
def initialize; end
- # @abstract
- #
- # source://tapioca//lib/tapioca/commands/command.rb#25
- sig { abstract.void }
- def execute; end
-
- # source://thor/1.2.2/lib/thor/base.rb#139
+ # source://thor/1.3.0/lib/thor/base.rb#155
sig { returns(::Thor::Actions) }
def file_writer; end
+ # source://tapioca//lib/tapioca/commands/command.rb#25
+ sig(:final) { void }
+ def run; end
+
private
- # source://tapioca//lib/tapioca/commands/command.rb#46
+ # source://tapioca//lib/tapioca/commands/command.rb#53
sig do
params(
path: T.any(::Pathname, ::String),
@@ -627,11 +881,17 @@ class Tapioca::Commands::Command
end
def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end
- # source://tapioca//lib/tapioca/commands/command.rb#30
+ # source://tapioca//lib/tapioca/commands/command.rb#37
sig { params(command: ::Symbol, args: ::String).returns(::String) }
def default_command(command, *args); end
- # source://tapioca//lib/tapioca/commands/command.rb#56
+ # @abstract
+ #
+ # source://tapioca//lib/tapioca/commands/command.rb#34
+ sig { abstract.void }
+ def execute; end
+
+ # source://tapioca//lib/tapioca/commands/command.rb#63
sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void }
def remove_file(path, verbose: T.unsafe(nil)); end
end
@@ -659,10 +919,6 @@ class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker
sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void }
def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end
- # source://tapioca//lib/tapioca/commands/configure.rb#30
- sig { override.void }
- def execute; end
-
private
# source://tapioca//lib/tapioca/commands/configure.rb#79
@@ -681,6 +937,10 @@ class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker
sig { void }
def create_tapioca_config; end
+ # source://tapioca//lib/tapioca/commands/configure.rb#32
+ sig { override.void }
+ def execute; end
+
# source://tapioca//lib/tapioca/commands/configure.rb#92
sig { returns(::Bundler::Installer) }
def installer; end
@@ -690,224 +950,62 @@ class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker
def spec; end
end
-# source://tapioca//lib/tapioca/commands/dsl.rb#6
-class Tapioca::Commands::Dsl < ::Tapioca::Commands::CommandWithoutTracker
- include ::Tapioca::SorbetHelper
- include ::Tapioca::RBIFilesHelper
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#30
- sig do
- params(
- requested_constants: T::Array[::String],
- requested_paths: T::Array[::Pathname],
- outpath: ::Pathname,
- only: T::Array[::String],
- exclude: T::Array[::String],
- file_header: T::Boolean,
- tapioca_path: ::String,
- should_verify: T::Boolean,
- quiet: T::Boolean,
- verbose: T::Boolean,
- number_of_workers: T.nilable(::Integer),
- auto_strictness: T::Boolean,
- gem_dir: ::String,
- rbi_formatter: ::Tapioca::RBIFormatter,
- app_root: ::String,
- halt_upon_load_error: T::Boolean
- ).void
- end
- def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end
+# source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#6
+class Tapioca::Commands::DslCompilerList < ::Tapioca::Commands::AbstractDsl
+ private
- # source://tapioca//lib/tapioca/commands/dsl.rb#97
+ # source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#10
sig { override.void }
def execute; end
+end
- # source://tapioca//lib/tapioca/commands/dsl.rb#69
- sig { void }
- def list_compilers; end
-
+# source://tapioca//lib/tapioca/commands/dsl_generate.rb#6
+class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl
private
- # source://tapioca//lib/tapioca/commands/dsl.rb#330
- sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
- def build_error_for_files(cause, files); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#254
- sig do
- params(
- constant_name: ::String,
- rbi: ::RBI::File,
- outpath: ::Pathname,
- quiet: T::Boolean
- ).returns(T.nilable(::Pathname))
- end
- def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#192
- sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) }
- def constantize(constant_names, ignore_missing: T.unsafe(nil)); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#215
- sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) }
- def constantize_compilers(compiler_names); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#390
- sig { returns(T::Array[::String]) }
- def constants_from_requested_paths; end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#163
- sig { returns(::Tapioca::Dsl::Pipeline) }
- def create_pipeline; end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#293
- sig { params(constant_name: ::String).returns(::Pathname) }
- def dsl_rbi_filename(constant_name); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#178
- sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) }
- def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#385
- sig { params(constant: ::String).returns(::String) }
- def generate_command_for(constant); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#272
- sig { params(dir: ::Pathname).void }
- def perform_dsl_verification(dir); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#281
- sig { params(files: T::Set[::Pathname]).void }
- def purge_stale_dsl_rbi_files(files); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#380
- sig { params(constant: ::String).returns(::String) }
- def rbi_filename_for(constant); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#361
- sig { params(path: ::Pathname).returns(T::Array[::Pathname]) }
- def rbi_files_in(path); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#339
- sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
- def report_diff_and_exit_if_out_of_date(diff, command); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#234
- sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) }
- def resolve(name); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#368
- sig { params(class_name: ::String).returns(::String) }
- def underscore(class_name); end
-
- # source://tapioca//lib/tapioca/commands/dsl.rb#298
- sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) }
- def verify_dsl_rbi(tmp_dir:); end
+ # source://tapioca//lib/tapioca/commands/dsl_generate.rb#10
+ sig { override.void }
+ def execute; end
end
-# source://tapioca//lib/tapioca/commands/gem.rb#6
-class Tapioca::Commands::Gem < ::Tapioca::Commands::Command
- include ::Tapioca::SorbetHelper
- include ::Tapioca::RBIFilesHelper
-
- # source://tapioca//lib/tapioca/commands/gem.rb#29
- sig do
- params(
- gem_names: T::Array[::String],
- exclude: T::Array[::String],
- prerequire: T.nilable(::String),
- postrequire: ::String,
- typed_overrides: T::Hash[::String, ::String],
- outpath: ::Pathname,
- file_header: T::Boolean,
- include_doc: T::Boolean,
- include_loc: T::Boolean,
- include_exported_rbis: T::Boolean,
- number_of_workers: T.nilable(::Integer),
- auto_strictness: T::Boolean,
- dsl_dir: ::String,
- rbi_formatter: ::Tapioca::RBIFormatter,
- halt_upon_load_error: T::Boolean
- ).void
- end
- def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end
+# source://tapioca//lib/tapioca/commands/dsl_verify.rb#6
+class Tapioca::Commands::DslVerify < ::Tapioca::Commands::AbstractDsl
+ private
- # source://tapioca//lib/tapioca/commands/gem.rb#70
+ # source://tapioca//lib/tapioca/commands/dsl_verify.rb#10
sig { override.void }
def execute; end
+end
- # source://tapioca//lib/tapioca/commands/gem.rb#109
- sig { params(should_verify: T::Boolean, exclude: T::Array[::String]).void }
- def sync(should_verify: T.unsafe(nil), exclude: T.unsafe(nil)); end
-
+# source://tapioca//lib/tapioca/commands/gem_generate.rb#6
+class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem
private
- # source://tapioca//lib/tapioca/commands/gem.rb#288
- sig { returns(T::Array[::String]) }
- def added_rbis; end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#349
- sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
- def build_error_for_files(cause, files); end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#158
- sig { params(gem: ::Tapioca::Gemfile::GemSpec).void }
- def compile_gem_rbi(gem); end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#283
- sig { params(gem_name: ::String).returns(::Pathname) }
- def existing_rbi(gem_name); end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#331
- sig { returns(T::Hash[::String, ::String]) }
- def existing_rbis; end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#295
- sig { params(gem_name: ::String).returns(::Pathname) }
- def expected_rbi(gem_name); end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#337
- sig { returns(T::Hash[::String, ::String]) }
- def expected_rbis; end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#300
- sig { params(gem_name: ::String).returns(T::Boolean) }
- def gem_rbi_exists?(gem_name); end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#344
- sig { params(gem_name: ::String, version: ::String).returns(::Pathname) }
- def gem_rbi_filename(gem_name, version); end
+ # source://tapioca//lib/tapioca/commands/gem_generate.rb#10
+ sig { override.void }
+ def execute; end
+end
- # source://tapioca//lib/tapioca/commands/gem.rb#143
- sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) }
- def gems_to_generate(gem_names); end
+# source://tapioca//lib/tapioca/commands/gem_sync.rb#6
+class Tapioca::Commands::GemSync < ::Tapioca::Commands::AbstractGem
+ private
- # source://tapioca//lib/tapioca/commands/gem.rb#354
- sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void }
- def merge_with_exported_rbi(gem, file); end
+ # source://tapioca//lib/tapioca/commands/gem_sync.rb#10
+ sig { override.void }
+ def execute; end
+end
- # source://tapioca//lib/tapioca/commands/gem.rb#325
- sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void }
- def move(old_filename, new_filename); end
+# source://tapioca//lib/tapioca/commands/gem_verify.rb#6
+class Tapioca::Commands::GemVerify < ::Tapioca::Commands::AbstractGem
+ private
- # source://tapioca//lib/tapioca/commands/gem.rb#235
- sig { void }
- def perform_additions; end
+ # source://tapioca//lib/tapioca/commands/gem_verify.rb#10
+ sig { override.void }
+ def execute; end
- # source://tapioca//lib/tapioca/commands/gem.rb#208
+ # source://tapioca//lib/tapioca/commands/gem_verify.rb#17
sig { void }
- def perform_removals; end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#189
- sig { params(exclude: T::Array[::String]).void }
- def perform_sync_verification(exclude: T.unsafe(nil)); end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#278
- sig { returns(T::Array[::String]) }
- def removed_rbis; end
-
- # source://tapioca//lib/tapioca/commands/gem.rb#305
- sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
- def report_diff_and_exit_if_out_of_date(diff, command); end
+ def perform_sync_verification; end
end
# source://tapioca//lib/tapioca/commands/require.rb#6
@@ -916,7 +1014,9 @@ class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker
sig { params(requires_path: ::String, sorbet_config_path: ::String).void }
def initialize(requires_path:, sorbet_config_path:); end
- # source://tapioca//lib/tapioca/commands/require.rb#21
+ private
+
+ # source://tapioca//lib/tapioca/commands/require.rb#23
sig { override.void }
def execute; end
end
@@ -925,25 +1025,32 @@ end
class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker
include ::Tapioca::SorbetHelper
- # source://tapioca//lib/tapioca/commands/todo.rb#15
+ # source://tapioca//lib/tapioca/commands/todo.rb#26
sig { params(todo_file: ::String, file_header: T::Boolean).void }
def initialize(todo_file:, file_header:); end
- # source://tapioca//lib/tapioca/commands/todo.rb#23
- sig { override.void }
- def execute; end
+ # source://tapioca//lib/tapioca/commands/todo.rb#34
+ sig { void }
+ def run_with_deprecation; end
private
- # source://tapioca//lib/tapioca/commands/todo.rb#49
+ # source://tapioca//lib/tapioca/commands/todo.rb#44
+ sig { override.void }
+ def execute; end
+
+ # source://tapioca//lib/tapioca/commands/todo.rb#68
sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) }
def rbi(constants, command:); end
- # source://tapioca//lib/tapioca/commands/todo.rb#69
+ # source://tapioca//lib/tapioca/commands/todo.rb#88
sig { returns(T::Array[::String]) }
def unresolved_constants; end
end
+# source://tapioca//lib/tapioca/commands/todo.rb#9
+Tapioca::Commands::Todo::DEPRECATION_MESSAGE = T.let(T.unsafe(nil), String)
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#5
module Tapioca::ConfigHelper
requires_ancestor { Thor }
@@ -1014,7 +1121,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct
const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart]
class << self
- # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11219/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -1025,7 +1132,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct
const :colors, T::Array[::Symbol]
class << self
- # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13
+ # source://sorbet-runtime/0.5.11219/lib/types/struct.rb#13
def inherited(s); end
end
end
@@ -1082,17 +1189,17 @@ class Tapioca::Dsl::Compiler
ConstantType = type_member { { upper: Module } }
- # source://tapioca//lib/tapioca/dsl/compiler.rb#60
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#64
sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void }
def initialize(pipeline, root, constant); end
# NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`.
#
- # source://tapioca//lib/tapioca/dsl/compiler.rb#77
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#81
sig { params(error: ::String).void }
def add_error(error); end
- # source://tapioca//lib/tapioca/dsl/compiler.rb#68
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#72
sig { params(compiler_name: ::String).returns(T::Boolean) }
def compiler_enabled?(compiler_name); end
@@ -1102,7 +1209,7 @@ class Tapioca::Dsl::Compiler
# @abstract
#
- # source://tapioca//lib/tapioca/dsl/compiler.rb#73
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#77
sig { abstract.void }
def decorate; end
@@ -1112,21 +1219,21 @@ class Tapioca::Dsl::Compiler
private
- # source://tapioca//lib/tapioca/dsl/compiler.rb#126
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#130
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#162
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#166
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#116
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#120
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#90
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#94
sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) }
def parameters_types_from_signature(method_def, signature); end
@@ -1151,7 +1258,7 @@ class Tapioca::Dsl::Compiler
sig { returns(T::Enumerable[T::Class[T.anything]]) }
def all_classes; end
- # source://tapioca//lib/tapioca/dsl/compiler.rb#53
+ # source://tapioca//lib/tapioca/dsl/compiler.rb#55
sig { returns(T::Enumerable[::Module]) }
def all_modules; end
end
@@ -1228,15 +1335,15 @@ class Tapioca::Dsl::Pipeline
private
- # source://tapioca//lib/tapioca/dsl/pipeline.rb#193
+ # source://tapioca//lib/tapioca/dsl/pipeline.rb#199
sig { void }
def abort_if_pending_migrations!; end
- # source://tapioca//lib/tapioca/dsl/pipeline.rb#139
+ # source://tapioca//lib/tapioca/dsl/pipeline.rb#144
sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) }
def filter_anonymous_and_reloaded_constants(constants); end
- # source://tapioca//lib/tapioca/dsl/pipeline.rb#122
+ # source://tapioca//lib/tapioca/dsl/pipeline.rb#124
sig do
params(
requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
@@ -1245,7 +1352,7 @@ class Tapioca::Dsl::Pipeline
end
def gather_active_compilers(requested_compilers, excluded_compilers); end
- # source://tapioca//lib/tapioca/dsl/pipeline.rb#130
+ # source://tapioca//lib/tapioca/dsl/pipeline.rb#132
sig do
params(
requested_constants: T::Array[::Module],
@@ -1254,11 +1361,11 @@ class Tapioca::Dsl::Pipeline
end
def gather_constants(requested_constants, requested_paths); end
- # source://tapioca//lib/tapioca/dsl/pipeline.rb#167
+ # source://tapioca//lib/tapioca/dsl/pipeline.rb#173
sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) }
def rbi_for_constant(constant); end
- # source://tapioca//lib/tapioca/dsl/pipeline.rb#186
+ # source://tapioca//lib/tapioca/dsl/pipeline.rb#192
sig { params(error: ::String).returns(T.noreturn) }
def report_error(error); end
end
@@ -1454,19 +1561,19 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base
end
def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end
- # source://tapioca//lib/tapioca/gem/listeners/methods.rb#212
+ # source://tapioca//lib/tapioca/gem/listeners/methods.rb#211
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
def ignore?(event); end
- # source://tapioca//lib/tapioca/gem/listeners/methods.rb#205
+ # source://tapioca//lib/tapioca/gem/listeners/methods.rb#204
sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) }
def initialize_method_for(constant); end
- # source://tapioca//lib/tapioca/gem/listeners/methods.rb#173
+ # source://tapioca//lib/tapioca/gem/listeners/methods.rb#172
sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) }
def method_names_by_visibility(mod); end
- # source://tapioca//lib/tapioca/gem/listeners/methods.rb#197
+ # source://tapioca//lib/tapioca/gem/listeners/methods.rb#196
sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) }
def method_new_in_abstract_class?(attached_class, method_name); end
@@ -1480,7 +1587,7 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base
# It walks up the ancestor tree via the `super_method` method; if any of the super
# methods are owned by the constant, it means that the constant declares the method.
#
- # source://tapioca//lib/tapioca/gem/listeners/methods.rb#159
+ # source://tapioca//lib/tapioca/gem/listeners/methods.rb#158
sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) }
def method_owned_by_constant?(method, constant); end
@@ -1488,7 +1595,7 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
def on_scope(event); end
- # source://tapioca//lib/tapioca/gem/listeners/methods.rb#182
+ # source://tapioca//lib/tapioca/gem/listeners/methods.rb#181
sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) }
def struct_method?(constant, method_name); end
end
@@ -1581,13 +1688,16 @@ end
# source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#7
class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base
+ include ::Tapioca::SorbetHelper
+ include ::Tapioca::RBIHelper
+
private
- # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#32
+ # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#33
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
def ignore?(event); end
- # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#13
+ # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#14
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
def on_scope(event); end
end
@@ -1618,7 +1728,7 @@ class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Bas
sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) }
def compile_signature(signature, parameters); end
- # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#78
+ # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#79
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
def ignore?(event); end
@@ -1796,7 +1906,7 @@ class Tapioca::Gem::Pipeline
sig { returns(::RBI::Tree) }
def compile; end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#110
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#119
sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) }
def constant_in_gem?(name); end
@@ -1804,31 +1914,33 @@ class Tapioca::Gem::Pipeline
sig { returns(::Tapioca::Gemfile::GemSpec) }
def gem; end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#122
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#137
sig { params(method: ::UnboundMethod).returns(T::Boolean) }
def method_in_gem?(method); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#130
+ # Helpers
+ #
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#147
sig { params(constant: ::Module).returns(T.nilable(::String)) }
def name_of(constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#69
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#71
sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void }
def push_const(symbol, constant, node); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#59
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#61
sig { params(symbol: ::String, constant: ::BasicObject).void }
def push_constant(symbol, constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#64
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#66
sig { params(symbol: ::String, constant: ::Module).void }
def push_foreign_constant(symbol, constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#83
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#85
sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
def push_foreign_scope(symbol, constant, node); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#97
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#99
sig do
params(
symbol: ::String,
@@ -1841,103 +1953,148 @@ class Tapioca::Gem::Pipeline
end
def push_method(symbol, constant, method, node, signature, parameters); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#76
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#78
sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
def push_scope(symbol, constant, node); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#54
+ # Events handling
+ #
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#56
sig { params(symbol: ::String).void }
def push_symbol(symbol); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#102
+ # Constants and properties filtering
+ #
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#106
sig { params(symbol_name: ::String).returns(T::Boolean) }
def symbol_in_payload?(symbol_name); end
private
- # source://tapioca//lib/tapioca/gem/pipeline.rb#376
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#440
sig { params(name: ::String).void }
def add_to_alias_namespace(name); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#381
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#445
sig { params(name: ::String).returns(T::Boolean) }
def alias_namespaced?(name); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#225
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#244
sig { params(name: ::String, constant: ::Module).void }
def compile_alias(name, constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#211
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#230
sig { params(symbol: ::String, constant: ::BasicObject).void }
def compile_constant(symbol, constant); end
- # Compile
+ # Compiling
#
- # source://tapioca//lib/tapioca/gem/pipeline.rb#206
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#219
sig { params(symbol: ::String, constant: ::Module).void }
def compile_foreign_constant(symbol, constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#283
- sig { params(name: ::String, constant: ::Module, foreign_constant: T::Boolean).void }
- def compile_module(name, constant, foreign_constant: T.unsafe(nil)); end
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#298
+ sig { params(name: ::String, constant: ::Module).void }
+ def compile_module(name, constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#247
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#265
sig { params(name: ::String, value: ::BasicObject).void }
def compile_object(name, value); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#308
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#309
+ sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) }
+ def compile_scope(name, constant); end
+
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#323
sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) }
def compile_superclass(constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#357
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#421
sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) }
def defined_in_gem?(constant, strict: T.unsafe(nil)); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#158
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#177
sig { params(event: ::Tapioca::Gem::Event).void }
def dispatch(event); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#398
+ # Helpers
+ #
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#464
sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) }
def generic_name_of(constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#369
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#433
sig { params(constant: ::Module).returns(T::Set[::String]) }
def get_file_candidates(constant); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#145
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#162
sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
def load_bootstrap_symbols(gem); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#388
- sig { params(name: ::String).void }
- def mark_seen(name); end
-
- # source://tapioca//lib/tapioca/gem/pipeline.rb#414
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#480
sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) }
def name_of_proxy_target(constant, class_name); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#153
+ # Events handling
+ #
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#172
sig { returns(::Tapioca::Gem::Event) }
def next_event; end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#181
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#200
sig { params(event: ::Tapioca::Gem::ConstantFound).void }
def on_constant(event); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#199
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#212
sig { params(event: ::Tapioca::Gem::NodeAdded).void }
def on_node(event); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#172
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#191
sig { params(event: ::Tapioca::Gem::SymbolFound).void }
def on_symbol(event); end
- # source://tapioca//lib/tapioca/gem/pipeline.rb#393
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#452
+ sig { params(name: ::String).void }
+ def seen!(name); end
+
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#457
sig { params(name: ::String).returns(T::Boolean) }
def seen?(name); end
+
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#391
+ sig { params(name: ::String, constant: ::Module).returns(T::Boolean) }
+ def skip_alias?(name, constant); end
+
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#379
+ sig { params(name: ::String, constant: T.anything).returns(T::Boolean) }
+ def skip_constant?(name, constant); end
+
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#408
+ sig { params(name: ::String, constant: ::Module).returns(T::Boolean) }
+ def skip_foreign_constant?(name, constant); end
+
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#413
+ sig { params(name: ::String, constant: ::Module).returns(T::Boolean) }
+ def skip_module?(name, constant); end
+
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#400
+ sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) }
+ def skip_object?(name, constant); end
+
+ # Constants and properties filtering
+ #
+ # source://tapioca//lib/tapioca/gem/pipeline.rb#374
+ sig { params(name: ::String).returns(T::Boolean) }
+ def skip_symbol?(name); end
end
+# this looks something like:
+# "(eval at /path/to/file.rb:123)"
+# and we are just interested in the "/path/to/file.rb" part
+#
+# source://tapioca//lib/tapioca/gem/pipeline.rb#116
+Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp)
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#11
Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array)
@@ -2050,90 +2207,94 @@ end
class Tapioca::Gemfile::GemSpec
include ::Tapioca::GemHelper
- # source://tapioca//lib/tapioca/gemfile.rb#135
+ # source://tapioca//lib/tapioca/gemfile.rb#136
sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void }
def initialize(spec); end
- # source://tapioca//lib/tapioca/gemfile.rb#145
+ # source://tapioca//lib/tapioca/gemfile.rb#146
sig { params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://tapioca//lib/tapioca/gemfile.rb#165
+ # source://tapioca//lib/tapioca/gemfile.rb#171
sig { params(path: ::String).returns(T::Boolean) }
def contains_path?(path); end
- # source://tapioca//lib/tapioca/gemfile.rb#184
+ # source://tapioca//lib/tapioca/gemfile.rb#161
+ sig { returns(T::Array[::Gem::Dependency]) }
+ def dependencies; end
+
+ # source://tapioca//lib/tapioca/gemfile.rb#190
sig { returns(T::Boolean) }
def export_rbi_files?; end
- # source://tapioca//lib/tapioca/gemfile.rb#179
+ # source://tapioca//lib/tapioca/gemfile.rb#185
sig { returns(T::Array[::String]) }
def exported_rbi_files; end
- # source://tapioca//lib/tapioca/gemfile.rb#189
+ # source://tapioca//lib/tapioca/gemfile.rb#195
sig { returns(::RBI::MergeTree) }
def exported_rbi_tree; end
- # source://tapioca//lib/tapioca/gemfile.rb#132
+ # source://tapioca//lib/tapioca/gemfile.rb#133
sig { returns(T::Array[::Pathname]) }
def files; end
- # source://tapioca//lib/tapioca/gemfile.rb#129
+ # source://tapioca//lib/tapioca/gemfile.rb#130
sig { returns(::String) }
def full_gem_path; end
- # source://tapioca//lib/tapioca/gemfile.rb#150
+ # source://tapioca//lib/tapioca/gemfile.rb#151
sig { params(gemfile_dir: ::String).returns(T::Boolean) }
def ignore?(gemfile_dir); end
- # source://tapioca//lib/tapioca/gemfile.rb#155
+ # source://tapioca//lib/tapioca/gemfile.rb#156
sig { returns(::String) }
def name; end
- # source://tapioca//lib/tapioca/gemfile.rb#174
+ # source://tapioca//lib/tapioca/gemfile.rb#180
sig { void }
def parse_yard_docs; end
- # source://tapioca//lib/tapioca/gemfile.rb#160
+ # source://tapioca//lib/tapioca/gemfile.rb#166
sig { returns(::String) }
def rbi_file_name; end
- # source://tapioca//lib/tapioca/gemfile.rb#201
+ # source://tapioca//lib/tapioca/gemfile.rb#207
sig { params(file: ::Pathname).returns(::Pathname) }
def relative_path_for(file); end
# @return [String]
#
- # source://tapioca//lib/tapioca/gemfile.rb#129
+ # source://tapioca//lib/tapioca/gemfile.rb#130
def version; end
private
- # source://tapioca//lib/tapioca/gemfile.rb#212
+ # source://tapioca//lib/tapioca/gemfile.rb#218
sig { returns(T::Array[::Pathname]) }
def collect_files; end
- # source://tapioca//lib/tapioca/gemfile.rb#227
+ # source://tapioca//lib/tapioca/gemfile.rb#233
sig { returns(T.nilable(T::Boolean)) }
def default_gem?; end
- # source://tapioca//lib/tapioca/gemfile.rb#285
+ # source://tapioca//lib/tapioca/gemfile.rb#292
sig { returns(T::Boolean) }
def gem_ignored?; end
- # source://tapioca//lib/tapioca/gemfile.rb#264
+ # source://tapioca//lib/tapioca/gemfile.rb#271
sig { params(path: ::String).returns(T::Boolean) }
def has_parent_gemspec?(path); end
- # source://tapioca//lib/tapioca/gemfile.rb#232
+ # source://tapioca//lib/tapioca/gemfile.rb#238
sig { returns(::Regexp) }
def require_paths_prefix_matcher; end
- # source://tapioca//lib/tapioca/gemfile.rb#243
+ # source://tapioca//lib/tapioca/gemfile.rb#250
sig { params(file: ::String).returns(::Pathname) }
def resolve_to_ruby_lib_dir(file); end
- # source://tapioca//lib/tapioca/gemfile.rb#257
+ # source://tapioca//lib/tapioca/gemfile.rb#264
sig { returns(::String) }
def version_string; end
@@ -2172,11 +2333,11 @@ class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader
protected
- # source://tapioca//lib/tapioca/loaders/dsl.rb#71
+ # source://tapioca//lib/tapioca/loaders/dsl.rb#81
sig { void }
def load_application; end
- # source://tapioca//lib/tapioca/loaders/dsl.rb#53
+ # source://tapioca//lib/tapioca/loaders/dsl.rb#63
sig { void }
def load_dsl_compilers; end
@@ -2263,6 +2424,17 @@ class Tapioca::Loaders::Loader
private
+ # Rails 7.2 renamed `eager_load_paths` to `all_eager_load_paths`, which maintains the same original functionality.
+ # The `eager_load_paths` method still exists, but doesn't return all paths anymore and causes Tapioca to miss some
+ # engine paths. The following commit is the change:
+ # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664
+ #
+ # @param engine [T.class_of(Rails::Engine)]
+ # @return [Array]
+ #
+ # source://sorbet-runtime/0.5.11219/lib/types/private/methods/_methods.rb#252
+ def eager_load_paths(*args, **_arg1, &blk); end
+
# source://tapioca//lib/tapioca/loaders/loader.rb#198
sig { void }
def eager_load_rails_app; end
@@ -2826,6 +2998,10 @@ module Tapioca::Runtime::Reflection
sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) }
def child_module_for_parent_with_name(parent, name); end
+ # source://tapioca//lib/tapioca/runtime/reflection.rb#260
+ sig { params(name: ::String).returns(T::Boolean) }
+ def has_aliased_namespace?(name); end
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#255
sig { params(method: ::UnboundMethod).returns(T::Boolean) }
def method_defined_by_forwardable_module?(method); end
@@ -3074,15 +3250,15 @@ Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String)
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5
module Tapioca::SorbetHelper
- # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#34
+ # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#32
sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) }
def sorbet(*sorbet_args); end
- # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#39
+ # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#37
sig { returns(::String) }
def sorbet_path; end
- # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#46
+ # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#44
sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) }
def sorbet_supports?(feature, version: T.unsafe(nil)); end
end
@@ -3148,7 +3324,7 @@ module Tapioca::Static::SymbolLoader
sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
def engine_symbols(gem); end
- # source://tapioca//lib/tapioca/static/symbol_loader.rb#40
+ # source://tapioca//lib/tapioca/static/symbol_loader.rb#48
sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
def gem_symbols(gem); end
@@ -3156,7 +3332,7 @@ module Tapioca::Static::SymbolLoader
sig { returns(T::Set[::String]) }
def payload_symbols; end
- # source://tapioca//lib/tapioca/static/symbol_loader.rb#45
+ # source://tapioca//lib/tapioca/static/symbol_loader.rb#53
sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) }
def symbols_from_paths(paths); end
@@ -3164,10 +3340,10 @@ module Tapioca::Static::SymbolLoader
# @return [Array]
#
- # source://sorbet-runtime/0.5.11011/lib/types/private/methods/_methods.rb#255
+ # source://sorbet-runtime/0.5.11219/lib/types/private/methods/_methods.rb#252
def engines(*args, **_arg1, &blk); end
- # source://tapioca//lib/tapioca/static/symbol_loader.rb#73
+ # source://tapioca//lib/tapioca/static/symbol_loader.rb#82
sig { params(input: ::String, table_type: ::String).returns(::String) }
def symbol_table_json_from(input, table_type: T.unsafe(nil)); end
end
@@ -3207,16 +3383,16 @@ Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String)
# source://tapioca//lib/tapioca.rb#34
Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String)
-# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#137
+# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108
class Tapioca::TypeVariable < ::T::Types::TypeVariable
# @return [TypeVariable] a new instance of TypeVariable
#
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#138
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#109
def initialize(name, variance); end
# Returns the value of attribute name.
#
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#143
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#114
def name; end
end
@@ -3226,69 +3402,50 @@ end
# need to do any matching of constants to type variables to bind their names, Ruby will
# do that automatically for us and we get the `name` method for free from `Module`.
#
-# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#151
+# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#122
class Tapioca::TypeVariableModule < ::Module
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#177
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#146
sig do
params(
context: ::Module,
type: ::Tapioca::TypeVariableModule::Type,
variance: ::Symbol,
- fixed: T.untyped,
- lower: T.untyped,
- upper: T.untyped,
bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped]))
).void
end
- def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end
+ def initialize(context, type, variance, bounds_proc); end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#231
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#181
sig { returns(::Tapioca::TypeVariable) }
def coerce_to_type_variable; end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#211
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#161
sig { returns(T::Boolean) }
def fixed?; end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#192
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#155
sig { returns(T.nilable(::String)) }
def name; end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#216
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#166
sig { returns(::String) }
def serialize; end
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#163
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#136
sig { returns(::Tapioca::TypeVariableModule::Type) }
def type; end
private
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#265
+ # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#188
sig { returns(T::Hash[::Symbol, T.untyped]) }
def bounds; end
-
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#241
- sig do
- params(
- fixed: T.untyped,
- lower: T.untyped,
- upper: T.untyped
- ).returns(T.proc.returns(T::Hash[::Symbol, T.untyped]))
- end
- def build_bounds_proc(fixed, lower, upper); end
-
- # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#255
- sig do
- type_parameters(:Result)
- .params(
- block: T.proc.returns(T.type_parameter(:Result))
- ).returns(T.type_parameter(:Result))
- end
- def with_bound_name_pre_3_0(&block); end
end
-# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#154
+# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#133
+Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc)
+
+# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#125
class Tapioca::TypeVariableModule::Type < ::T::Enum
enums do
Member = new
diff --git a/sorbet/rbi/gems/thor@1.2.2.rbi b/sorbet/rbi/gems/thor@1.3.0.rbi
similarity index 80%
rename from sorbet/rbi/gems/thor@1.2.2.rbi
rename to sorbet/rbi/gems/thor@1.3.0.rbi
index dcb11ee2..9ed8f62f 100644
--- a/sorbet/rbi/gems/thor@1.2.2.rbi
+++ b/sorbet/rbi/gems/thor@1.3.0.rbi
@@ -4,6 +4,30 @@
# This is an autogenerated file for types exported from the `thor` gem.
# Please instead update this file by running `bin/tapioca gem thor`.
+# source://thor//lib/thor/shell/lcs_diff.rb#1
+module LCSDiff
+ protected
+
+ # Overwrite show_diff to show diff with colors if Diff::LCS is
+ # available.
+ #
+ # source://thor//lib/thor/shell/lcs_diff.rb#6
+ def show_diff(destination, content); end
+
+ private
+
+ # Check if Diff::LCS is loaded. If it is, use it to create pretty output
+ # for diff.
+ #
+ # @return [Boolean]
+ #
+ # source://thor//lib/thor/shell/lcs_diff.rb#37
+ def diff_lcs_loaded?; end
+
+ # source://thor//lib/thor/shell/lcs_diff.rb#21
+ def output_diff_line(diff); end
+end
+
# source://thor//lib/thor/command.rb#1
class Thor
include ::Thor::Base
@@ -12,23 +36,63 @@ class Thor
extend ::Thor::Base::ClassMethods
extend ::Thor::Invocation::ClassMethods
- # source://thor//lib/thor.rb#505
+ # source://thor//lib/thor.rb#652
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
class << self
+ # Adds and declares option group for required at least one of options in the
+ # block of arguments. You can declare options as the outside of the block.
+ #
+ # If :for is given as option, it allows you to change the options from
+ # a previous defined command.
+ #
+ # ==== Parameters
+ # Array[Thor::Option.name]
+ # options:: :for is applied for previous defined command.
+ #
+ # ==== Examples
+ #
+ # at_least_one do
+ # option :one
+ # option :two
+ # end
+ #
+ # Or
+ #
+ # option :one
+ # option :two
+ # at_least_one :one, :two
+ #
+ # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError
+ # will be raised.
+ #
+ # You can use at_least_one and exclusive at the same time.
+ #
+ # exclusive do
+ # at_least_one do
+ # option :one
+ # option :two
+ # end
+ # end
+ #
+ # Then it is required either only one of "--one" or "--two".
+ #
+ # source://thor//lib/thor.rb#246
+ def at_least_one(*args, &block); end
+
# Extend check unknown options to accept a hash of conditions.
#
# === Parameters
# options: A hash containing :only and/or :except keys
#
- # source://thor//lib/thor.rb#255
+ # source://thor//lib/thor.rb#350
def check_unknown_options!(options = T.unsafe(nil)); end
# Overwrite check_unknown_options? to take subcommands and options into account.
#
# @return [Boolean]
#
- # source://thor//lib/thor.rb#268
+ # source://thor//lib/thor.rb#363
def check_unknown_options?(config); end
# Prints help information for the given command.
@@ -37,7 +101,7 @@ class Thor
# shell
# command_name
#
- # source://thor//lib/thor.rb#172
+ # source://thor//lib/thor.rb#258
def command_help(shell, command_name); end
# Sets the default command when thor is executed without an explicit command to be called.
@@ -76,28 +140,64 @@ class Thor
# ==== Parameters
# Symbol ...:: A list of commands that should be affected.
#
- # source://thor//lib/thor.rb#339
+ # source://thor//lib/thor.rb#434
def disable_required_check!(*command_names); end
# @return [Boolean]
#
- # source://thor//lib/thor.rb#343
+ # source://thor//lib/thor.rb#438
def disable_required_check?(command); end
+ # Adds and declares option group for exclusive options in the
+ # block and arguments. You can declare options as the outside of the block.
+ #
+ # If :for is given as option, it allows you to change the options from
+ # a previous defined command.
+ #
+ # ==== Parameters
+ # Array[Thor::Option.name]
+ # options:: :for is applied for previous defined command.
+ #
+ # ==== Examples
+ #
+ # exclusive do
+ # option :one
+ # option :two
+ # end
+ #
+ # Or
+ #
+ # option :one
+ # option :two
+ # exclusive :one, :two
+ #
+ # If you give "--one" and "--two" at the same time ExclusiveArgumentsError
+ # will be raised.
+ #
+ # source://thor//lib/thor.rb#203
+ def exclusive(*args, &block); end
+
# Prints help information for this class.
#
# ==== Parameters
# shell
#
- # source://thor//lib/thor.rb#195
+ # source://thor//lib/thor.rb#288
def help(shell, subcommand = T.unsafe(nil)); end
# Defines the long description of the next command.
#
+ # Long description is by default indented, line-wrapped and repeated whitespace merged.
+ # In order to print long description verbatim, with indentation and spacing exactly
+ # as found in the code, use the +wrap+ option
+ #
+ # long_desc 'your very long description', wrap: false
+ #
# ==== Parameters
# long description
+ # options
#
- # source://thor//lib/thor.rb#71
+ # source://thor//lib/thor.rb#78
def long_desc(long_description, options = T.unsafe(nil)); end
# Maps an input to a command. If you define:
@@ -113,9 +213,78 @@ class Thor
# ==== Parameters
# Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command.
#
- # source://thor//lib/thor.rb#93
+ # source://thor//lib/thor.rb#101
def map(mappings = T.unsafe(nil), **kw); end
+ # Adds and declares option group for required at least one of options in the
+ # block of arguments. You can declare options as the outside of the block.
+ #
+ # If :for is given as option, it allows you to change the options from
+ # a previous defined command.
+ #
+ # ==== Parameters
+ # Array[Thor::Option.name]
+ # options:: :for is applied for previous defined command.
+ #
+ # ==== Examples
+ #
+ # at_least_one do
+ # option :one
+ # option :two
+ # end
+ #
+ # Or
+ #
+ # option :one
+ # option :two
+ # at_least_one :one, :two
+ #
+ # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError
+ # will be raised.
+ #
+ # You can use at_least_one and exclusive at the same time.
+ #
+ # exclusive do
+ # at_least_one do
+ # option :one
+ # option :two
+ # end
+ # end
+ #
+ # Then it is required either only one of "--one" or "--two".
+ #
+ # source://thor//lib/thor.rb#246
+ def method_at_least_one(*args, &block); end
+
+ # Adds and declares option group for exclusive options in the
+ # block and arguments. You can declare options as the outside of the block.
+ #
+ # If :for is given as option, it allows you to change the options from
+ # a previous defined command.
+ #
+ # ==== Parameters
+ # Array[Thor::Option.name]
+ # options:: :for is applied for previous defined command.
+ #
+ # ==== Examples
+ #
+ # exclusive do
+ # option :one
+ # option :two
+ # end
+ #
+ # Or
+ #
+ # option :one
+ # option :two
+ # exclusive :one, :two
+ #
+ # If you give "--one" and "--two" at the same time ExclusiveArgumentsError
+ # will be raised.
+ #
+ # source://thor//lib/thor.rb#203
+ def method_exclusive(*args, &block); end
+
# Adds an option to the set of method options. If :for is given as option,
# it allows you to change the options from a previous defined command.
#
@@ -123,7 +292,7 @@ class Thor
# # magic
# end
#
- # method_option :foo => :bar, :for => :previous_command
+ # method_option :foo, :for => :previous_command
#
# def next_command
# # magic
@@ -142,7 +311,7 @@ class Thor
# :banner - String to show on usage notes.
# :hide - If you want to hide this option from the help.
#
- # source://thor//lib/thor.rb#155
+ # source://thor//lib/thor.rb#163
def method_option(name, options = T.unsafe(nil)); end
# Declares the options for the next command to be declared.
@@ -152,7 +321,7 @@ class Thor
# is the type of the option. Can be :string, :array, :hash, :boolean, :numeric
# or :required (string). If you give a value, the type of the value is used.
#
- # source://thor//lib/thor.rb#121
+ # source://thor//lib/thor.rb#129
def method_options(options = T.unsafe(nil)); end
# Adds an option to the set of method options. If :for is given as option,
@@ -162,7 +331,7 @@ class Thor
# # magic
# end
#
- # method_option :foo => :bar, :for => :previous_command
+ # method_option :foo, :for => :previous_command
#
# def next_command
# # magic
@@ -181,7 +350,7 @@ class Thor
# :banner - String to show on usage notes.
# :hide - If you want to hide this option from the help.
#
- # source://thor//lib/thor.rb#155
+ # source://thor//lib/thor.rb#163
def option(name, options = T.unsafe(nil)); end
# Declares the options for the next command to be declared.
@@ -191,7 +360,7 @@ class Thor
# is the type of the option. Can be :string, :array, :hash, :boolean, :numeric
# or :required (string). If you give a value, the type of the value is used.
#
- # source://thor//lib/thor.rb#121
+ # source://thor//lib/thor.rb#129
def options(options = T.unsafe(nil)); end
# Allows for custom "Command" package naming.
@@ -205,12 +374,12 @@ class Thor
# Returns commands ready to be printed.
#
- # source://thor//lib/thor.rb#214
+ # source://thor//lib/thor.rb#309
def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end
# Returns commands ready to be printed.
#
- # source://thor//lib/thor.rb#214
+ # source://thor//lib/thor.rb#309
def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end
# Registers another Thor subclass as a command.
@@ -262,27 +431,27 @@ class Thor
# ==== Parameters
# Symbol ...:: A list of commands that should be affected.
#
- # source://thor//lib/thor.rb#325
+ # source://thor//lib/thor.rb#420
def stop_on_unknown_option!(*command_names); end
# @return [Boolean]
#
- # source://thor//lib/thor.rb#329
+ # source://thor//lib/thor.rb#424
def stop_on_unknown_option?(command); end
- # source://thor//lib/thor.rb#234
+ # source://thor//lib/thor.rb#329
def subcommand(subcommand, subcommand_class); end
- # source://thor//lib/thor.rb#230
+ # source://thor//lib/thor.rb#325
def subcommand_classes; end
- # source://thor//lib/thor.rb#225
+ # source://thor//lib/thor.rb#320
def subcommands; end
- # source://thor//lib/thor.rb#234
+ # source://thor//lib/thor.rb#329
def subtask(subcommand, subcommand_class); end
- # source://thor//lib/thor.rb#225
+ # source://thor//lib/thor.rb#320
def subtasks; end
# Prints help information for the given command.
@@ -291,7 +460,7 @@ class Thor
# shell
# command_name
#
- # source://thor//lib/thor.rb#172
+ # source://thor//lib/thor.rb#258
def task_help(shell, command_name); end
protected
@@ -301,50 +470,66 @@ class Thor
# the command that is going to be invoked and a boolean which indicates if
# the namespace should be displayed as arguments.
#
- # source://thor//lib/thor.rb#400
+ # source://thor//lib/thor.rb#535
def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end
- # source://thor//lib/thor.rb#406
+ # source://thor//lib/thor.rb#541
def baseclass; end
- # source://thor//lib/thor.rb#414
+ # source://thor//lib/thor.rb#549
def create_command(meth); end
- # source://thor//lib/thor.rb#414
+ # source://thor//lib/thor.rb#549
def create_task(meth); end
# help command has the required check disabled by default.
#
- # source://thor//lib/thor.rb#354
+ # source://thor//lib/thor.rb#467
def disable_required_check; end
# The method responsible for dispatching given the args.
#
# @yield [instance]
#
- # source://thor//lib/thor.rb#359
+ # source://thor//lib/thor.rb#494
def dispatch(meth, given_args, given_opts, config); end
- # source://thor//lib/thor.rb#410
+ # source://thor//lib/thor.rb#545
def dynamic_command_class; end
# this is the logic that takes the command name passed in by the user
# and determines whether it is an unambiguous substrings of a command or
# alias name.
#
- # source://thor//lib/thor.rb#476
+ # source://thor//lib/thor.rb#615
def find_command_possibilities(meth); end
# this is the logic that takes the command name passed in by the user
# and determines whether it is an unambiguous substrings of a command or
# alias name.
#
- # source://thor//lib/thor.rb#476
+ # source://thor//lib/thor.rb#615
def find_task_possibilities(meth); end
- # source://thor//lib/thor.rb#436
+ # source://thor//lib/thor.rb#575
def initialize_added; end
+ # Returns this class at least one of required options array set.
+ #
+ # ==== Returns
+ # Array[Array[Thor::Option.name]]
+ #
+ # source://thor//lib/thor.rb#458
+ def method_at_least_one_option_names; end
+
+ # Returns this class exclusive options array set.
+ #
+ # ==== Returns
+ # Array[Array[Thor::Option.name]]
+ #
+ # source://thor//lib/thor.rb#449
+ def method_exclusive_option_names; end
+
# receives a (possibly nil) command name and returns a name that is in
# the commands hash. In addition to normalizing aliases, this logic
# will determine if a shortened command is an unambiguous substring of
@@ -355,7 +540,7 @@ class Thor
#
# @raise [AmbiguousTaskError]
#
- # source://thor//lib/thor.rb#455
+ # source://thor//lib/thor.rb#594
def normalize_command_name(meth); end
# receives a (possibly nil) command name and returns a name that is in
@@ -368,26 +553,40 @@ class Thor
#
# @raise [AmbiguousTaskError]
#
- # source://thor//lib/thor.rb#455
+ # source://thor//lib/thor.rb#594
def normalize_task_name(meth); end
+ # source://thor//lib/thor.rb#482
+ def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end
+
+ # source://thor//lib/thor.rb#471
+ def print_exclusive_options(shell, command = T.unsafe(nil)); end
+
# Retrieve the command name from given args.
#
- # source://thor//lib/thor.rb#442
+ # source://thor//lib/thor.rb#581
def retrieve_command_name(args); end
# Retrieve the command name from given args.
#
- # source://thor//lib/thor.rb#442
+ # source://thor//lib/thor.rb#581
def retrieve_task_name(args); end
- # source://thor//lib/thor.rb#349
+ # Sort the commands, lexicographically by default.
+ #
+ # Can be overridden in the subclass to change the display order of the
+ # commands.
+ #
+ # source://thor//lib/thor.rb#642
+ def sort_commands!(list); end
+
+ # source://thor//lib/thor.rb#462
def stop_on_unknown_option; end
- # source://thor//lib/thor.rb#491
+ # source://thor//lib/thor.rb#630
def subcommand_help(cmd); end
- # source://thor//lib/thor.rb#491
+ # source://thor//lib/thor.rb#630
def subtask_help(cmd); end
end
end
@@ -463,7 +662,7 @@ module Thor::Actions
# 'config.gem "rspec"'
# end
#
- # source://thor//lib/thor/actions/file_manipulation.rb#195
+ # source://thor//lib/thor/actions/file_manipulation.rb#193
def append_file(path, *args, &block); end
# Append text to a file. Since it depends on insert_into_file, it's reversible.
@@ -481,7 +680,7 @@ module Thor::Actions
# 'config.gem "rspec"'
# end
#
- # source://thor//lib/thor/actions/file_manipulation.rb#195
+ # source://thor//lib/thor/actions/file_manipulation.rb#193
def append_to_file(path, *args, &block); end
# Loads an external file and execute it in the instance binding.
@@ -522,7 +721,7 @@ module Thor::Actions
#
# chmod "script/server", 0755
#
- # source://thor//lib/thor/actions/file_manipulation.rb#148
+ # source://thor//lib/thor/actions/file_manipulation.rb#146
def chmod(path, mode, config = T.unsafe(nil)); end
# Comment all lines matching a given regex. It will leave the space
@@ -538,7 +737,7 @@ module Thor::Actions
#
# comment_lines 'config/initializers/session_store.rb', /cookie_store/
#
- # source://thor//lib/thor/actions/file_manipulation.rb#312
+ # source://thor//lib/thor/actions/file_manipulation.rb#310
def comment_lines(path, flag, *args); end
# ==== Examples
@@ -673,17 +872,20 @@ module Thor::Actions
# ==== Parameters
# source:: the address of the given content.
# destination:: the relative path to the destination root.
- # config:: give :verbose => false to not log the status.
+ # config:: give :verbose => false to not log the status, and
+ # :http_headers => to add headers to an http request.
#
# ==== Examples
#
# get "http://gist.github.com/103208", "doc/README"
#
+ # get "http://gist.github.com/103208", "doc/README", :http_headers => {"Content-Type" => "application/json"}
+ #
# get "http://gist.github.com/103208" do |content|
# content.split("\n").first
# end
#
- # source://thor//lib/thor/actions/file_manipulation.rb#79
+ # source://thor//lib/thor/actions/file_manipulation.rb#82
def get(source, *args, &block); end
# Run a regular expression replacement on a file.
@@ -703,7 +905,7 @@ module Thor::Actions
# match << " no more. Use thor!"
# end
#
- # source://thor//lib/thor/actions/file_manipulation.rb#265
+ # source://thor//lib/thor/actions/file_manipulation.rb#263
def gsub_file(path, flag, *args, &block); end
# Goes to the root and execute the given block.
@@ -728,7 +930,7 @@ module Thor::Actions
# " filter_parameter :password\n"
# end
#
- # source://thor//lib/thor/actions/file_manipulation.rb#219
+ # source://thor//lib/thor/actions/file_manipulation.rb#217
def inject_into_class(path, klass, *args, &block); end
# source://thor//lib/thor/actions/inject_into_file.rb#26
@@ -751,7 +953,7 @@ module Thor::Actions
# " def help; 'help'; end\n"
# end
#
- # source://thor//lib/thor/actions/file_manipulation.rb#242
+ # source://thor//lib/thor/actions/file_manipulation.rb#240
def inject_into_module(path, module_name, *args, &block); end
# source://thor//lib/thor/actions/inject_into_file.rb#26
@@ -803,7 +1005,7 @@ module Thor::Actions
# 'config.gem "rspec"'
# end
#
- # source://thor//lib/thor/actions/file_manipulation.rb#173
+ # source://thor//lib/thor/actions/file_manipulation.rb#171
def prepend_file(path, *args, &block); end
# Prepend text to a file. Since it depends on insert_into_file, it's reversible.
@@ -821,7 +1023,7 @@ module Thor::Actions
# 'config.gem "rspec"'
# end
#
- # source://thor//lib/thor/actions/file_manipulation.rb#173
+ # source://thor//lib/thor/actions/file_manipulation.rb#171
def prepend_to_file(path, *args, &block); end
# Returns the given path relative to the absolute root (ie, root where
@@ -841,7 +1043,7 @@ module Thor::Actions
# remove_file 'README'
# remove_file 'app/controllers/application_controller.rb'
#
- # source://thor//lib/thor/actions/file_manipulation.rb#329
+ # source://thor//lib/thor/actions/file_manipulation.rb#327
def remove_dir(path, config = T.unsafe(nil)); end
# Removes a file at the given location.
@@ -855,7 +1057,7 @@ module Thor::Actions
# remove_file 'README'
# remove_file 'app/controllers/application_controller.rb'
#
- # source://thor//lib/thor/actions/file_manipulation.rb#329
+ # source://thor//lib/thor/actions/file_manipulation.rb#327
def remove_file(path, config = T.unsafe(nil)); end
# Executes a command returning the contents of the command.
@@ -871,7 +1073,7 @@ module Thor::Actions
# run('ln -s ~/edge rails')
# end
#
- # source://thor//lib/thor/actions.rb#249
+ # source://thor//lib/thor/actions.rb#248
def run(command, config = T.unsafe(nil)); end
# Executes a ruby script (taking into account WIN32 platform quirks).
@@ -880,7 +1082,7 @@ module Thor::Actions
# command:: the command to be executed.
# config:: give :verbose => false to not log the status.
#
- # source://thor//lib/thor/actions.rb#286
+ # source://thor//lib/thor/actions.rb#285
def run_ruby_script(command, config = T.unsafe(nil)); end
# Holds source paths in instance so they can be manipulated.
@@ -903,7 +1105,7 @@ module Thor::Actions
#
# template "doc/README"
#
- # source://thor//lib/thor/actions/file_manipulation.rb#115
+ # source://thor//lib/thor/actions/file_manipulation.rb#118
def template(source, *args, &block); end
# Run a thor command. A hash of options can be given and it's converted to
@@ -924,7 +1126,7 @@ module Thor::Actions
# thor :list, :all => true, :substring => 'rails'
# #=> thor list --all --substring=rails
#
- # source://thor//lib/thor/actions.rb#309
+ # source://thor//lib/thor/actions.rb#308
def thor(command, *args); end
# Uncomment all lines matching a given regex. It will leave the space
@@ -940,40 +1142,40 @@ module Thor::Actions
#
# uncomment_lines 'config/initializers/session_store.rb', /active_record/
#
- # source://thor//lib/thor/actions/file_manipulation.rb#293
+ # source://thor//lib/thor/actions/file_manipulation.rb#291
def uncomment_lines(path, flag, *args); end
protected
- # source://thor//lib/thor/actions.rb#330
+ # source://thor//lib/thor/actions.rb#329
def _cleanup_options_and_set(options, key); end
# Allow current root to be shared between invocations.
#
- # source://thor//lib/thor/actions.rb#326
+ # source://thor//lib/thor/actions.rb#325
def _shared_configuration; end
private
- # source://thor//lib/thor/actions/file_manipulation.rb#350
+ # source://thor//lib/thor/actions/file_manipulation.rb#348
def capture(*args); end
- # source://thor//lib/thor/actions/file_manipulation.rb#346
+ # source://thor//lib/thor/actions/file_manipulation.rb#344
def concat(string); end
# Returns the value of attribute output_buffer.
#
- # source://thor//lib/thor/actions/file_manipulation.rb#341
+ # source://thor//lib/thor/actions/file_manipulation.rb#339
def output_buffer; end
# Sets the attribute output_buffer
#
# @param value the value to set the attribute output_buffer to.
#
- # source://thor//lib/thor/actions/file_manipulation.rb#341
+ # source://thor//lib/thor/actions/file_manipulation.rb#339
def output_buffer=(_arg0); end
- # source://thor//lib/thor/actions/file_manipulation.rb#354
+ # source://thor//lib/thor/actions/file_manipulation.rb#352
def with_output_buffer(buf = T.unsafe(nil)); end
class << self
@@ -985,9 +1187,9 @@ end
# Thor::Actions#capture depends on what kind of buffer is used in ERB.
# Thus CapturableERB fixes ERB to use String buffer.
#
-# source://thor//lib/thor/actions/file_manipulation.rb#366
+# source://thor//lib/thor/actions/file_manipulation.rb#364
class Thor::Actions::CapturableERB < ::ERB
- # source://thor//lib/thor/actions/file_manipulation.rb#367
+ # source://thor//lib/thor/actions/file_manipulation.rb#365
def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end
end
@@ -1043,12 +1245,12 @@ class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory
# source://thor//lib/thor/actions/create_file.rb#45
def identical?; end
- # source://thor//lib/thor/actions/create_file.rb#59
+ # source://thor//lib/thor/actions/create_file.rb#60
def invoke!; end
# Holds the content to be added to the file.
#
- # source://thor//lib/thor/actions/create_file.rb#51
+ # source://thor//lib/thor/actions/create_file.rb#52
def render; end
protected
@@ -1057,19 +1259,19 @@ class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory
#
# @return [Boolean]
#
- # source://thor//lib/thor/actions/create_file.rb#99
+ # source://thor//lib/thor/actions/create_file.rb#100
def force_on_collision?; end
# If force is true, run the action, otherwise check if it's not being
# skipped. If both are false, show the file_collision menu, if the menu
# returns true, force it, otherwise skip.
#
- # source://thor//lib/thor/actions/create_file.rb#85
+ # source://thor//lib/thor/actions/create_file.rb#86
def force_or_skip_or_conflict(force, skip, &block); end
# Now on conflict we check if the file is identical or not.
#
- # source://thor//lib/thor/actions/create_file.rb#72
+ # source://thor//lib/thor/actions/create_file.rb#73
def on_conflict_behavior(&block); end
end
@@ -1261,17 +1463,25 @@ class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory
# source://thor//lib/thor/actions/inject_into_file.rb#37
def replacement; end
- # source://thor//lib/thor/actions/inject_into_file.rb#72
+ # source://thor//lib/thor/actions/inject_into_file.rb#74
def revoke!; end
protected
+ # source://thor//lib/thor/actions/inject_into_file.rb#110
+ def content; end
+
# Adds the content to the file.
#
- # source://thor//lib/thor/actions/inject_into_file.rb#108
+ # source://thor//lib/thor/actions/inject_into_file.rb#120
def replace!(regexp, string, force); end
- # source://thor//lib/thor/actions/inject_into_file.rb#88
+ # @return [Boolean]
+ #
+ # source://thor//lib/thor/actions/inject_into_file.rb#114
+ def replacement_present?; end
+
+ # source://thor//lib/thor/actions/inject_into_file.rb#90
def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end
end
@@ -1297,10 +1507,10 @@ end
# source://thor//lib/thor/actions/inject_into_file.rb#24
Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash)
-# source://thor//lib/thor/error.rb#68
+# source://thor//lib/thor/error.rb#57
class Thor::AmbiguousCommandError < ::Thor::Error; end
-# source://thor//lib/thor/error.rb#70
+# source://thor//lib/thor/error.rb#59
Thor::AmbiguousTaskError = Thor::AmbiguousCommandError
# source://thor//lib/thor/parser/argument.rb#2
@@ -1331,6 +1541,9 @@ class Thor::Argument
# source://thor//lib/thor/parser/argument.rb#5
def enum; end
+ # source://thor//lib/thor/parser/argument.rb#55
+ def enum_to_s; end
+
# Returns the value of attribute name.
#
# source://thor//lib/thor/parser/argument.rb#5
@@ -1341,6 +1554,9 @@ class Thor::Argument
# source://thor//lib/thor/parser/argument.rb#5
def name; end
+ # source://thor//lib/thor/parser/argument.rb#27
+ def print_default; end
+
# Returns the value of attribute required.
#
# source://thor//lib/thor/parser/argument.rb#5
@@ -1348,12 +1564,12 @@ class Thor::Argument
# @return [Boolean]
#
- # source://thor//lib/thor/parser/argument.rb#31
+ # source://thor//lib/thor/parser/argument.rb#42
def required?; end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/argument.rb#35
+ # source://thor//lib/thor/parser/argument.rb#46
def show_default?; end
# Returns the value of attribute type.
@@ -1361,22 +1577,22 @@ class Thor::Argument
# source://thor//lib/thor/parser/argument.rb#5
def type; end
- # source://thor//lib/thor/parser/argument.rb#27
+ # source://thor//lib/thor/parser/argument.rb#38
def usage; end
protected
- # source://thor//lib/thor/parser/argument.rb#55
+ # source://thor//lib/thor/parser/argument.rb#74
def default_banner; end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/argument.rb#51
+ # source://thor//lib/thor/parser/argument.rb#70
def valid_type?(type); end
# @raise [ArgumentError]
#
- # source://thor//lib/thor/parser/argument.rb#46
+ # source://thor//lib/thor/parser/argument.rb#65
def validate!; end
end
@@ -1392,10 +1608,10 @@ class Thor::Arguments
# source://thor//lib/thor/parser/arguments.rb#26
def initialize(arguments = T.unsafe(nil)); end
- # source://thor//lib/thor/parser/arguments.rb#44
+ # source://thor//lib/thor/parser/arguments.rb#40
def parse(args); end
- # source://thor//lib/thor/parser/arguments.rb#57
+ # source://thor//lib/thor/parser/arguments.rb#53
def remaining; end
private
@@ -1404,22 +1620,22 @@ class Thor::Arguments
#
# @raise [RequiredArgumentMissingError]
#
- # source://thor//lib/thor/parser/arguments.rb#170
+ # source://thor//lib/thor/parser/arguments.rb#186
def check_requirement!; end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/arguments.rb#88
+ # source://thor//lib/thor/parser/arguments.rb#84
def current_is_value?; end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/arguments.rb#68
+ # source://thor//lib/thor/parser/arguments.rb#64
def last?; end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/arguments.rb#63
+ # source://thor//lib/thor/parser/arguments.rb#59
def no_or_skip?(arg); end
# Runs through the argument array getting all strings until no string is
@@ -1431,7 +1647,7 @@ class Thor::Arguments
#
# ["a", "b", "c"]
#
- # source://thor//lib/thor/parser/arguments.rb#122
+ # source://thor//lib/thor/parser/arguments.rb#118
def parse_array(name); end
# Runs through the argument array getting strings that contains ":" and
@@ -1443,14 +1659,14 @@ class Thor::Arguments
#
# { "name" => "string", "age" => "integer" }
#
- # source://thor//lib/thor/parser/arguments.rb#101
+ # source://thor//lib/thor/parser/arguments.rb#97
def parse_hash(name); end
# Check if the peek is numeric format and return a Float or Integer.
# Check if the peek is included in enum if enum is provided.
# Otherwise raises an error.
#
- # source://thor//lib/thor/parser/arguments.rb#133
+ # source://thor//lib/thor/parser/arguments.rb#139
def parse_numeric(name); end
# Parse string:
@@ -1458,18 +1674,23 @@ class Thor::Arguments
# for --no-string-arg, nil
# Check if the peek is included in enum if enum is provided. Otherwise raises an error.
#
- # source://thor//lib/thor/parser/arguments.rb#154
+ # source://thor//lib/thor/parser/arguments.rb#158
def parse_string(name); end
- # source://thor//lib/thor/parser/arguments.rb#72
+ # source://thor//lib/thor/parser/arguments.rb#68
def peek; end
- # source://thor//lib/thor/parser/arguments.rb#76
+ # source://thor//lib/thor/parser/arguments.rb#72
def shift; end
- # source://thor//lib/thor/parser/arguments.rb#80
+ # source://thor//lib/thor/parser/arguments.rb#76
def unshift(arg); end
+ # Raises an error if the switch is an enum and the values aren't included on it.
+ #
+ # source://thor//lib/thor/parser/arguments.rb#172
+ def validate_enum_value!(name, value, message); end
+
class << self
# source://thor//lib/thor/parser/arguments.rb#19
def parse(*args); end
@@ -1485,6 +1706,9 @@ end
# source://thor//lib/thor/parser/arguments.rb#3
Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp)
+# source://thor//lib/thor/error.rb#104
+class Thor::AtLeastOneRequiredArgumentError < ::Thor::InvocationError; end
+
# source://thor//lib/thor/shell.rb#4
module Thor::Base
include ::Thor::Invocation
@@ -1549,13 +1773,13 @@ module Thor::Base
def parent_options=(_arg0); end
class << self
- # source://thor//lib/thor/base.rb#100
+ # source://thor//lib/thor/base.rb#116
def included(base); end
# Whenever a class inherits from Thor or Thor::Group, we should track the
# class and the file on Thor::Base. This is the method responsible for it.
#
- # source://thor//lib/thor/base.rb#128
+ # source://thor//lib/thor/base.rb#144
def register_klass_file(klass); end
# Returns the shell used in all Thor classes. If you are in a Unix platform
@@ -1576,7 +1800,7 @@ module Thor::Base
# ==== Returns
# Hash[path => Class]
#
- # source://thor//lib/thor/base.rb#121
+ # source://thor//lib/thor/base.rb#137
def subclass_files; end
# Returns the classes that inherits from Thor or Thor::Group.
@@ -1584,12 +1808,12 @@ module Thor::Base
# ==== Returns
# Array[Class]
#
- # source://thor//lib/thor/base.rb#112
+ # source://thor//lib/thor/base.rb#128
def subclasses; end
end
end
-# source://thor//lib/thor/base.rb#137
+# source://thor//lib/thor/base.rb#153
module Thor::Base::ClassMethods
# Returns the commands for this Thor class and all subclasses.
#
@@ -1597,7 +1821,7 @@ module Thor::Base::ClassMethods
# Hash:: An ordered hash with commands names as keys and Thor::Command
# objects as values.
#
- # source://thor//lib/thor/base.rb#383
+ # source://thor//lib/thor/base.rb#482
def all_commands; end
# Returns the commands for this Thor class and all subclasses.
@@ -1606,13 +1830,13 @@ module Thor::Base::ClassMethods
# Hash:: An ordered hash with commands names as keys and Thor::Command
# objects as values.
#
- # source://thor//lib/thor/base.rb#383
+ # source://thor//lib/thor/base.rb#482
def all_tasks; end
# If you want to use defaults that don't match the type of an option,
# either specify `check_default_type: false` or call `allow_incompatible_default_type!`
#
- # source://thor//lib/thor/base.rb#173
+ # source://thor//lib/thor/base.rb#189
def allow_incompatible_default_type!; end
# Adds an argument to the class and creates an attr_accessor for it.
@@ -1650,7 +1874,7 @@ module Thor::Base::ClassMethods
# ==== Errors
# ArgumentError:: Raised if you supply a required argument after a non required one.
#
- # source://thor//lib/thor/base.rb#245
+ # source://thor//lib/thor/base.rb#261
def argument(name, options = T.unsafe(nil)); end
# Returns this class arguments, looking up in the ancestors chain.
@@ -1658,42 +1882,116 @@ module Thor::Base::ClassMethods
# ==== Returns
# Array[Thor::Argument]
#
- # source://thor//lib/thor/base.rb#277
+ # source://thor//lib/thor/base.rb#293
def arguments; end
- # source://thor//lib/thor/base.rb#146
+ # source://thor//lib/thor/base.rb#162
def attr_accessor(*_arg0); end
- # source://thor//lib/thor/base.rb#138
+ # source://thor//lib/thor/base.rb#154
def attr_reader(*_arg0); end
- # source://thor//lib/thor/base.rb#142
+ # source://thor//lib/thor/base.rb#158
def attr_writer(*_arg0); end
- # source://thor//lib/thor/base.rb#177
+ # source://thor//lib/thor/base.rb#193
def check_default_type; end
# If you want to raise an error when the default value of an option does not match
# the type call check_default_type!
# This will be the default; for compatibility a deprecation warning is issued if necessary.
#
- # source://thor//lib/thor/base.rb#167
+ # source://thor//lib/thor/base.rb#183
def check_default_type!; end
- # source://thor//lib/thor/base.rb#156
+ # source://thor//lib/thor/base.rb#172
def check_unknown_options; end
# If you want to raise an error for unknown options, call check_unknown_options!
# This is disabled by default to allow dynamic invocations.
#
- # source://thor//lib/thor/base.rb#152
+ # source://thor//lib/thor/base.rb#168
def check_unknown_options!; end
# @return [Boolean]
#
- # source://thor//lib/thor/base.rb#160
+ # source://thor//lib/thor/base.rb#176
def check_unknown_options?(config); end
+ # Adds and declares option group for required at least one of options in the
+ # block and arguments. You can declare options as the outside of the block.
+ #
+ # ==== Examples
+ #
+ # class_at_least_one do
+ # class_option :one
+ # class_option :two
+ # end
+ #
+ # Or
+ #
+ # class_option :one
+ # class_option :two
+ # class_at_least_one :one, :two
+ #
+ # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError
+ # will be raised.
+ #
+ # You can use class_at_least_one and class_exclusive at the same time.
+ #
+ # class_exclusive do
+ # class_at_least_one do
+ # class_option :one
+ # class_option :two
+ # end
+ # end
+ #
+ # Then it is required either only one of "--one" or "--two".
+ #
+ # source://thor//lib/thor/base.rb#392
+ def class_at_least_one(*args, &block); end
+
+ # Returns this class at least one of required options array set, looking up in the ancestors chain.
+ #
+ # ==== Returns
+ # Array[Array[Thor::Option.name]]
+ #
+ # source://thor//lib/thor/base.rb#411
+ def class_at_least_one_option_names; end
+
+ # Adds and declares option group for exclusive options in the
+ # block and arguments. You can declare options as the outside of the block.
+ #
+ # ==== Parameters
+ # Array[Thor::Option.name]
+ #
+ # ==== Examples
+ #
+ # class_exclusive do
+ # class_option :one
+ # class_option :two
+ # end
+ #
+ # Or
+ #
+ # class_option :one
+ # class_option :two
+ # class_exclusive :one, :two
+ #
+ # If you give "--one" and "--two" at the same time ExclusiveArgumentsError
+ # will be raised.
+ #
+ # source://thor//lib/thor/base.rb#357
+ def class_exclusive(*args, &block); end
+
+ # Returns this class exclusive options array set, looking up in the ancestors chain.
+ #
+ # ==== Returns
+ # Array[Array[Thor::Option.name]]
+ #
+ # source://thor//lib/thor/base.rb#402
+ def class_exclusive_option_names; end
+
# Adds an option to the set of class options
#
# ==== Parameters
@@ -1710,7 +2008,7 @@ module Thor::Base::ClassMethods
# :banner:: -- String to show on usage notes.
# :hide:: -- If you want to hide this option from the help.
#
- # source://thor//lib/thor/base.rb#312
+ # source://thor//lib/thor/base.rb#328
def class_option(name, options = T.unsafe(nil)); end
# Adds a bunch of options to the set of class options.
@@ -1722,7 +2020,7 @@ module Thor::Base::ClassMethods
# ==== Parameters
# Hash[Symbol => Object]
#
- # source://thor//lib/thor/base.rb#290
+ # source://thor//lib/thor/base.rb#306
def class_options(options = T.unsafe(nil)); end
# Returns the commands for this Thor class.
@@ -1731,7 +2029,7 @@ module Thor::Base::ClassMethods
# Hash:: An ordered hash with commands names as keys and Thor::Command
# objects as values.
#
- # source://thor//lib/thor/base.rb#372
+ # source://thor//lib/thor/base.rb#471
def commands; end
# If true, option set will not suspend the execution of the command when
@@ -1739,14 +2037,14 @@ module Thor::Base::ClassMethods
#
# @return [Boolean]
#
- # source://thor//lib/thor/base.rb#191
+ # source://thor//lib/thor/base.rb#207
def disable_required_check?(command_name); end
# A flag that makes the process exit with status 1 if any error happens.
#
# @return [Boolean]
#
- # source://thor//lib/thor/base.rb#529
+ # source://thor//lib/thor/base.rb#628
def exit_on_failure?; end
# Defines the group. This is used when thor list is invoked so you can specify
@@ -1755,22 +2053,22 @@ module Thor::Base::ClassMethods
# ==== Parameters
# name
#
- # source://thor//lib/thor/base.rb#358
+ # source://thor//lib/thor/base.rb#457
def group(name = T.unsafe(nil)); end
# @raise [InvocationError]
#
- # source://thor//lib/thor/base.rb#519
+ # source://thor//lib/thor/base.rb#618
def handle_argument_error(command, error, args, arity); end
# @raise [UndefinedCommandError]
#
- # source://thor//lib/thor/base.rb#514
+ # source://thor//lib/thor/base.rb#613
def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end
# @raise [UndefinedCommandError]
#
- # source://thor//lib/thor/base.rb#514
+ # source://thor//lib/thor/base.rb#613
def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end
# Sets the namespace for the Thor or Thor::Group class. By default the
@@ -1795,7 +2093,7 @@ module Thor::Base::ClassMethods
#
# thor :my_command
#
- # source://thor//lib/thor/base.rb#467
+ # source://thor//lib/thor/base.rb#566
def namespace(name = T.unsafe(nil)); end
# All methods defined inside the given block are not added as commands.
@@ -1817,15 +2115,15 @@ module Thor::Base::ClassMethods
# remove_command :this_is_not_a_command
# end
#
- # source://thor//lib/thor/base.rb#431
+ # source://thor//lib/thor/base.rb#530
def no_commands(&block); end
# @return [Boolean]
#
- # source://thor//lib/thor/base.rb#441
+ # source://thor//lib/thor/base.rb#540
def no_commands?; end
- # source://thor//lib/thor/base.rb#437
+ # source://thor//lib/thor/base.rb#536
def no_commands_context; end
# All methods defined inside the given block are not added as commands.
@@ -1847,7 +2145,7 @@ module Thor::Base::ClassMethods
# remove_command :this_is_not_a_command
# end
#
- # source://thor//lib/thor/base.rb#431
+ # source://thor//lib/thor/base.rb#530
def no_tasks(&block); end
# Allows to use private methods from parent in child classes as commands.
@@ -1860,7 +2158,7 @@ module Thor::Base::ClassMethods
# public_command :foo
# public_command :foo, :bar, :baz
#
- # source://thor//lib/thor/base.rb#507
+ # source://thor//lib/thor/base.rb#606
def public_command(*names); end
# Allows to use private methods from parent in child classes as commands.
@@ -1873,7 +2171,7 @@ module Thor::Base::ClassMethods
# public_command :foo
# public_command :foo, :bar, :baz
#
- # source://thor//lib/thor/base.rb#507
+ # source://thor//lib/thor/base.rb#606
def public_task(*names); end
# Removes a previous defined argument. If :undefine is given, undefine
@@ -1887,7 +2185,7 @@ module Thor::Base::ClassMethods
# remove_argument :foo
# remove_argument :foo, :bar, :baz, :undefine => true
#
- # source://thor//lib/thor/base.rb#327
+ # source://thor//lib/thor/base.rb#426
def remove_argument(*names); end
# Removes a previous defined class option.
@@ -1900,7 +2198,7 @@ module Thor::Base::ClassMethods
# remove_class_option :foo
# remove_class_option :foo, :bar, :baz
#
- # source://thor//lib/thor/base.rb#346
+ # source://thor//lib/thor/base.rb#445
def remove_class_option(*names); end
# Removes a given command from this Thor class. This is usually done if you
@@ -1915,7 +2213,7 @@ module Thor::Base::ClassMethods
# options:: You can give :undefine => true if you want commands the method
# to be undefined from the class as well.
#
- # source://thor//lib/thor/base.rb#401
+ # source://thor//lib/thor/base.rb#500
def remove_command(*names); end
# Removes a given command from this Thor class. This is usually done if you
@@ -1930,7 +2228,7 @@ module Thor::Base::ClassMethods
# options:: You can give :undefine => true if you want commands the method
# to be undefined from the class as well.
#
- # source://thor//lib/thor/base.rb#401
+ # source://thor//lib/thor/base.rb#500
def remove_task(*names); end
# Parses the command and options from the given args, instantiate the class
@@ -1941,7 +2239,7 @@ module Thor::Base::ClassMethods
# script = MyScript.new(args, options, config)
# script.invoke(:command, first_arg, second_arg, third_arg)
#
- # source://thor//lib/thor/base.rb#483
+ # source://thor//lib/thor/base.rb#582
def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end
# If true, option parsing is suspended as soon as an unknown option or a
@@ -1950,22 +2248,22 @@ module Thor::Base::ClassMethods
#
# @return [Boolean]
#
- # source://thor//lib/thor/base.rb#185
+ # source://thor//lib/thor/base.rb#201
def stop_on_unknown_option?(command_name); end
- # source://thor//lib/thor/base.rb#202
+ # source://thor//lib/thor/base.rb#218
def strict_args_position; end
# If you want only strict string args (useful when cascading thor classes),
# call strict_args_position! This is disabled by default to allow dynamic
# invocations.
#
- # source://thor//lib/thor/base.rb#198
+ # source://thor//lib/thor/base.rb#214
def strict_args_position!; end
# @return [Boolean]
#
- # source://thor//lib/thor/base.rb#206
+ # source://thor//lib/thor/base.rb#222
def strict_args_position?(config); end
# Returns the commands for this Thor class.
@@ -1974,7 +2272,7 @@ module Thor::Base::ClassMethods
# Hash:: An ordered hash with commands names as keys and Thor::Command
# objects as values.
#
- # source://thor//lib/thor/base.rb#372
+ # source://thor//lib/thor/base.rb#471
def tasks; end
protected
@@ -1982,12 +2280,12 @@ module Thor::Base::ClassMethods
# SIGNATURE: Sets the baseclass. This is where the superclass lookup
# finishes.
#
- # source://thor//lib/thor/base.rb#678
+ # source://thor//lib/thor/base.rb#777
def baseclass; end
# The basename of the program invoking the thor class.
#
- # source://thor//lib/thor/base.rb#672
+ # source://thor//lib/thor/base.rb#771
def basename; end
# Build an option and adds it to the given scope.
@@ -1997,7 +2295,7 @@ module Thor::Base::ClassMethods
# options:: Described in both class_option and method_option.
# scope:: Options hash that is being built up
#
- # source://thor//lib/thor/base.rb#589
+ # source://thor//lib/thor/base.rb#688
def build_option(name, options, scope); end
# Receives a hash of options, parse them and add to the scope. This is a
@@ -2008,83 +2306,100 @@ module Thor::Base::ClassMethods
# ==== Parameters
# Hash[Symbol => Object]
#
- # source://thor//lib/thor/base.rb#600
+ # source://thor//lib/thor/base.rb#699
def build_options(options, scope); end
+ # Get target(method_options or class_options) options
+ # of before and after by block evaluation.
+ #
+ # source://thor//lib/thor/base.rb#808
+ def built_option_names(target, opt = T.unsafe(nil), &block); end
+
# Prints the class options per group. If an option does not belong to
# any group, it's printed as Class option.
#
- # source://thor//lib/thor/base.rb#539
+ # source://thor//lib/thor/base.rb#638
def class_options_help(shell, groups = T.unsafe(nil)); end
+ # Get command scope member by name.
+ #
+ # source://thor//lib/thor/base.rb#816
+ def command_scope_member(name, options = T.unsafe(nil)); end
+
# SIGNATURE: Creates a new command if valid_command? is true. This method is
# called when a new method is added to the class.
#
- # source://thor//lib/thor/base.rb#683
+ # source://thor//lib/thor/base.rb#782
def create_command(meth); end
# SIGNATURE: Creates a new command if valid_command? is true. This method is
# called when a new method is added to the class.
#
- # source://thor//lib/thor/base.rb#683
+ # source://thor//lib/thor/base.rb#782
def create_task(meth); end
# SIGNATURE: The hook invoked by start.
#
# @raise [NotImplementedError]
#
- # source://thor//lib/thor/base.rb#693
+ # source://thor//lib/thor/base.rb#792
def dispatch(command, given_args, given_opts, config); end
# Finds a command with the given name. If the command belongs to the current
# class, just return it, otherwise dup it and add the fresh copy to the
# current command hash.
#
- # source://thor//lib/thor/base.rb#609
+ # source://thor//lib/thor/base.rb#708
def find_and_refresh_command(name); end
# Finds a command with the given name. If the command belongs to the current
# class, just return it, otherwise dup it and add the fresh copy to the
# current command hash.
#
- # source://thor//lib/thor/base.rb#609
+ # source://thor//lib/thor/base.rb#708
def find_and_refresh_task(name); end
# Retrieves a value from superclass. If it reaches the baseclass,
# returns default.
#
- # source://thor//lib/thor/base.rb#650
+ # source://thor//lib/thor/base.rb#749
def from_superclass(method, default = T.unsafe(nil)); end
# Every time someone inherits from a Thor class, register the klass
# and file into baseclass.
#
- # source://thor//lib/thor/base.rb#622
+ # source://thor//lib/thor/base.rb#721
def inherited(klass); end
# SIGNATURE: Defines behavior when the initialize method is added to the
# class.
#
- # source://thor//lib/thor/base.rb#689
+ # source://thor//lib/thor/base.rb#788
def initialize_added; end
# Raises an error if the word given is a Thor reserved word.
#
# @return [Boolean]
#
- # source://thor//lib/thor/base.rb#578
+ # source://thor//lib/thor/base.rb#677
def is_thor_reserved_word?(word, type); end
# Fire this callback whenever a method is added. Added methods are
# tracked as commands by invoking the create_command method.
#
- # source://thor//lib/thor/base.rb#630
+ # source://thor//lib/thor/base.rb#729
def method_added(meth); end
# Receives a set of options and print them.
#
- # source://thor//lib/thor/base.rb#557
+ # source://thor//lib/thor/base.rb#656
def print_options(shell, options, group_name = T.unsafe(nil)); end
+
+ # Register a relation of options for target(method_option/class_option)
+ # by args and block.
+ #
+ # source://thor//lib/thor/base.rb#798
+ def register_options_relation_for(target, relation, *args, &block); end
end
# source://thor//lib/thor/command.rb#2
@@ -2092,68 +2407,74 @@ class Thor::Command < ::Struct
# @return [Command] a new instance of Command
#
# source://thor//lib/thor/command.rb#5
- def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end
+ def initialize(name, description, long_description, wrap_long_description, usage, options = T.unsafe(nil), options_relation = T.unsafe(nil)); end
# Returns the formatted usage by injecting given required arguments
# and required options into the given usage.
#
- # source://thor//lib/thor/command.rb#41
+ # source://thor//lib/thor/command.rb#42
def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end
# @return [Boolean]
#
- # source://thor//lib/thor/command.rb#14
+ # source://thor//lib/thor/command.rb#15
def hidden?; end
+ # source://thor//lib/thor/command.rb#70
+ def method_at_least_one_option_names; end
+
+ # source://thor//lib/thor/command.rb#66
+ def method_exclusive_option_names; end
+
# By default, a command invokes a method in the thor class. You can change this
# implementation to create custom commands.
#
- # source://thor//lib/thor/command.rb#20
+ # source://thor//lib/thor/command.rb#21
def run(instance, args = T.unsafe(nil)); end
protected
# @return [Boolean]
#
- # source://thor//lib/thor/command.rb#105
+ # source://thor//lib/thor/command.rb#114
def handle_argument_error?(instance, error, caller); end
# @return [Boolean]
#
- # source://thor//lib/thor/command.rb#112
+ # source://thor//lib/thor/command.rb#121
def handle_no_method_error?(instance, error, caller); end
# @return [Boolean]
#
- # source://thor//lib/thor/command.rb#95
+ # source://thor//lib/thor/command.rb#104
def local_method?(instance, name); end
# @return [Boolean]
#
- # source://thor//lib/thor/command.rb#78
+ # source://thor//lib/thor/command.rb#87
def not_debugging?(instance); end
# @return [Boolean]
#
- # source://thor//lib/thor/command.rb#91
+ # source://thor//lib/thor/command.rb#100
def private_method?(instance); end
# Given a target, checks if this class name is a public method.
#
# @return [Boolean]
#
- # source://thor//lib/thor/command.rb#87
+ # source://thor//lib/thor/command.rb#96
def public_method?(instance); end
# Add usage with required arguments
#
- # source://thor//lib/thor/command.rb#68
+ # source://thor//lib/thor/command.rb#77
def required_arguments_for(klass, usage); end
- # source://thor//lib/thor/command.rb#82
+ # source://thor//lib/thor/command.rb#91
def required_options; end
- # source://thor//lib/thor/command.rb#100
+ # source://thor//lib/thor/command.rb#109
def sans_backtrace(backtrace, caller); end
private
@@ -2200,35 +2521,38 @@ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash
# @return [Boolean]
#
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45
def key?(key); end
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53
def merge(other); end
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#57
def merge!(other); end
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#72
def replace(other_hash); end
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#60
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64
def reverse_merge(other); end
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68
def reverse_merge!(other_hash); end
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41
+ def slice(*keys); end
+
# Convert to a Hash with String keys.
#
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#73
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#77
def to_hash; end
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49
def values_at(*indices); end
protected
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#79
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#83
def convert_key(key); end
# Magic predicates. For instance:
@@ -2237,33 +2561,33 @@ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash
# options.shebang # => "/usr/lib/local/ruby"
# options.test_framework?(:rspec) # => options[:test_framework] == :rspec
#
- # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#89
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#93
def method_missing(method, *args); end
end
-# source://thor//lib/thor/error.rb#14
+# source://thor//lib/thor/error.rb#3
module Thor::Correctable
- # source://thor//lib/thor/error.rb#19
+ # source://thor//lib/thor/error.rb#8
def corrections; end
- # source://thor//lib/thor/error.rb#15
+ # source://thor//lib/thor/error.rb#4
def to_s; end
end
# A dynamic command that handles method missing scenarios.
#
-# source://thor//lib/thor/command.rb#128
+# source://thor//lib/thor/command.rb#137
class Thor::DynamicCommand < ::Thor::Command
# @return [DynamicCommand] a new instance of DynamicCommand
#
- # source://thor//lib/thor/command.rb#129
+ # source://thor//lib/thor/command.rb#138
def initialize(name, options = T.unsafe(nil)); end
- # source://thor//lib/thor/command.rb#133
+ # source://thor//lib/thor/command.rb#142
def run(instance, args = T.unsafe(nil)); end
end
-# source://thor//lib/thor/command.rb#141
+# source://thor//lib/thor/command.rb#150
Thor::DynamicTask = Thor::DynamicCommand
# Thor::Error is raised when it's caused by wrong usage of thor classes. Those
@@ -2273,9 +2597,12 @@ Thor::DynamicTask = Thor::DynamicCommand
# overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we
# ensure that developer errors are shown with full backtrace.
#
-# source://thor//lib/thor/error.rb#31
+# source://thor//lib/thor/error.rb#20
class Thor::Error < ::StandardError; end
+# source://thor//lib/thor/error.rb#101
+class Thor::ExclusiveArgumentError < ::Thor::InvocationError; end
+
# Thor has a special class called Thor::Group. The main difference to Thor class
# is that it invokes all commands at once. It also include some methods that allows
# invocations to be done at the class method, which are not available to Thor
@@ -2449,15 +2776,15 @@ Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array)
# A command that is hidden in help messages but still invocable.
#
-# source://thor//lib/thor/command.rb#120
+# source://thor//lib/thor/command.rb#129
class Thor::HiddenCommand < ::Thor::Command
# @return [Boolean]
#
- # source://thor//lib/thor/command.rb#121
+ # source://thor//lib/thor/command.rb#130
def hidden?; end
end
-# source://thor//lib/thor/command.rb#125
+# source://thor//lib/thor/command.rb#134
Thor::HiddenTask = Thor::HiddenCommand
# source://thor//lib/thor/invocation.rb#2
@@ -2611,7 +2938,7 @@ end
# Raised when a command was found, but not invoked properly.
#
-# source://thor//lib/thor/error.rb#73
+# source://thor//lib/thor/error.rb#62
class Thor::InvocationError < ::Thor::Error; end
# source://thor//lib/thor/line_editor/basic.rb#2
@@ -2724,7 +3051,7 @@ class Thor::LineEditor::Readline::PathCompletion
def text; end
end
-# source://thor//lib/thor/error.rb#109
+# source://thor//lib/thor/error.rb#98
class Thor::MalformattedArgumentError < ::Thor::InvocationError; end
# source://thor//lib/thor/nested_context.rb#2
@@ -2751,12 +3078,6 @@ class Thor::NestedContext
def push; end
end
-# source://thor//lib/thor/error.rb#8
-class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker
- # source://thor//lib/thor/error.rb#9
- def initialize(dictionary); end
-end
-
# source://thor//lib/thor/parser/option.rb#2
class Thor::Option < ::Thor::Argument
# @return [Option] a new instance of Option
@@ -2772,10 +3093,10 @@ class Thor::Option < ::Thor::Argument
# source://thor//lib/thor/parser/option.rb#99
def aliases_for_usage; end
- # source://thor//lib/thor/parser/option.rb#109
+ # source://thor//lib/thor/parser/option.rb#118
def array?; end
- # source://thor//lib/thor/parser/option.rb#109
+ # source://thor//lib/thor/parser/option.rb#118
def boolean?; end
# Returns the value of attribute group.
@@ -2783,7 +3104,7 @@ class Thor::Option < ::Thor::Argument
# source://thor//lib/thor/parser/option.rb#3
def group; end
- # source://thor//lib/thor/parser/option.rb#109
+ # source://thor//lib/thor/parser/option.rb#118
def hash?; end
# Returns the value of attribute hide.
@@ -2799,7 +3120,7 @@ class Thor::Option < ::Thor::Argument
# source://thor//lib/thor/parser/option.rb#3
def lazy_default; end
- # source://thor//lib/thor/parser/option.rb#109
+ # source://thor//lib/thor/parser/option.rb#118
def numeric?; end
# Returns the value of attribute repeatable.
@@ -2807,7 +3128,12 @@ class Thor::Option < ::Thor::Argument
# source://thor//lib/thor/parser/option.rb#3
def repeatable; end
- # source://thor//lib/thor/parser/option.rb#109
+ # @return [Boolean]
+ #
+ # source://thor//lib/thor/parser/option.rb#107
+ def show_default?; end
+
+ # source://thor//lib/thor/parser/option.rb#118
def string?; end
# source://thor//lib/thor/parser/option.rb#75
@@ -2818,25 +3144,30 @@ class Thor::Option < ::Thor::Argument
protected
- # source://thor//lib/thor/parser/option.rb#159
+ # source://thor//lib/thor/parser/option.rb#168
def dasherize(str); end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/option.rb#151
+ # source://thor//lib/thor/parser/option.rb#160
def dasherized?; end
- # source://thor//lib/thor/parser/option.rb#155
+ # source://thor//lib/thor/parser/option.rb#164
def undasherize(str); end
# @raise [ArgumentError]
#
- # source://thor//lib/thor/parser/option.rb#117
+ # source://thor//lib/thor/parser/option.rb#126
def validate!; end
- # source://thor//lib/thor/parser/option.rb#122
+ # source://thor//lib/thor/parser/option.rb#131
def validate_default_type!; end
+ private
+
+ # source://thor//lib/thor/parser/option.rb#174
+ def normalize_aliases(aliases); end
+
class << self
# This parse quick options given as method_options. It makes several
# assumptions, but you can be more specific using the option method.
@@ -2883,31 +3214,37 @@ class Thor::Options < ::Thor::Arguments
# @return [Options] a new instance of Options
#
# source://thor//lib/thor/parser/options.rb#32
- def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end
+ def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil), relations = T.unsafe(nil)); end
+
+ # source://thor//lib/thor/parser/options.rb#156
+ def check_at_least_one!; end
+
+ # source://thor//lib/thor/parser/options.rb#144
+ def check_exclusive!; end
# @raise [UnknownArgumentError]
#
- # source://thor//lib/thor/parser/options.rb#141
+ # source://thor//lib/thor/parser/options.rb#168
def check_unknown!; end
- # source://thor//lib/thor/parser/options.rb#88
+ # source://thor//lib/thor/parser/options.rb#89
def parse(args); end
- # source://thor//lib/thor/parser/options.rb#64
+ # source://thor//lib/thor/parser/options.rb#65
def peek; end
- # source://thor//lib/thor/parser/options.rb#60
+ # source://thor//lib/thor/parser/options.rb#61
def remaining; end
- # source://thor//lib/thor/parser/options.rb#78
+ # source://thor//lib/thor/parser/options.rb#79
def shift; end
- # source://thor//lib/thor/parser/options.rb#83
+ # source://thor//lib/thor/parser/options.rb#84
def unshift(arg, is_value: T.unsafe(nil)); end
protected
- # source://thor//lib/thor/parser/options.rb#151
+ # source://thor//lib/thor/parser/options.rb#189
def assign_result!(option, result); end
# Check if the current value in peek is a registered switch.
@@ -2917,45 +3254,50 @@ class Thor::Options < ::Thor::Arguments
#
# @return [Boolean]
#
- # source://thor//lib/thor/parser/options.rb#165
+ # source://thor//lib/thor/parser/options.rb#203
def current_is_switch?; end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/options.rb#177
+ # source://thor//lib/thor/parser/options.rb#215
def current_is_switch_formatted?; end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/options.rb#187
+ # source://thor//lib/thor/parser/options.rb#225
def current_is_value?; end
+ # Option names changes to swith name or human name
+ #
+ # source://thor//lib/thor/parser/options.rb#179
+ def names_to_switch_names(names = T.unsafe(nil)); end
+
# Check if the given argument is actually a shortcut.
#
- # source://thor//lib/thor/parser/options.rb#206
+ # source://thor//lib/thor/parser/options.rb#244
def normalize_switch(arg); end
# Parse boolean values which can be given as --foo=true, --foo or --no-foo.
#
- # source://thor//lib/thor/parser/options.rb#217
+ # source://thor//lib/thor/parser/options.rb#255
def parse_boolean(switch); end
# Parse the value at the peek analyzing if it requires an input or not.
#
- # source://thor//lib/thor/parser/options.rb#235
+ # source://thor//lib/thor/parser/options.rb#273
def parse_peek(switch, option); end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/options.rb#210
+ # source://thor//lib/thor/parser/options.rb#248
def parsing_options?; end
# @return [Boolean]
#
- # source://thor//lib/thor/parser/options.rb#192
+ # source://thor//lib/thor/parser/options.rb#230
def switch?(arg); end
- # source://thor//lib/thor/parser/options.rb#196
+ # source://thor//lib/thor/parser/options.rb#234
def switch_option(arg); end
class << self
@@ -3019,7 +3361,7 @@ module Thor::RakeCompat
end
end
-# source://thor//lib/thor/error.rb#106
+# source://thor//lib/thor/error.rb#95
class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end
# source://thor//lib/thor/util.rb#4
@@ -3108,13 +3450,13 @@ module Thor::Shell
def _shared_configuration; end
end
-# source://thor//lib/thor/shell/basic.rb#3
+# source://thor//lib/thor/shell/basic.rb#7
class Thor::Shell::Basic
# Initialize base, mute and padding to nil.
#
# @return [Basic] a new instance of Basic
#
- # source://thor//lib/thor/shell/basic.rb#11
+ # source://thor//lib/thor/shell/basic.rb#13
def initialize; end
# Asks something to the user and receives a response.
@@ -3147,19 +3489,19 @@ class Thor::Shell::Basic
#
# ask("Where should the file be saved?", :path => true)
#
- # source://thor//lib/thor/shell/basic.rb#78
+ # source://thor//lib/thor/shell/basic.rb#80
def ask(statement, *args); end
# Returns the value of attribute base.
#
- # source://thor//lib/thor/shell/basic.rb#6
+ # source://thor//lib/thor/shell/basic.rb#8
def base; end
# Sets the attribute base
#
# @param value the value to set the attribute base to.
#
- # source://thor//lib/thor/shell/basic.rb#6
+ # source://thor//lib/thor/shell/basic.rb#8
def base=(_arg0); end
# Called if something goes wrong during the execution. This is used by Thor
@@ -3167,7 +3509,7 @@ class Thor::Shell::Basic
# wrong, you can always raise an exception. If you raise a Thor::Error, it
# will be rescued and wrapped in the method below.
#
- # source://thor//lib/thor/shell/basic.rb#342
+ # source://thor//lib/thor/shell/basic.rb#251
def error(statement); end
# Deals with file collision and returns true if the file should be
@@ -3178,24 +3520,24 @@ class Thor::Shell::Basic
# destination:: the destination file to solve conflicts
# block:: an optional block that returns the value to be used in diff and merge
#
- # source://thor//lib/thor/shell/basic.rb#285
+ # source://thor//lib/thor/shell/basic.rb#207
def file_collision(destination); end
# Sets the output padding while executing a block and resets it.
#
- # source://thor//lib/thor/shell/basic.rb#41
+ # source://thor//lib/thor/shell/basic.rb#43
def indent(count = T.unsafe(nil)); end
# Mute everything that's inside given block
#
- # source://thor//lib/thor/shell/basic.rb#20
+ # source://thor//lib/thor/shell/basic.rb#22
def mute; end
# Check if base is muted
#
# @return [Boolean]
#
- # source://thor//lib/thor/shell/basic.rb#29
+ # source://thor//lib/thor/shell/basic.rb#31
def mute?; end
# Make a question the to user and returns true if the user replies "n" or
@@ -3203,17 +3545,17 @@ class Thor::Shell::Basic
#
# @return [Boolean]
#
- # source://thor//lib/thor/shell/basic.rb#154
+ # source://thor//lib/thor/shell/basic.rb#156
def no?(statement, color = T.unsafe(nil)); end
# Returns the value of attribute padding.
#
- # source://thor//lib/thor/shell/basic.rb#7
+ # source://thor//lib/thor/shell/basic.rb#9
def padding; end
# Sets the output padding, not allowing less than zero values.
#
- # source://thor//lib/thor/shell/basic.rb#35
+ # source://thor//lib/thor/shell/basic.rb#37
def padding=(value); end
# Prints values in columns
@@ -3221,7 +3563,7 @@ class Thor::Shell::Basic
# ==== Parameters
# Array[String, String, ...]
#
- # source://thor//lib/thor/shell/basic.rb#163
+ # source://thor//lib/thor/shell/basic.rb#165
def print_in_columns(array); end
# Prints a table.
@@ -3232,8 +3574,9 @@ class Thor::Shell::Basic
# ==== Options
# indent:: Indent the first column by indent value.
# colwidth:: Force the first column to colwidth spaces wide.
+ # borders:: Adds ascii borders.
#
- # source://thor//lib/thor/shell/basic.rb#185
+ # source://thor//lib/thor/shell/basic.rb#180
def print_table(array, options = T.unsafe(nil)); end
# Prints a long string, word-wrapping the text to the current width of the
@@ -3245,7 +3588,7 @@ class Thor::Shell::Basic
# ==== Options
# indent:: Indent each line of the printed paragraph by indent value.
#
- # source://thor//lib/thor/shell/basic.rb#247
+ # source://thor//lib/thor/shell/basic.rb#194
def print_wrapped(message, options = T.unsafe(nil)); end
# Say (print) something to the user. If the sentence ends with a whitespace
@@ -3255,7 +3598,7 @@ class Thor::Shell::Basic
# ==== Example
# say("I know you knew that.")
#
- # source://thor//lib/thor/shell/basic.rb#96
+ # source://thor//lib/thor/shell/basic.rb#98
def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end
# Say (print) an error to the user. If the sentence ends with a whitespace
@@ -3265,7 +3608,7 @@ class Thor::Shell::Basic
# ==== Example
# say_error("error: something went wrong")
#
- # source://thor//lib/thor/shell/basic.rb#113
+ # source://thor//lib/thor/shell/basic.rb#115
def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end
# Say a status with the given color and appends the message. Since this
@@ -3273,110 +3616,89 @@ class Thor::Shell::Basic
# in log_status, avoiding the message from being shown. If a Symbol is
# given in log_status, it's used as the color.
#
- # source://thor//lib/thor/shell/basic.rb#128
+ # source://thor//lib/thor/shell/basic.rb#130
def say_status(status, message, log_status = T.unsafe(nil)); end
# Apply color to the given string with optional bold. Disabled in the
# Thor::Shell::Basic class.
#
- # source://thor//lib/thor/shell/basic.rb#349
+ # source://thor//lib/thor/shell/basic.rb#258
def set_color(string, *_arg1); end
- # source://thor//lib/thor/shell/basic.rb#326
- def terminal_width; end
-
# Make a question the to user and returns true if the user replies "y" or
# "yes".
#
# @return [Boolean]
#
- # source://thor//lib/thor/shell/basic.rb#147
+ # source://thor//lib/thor/shell/basic.rb#149
def yes?(statement, color = T.unsafe(nil)); end
protected
- # source://thor//lib/thor/shell/basic.rb#486
+ # source://thor//lib/thor/shell/basic.rb#362
def answer_match(possibilities, answer, case_insensitive); end
- # source://thor//lib/thor/shell/basic.rb#443
- def as_unicode; end
-
- # source://thor//lib/thor/shell/basic.rb#473
+ # source://thor//lib/thor/shell/basic.rb#349
def ask_filtered(statement, color, options); end
- # source://thor//lib/thor/shell/basic.rb#456
+ # source://thor//lib/thor/shell/basic.rb#332
def ask_simply(statement, color, options); end
# @return [Boolean]
#
- # source://thor//lib/thor/shell/basic.rb#360
+ # source://thor//lib/thor/shell/basic.rb#269
def can_display_colors?; end
- # Calculate the dynamic width of the terminal
- #
- # source://thor//lib/thor/shell/basic.rb#415
- def dynamic_width; end
-
- # source://thor//lib/thor/shell/basic.rb#419
- def dynamic_width_stty; end
-
- # source://thor//lib/thor/shell/basic.rb#423
- def dynamic_width_tput; end
-
- # source://thor//lib/thor/shell/basic.rb#387
- def file_collision_help; end
+ # source://thor//lib/thor/shell/basic.rb#296
+ def file_collision_help(block_given); end
- # source://thor//lib/thor/shell/basic.rb#507
+ # source://thor//lib/thor/shell/basic.rb#383
def git_merge_tool; end
# @return [Boolean]
#
- # source://thor//lib/thor/shell/basic.rb#377
+ # source://thor//lib/thor/shell/basic.rb#286
def is?(value); end
- # source://thor//lib/thor/shell/basic.rb#364
+ # source://thor//lib/thor/shell/basic.rb#273
def lookup_color(color); end
- # source://thor//lib/thor/shell/basic.rb#494
+ # source://thor//lib/thor/shell/basic.rb#370
def merge(destination, content); end
- # source://thor//lib/thor/shell/basic.rb#503
+ # source://thor//lib/thor/shell/basic.rb#379
def merge_tool; end
- # source://thor//lib/thor/shell/basic.rb#355
+ # source://thor//lib/thor/shell/basic.rb#264
def prepare_message(message, *color); end
# @return [Boolean]
#
- # source://thor//lib/thor/shell/basic.rb#410
+ # source://thor//lib/thor/shell/basic.rb#324
def quiet?; end
- # source://thor//lib/thor/shell/basic.rb#399
+ # source://thor//lib/thor/shell/basic.rb#313
def show_diff(destination, content); end
- # source://thor//lib/thor/shell/basic.rb#373
+ # source://thor//lib/thor/shell/basic.rb#282
def stderr; end
- # source://thor//lib/thor/shell/basic.rb#369
+ # source://thor//lib/thor/shell/basic.rb#278
def stdout; end
- # source://thor//lib/thor/shell/basic.rb#431
- def truncate(string, width); end
-
# @return [Boolean]
#
- # source://thor//lib/thor/shell/basic.rb#427
+ # source://thor//lib/thor/shell/basic.rb#328
def unix?; end
end
-# source://thor//lib/thor/shell/basic.rb#4
-Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer)
-
# Inherit from Thor::Shell::Basic and add set_color behavior. Check
# Thor::Shell::Basic to see all available methods.
#
-# source://thor//lib/thor/shell/color.rb#8
+# source://thor//lib/thor/shell/color.rb#9
class Thor::Shell::Color < ::Thor::Shell::Basic
+ include ::LCSDiff
+
# Set color by using a string or one of the defined constants. If a third
# option is set to true, it also adds bold to the string. This is based
# on Highline implementation and it automatically appends CLEAR to the end
@@ -3409,139 +3731,145 @@ class Thor::Shell::Color < ::Thor::Shell::Basic
# :on_cyan
# :on_white
#
- # source://thor//lib/thor/shell/color.rb#79
+ # source://thor//lib/thor/shell/color.rb#82
def set_color(string, *colors); end
protected
# @return [Boolean]
#
- # source://thor//lib/thor/shell/color.rb#107
+ # source://thor//lib/thor/shell/color.rb#110
def are_colors_disabled?; end
# @return [Boolean]
#
- # source://thor//lib/thor/shell/color.rb#103
+ # source://thor//lib/thor/shell/color.rb#106
def are_colors_supported?; end
# @return [Boolean]
#
- # source://thor//lib/thor/shell/color.rb#99
+ # source://thor//lib/thor/shell/color.rb#102
def can_display_colors?; end
-
- # Check if Diff::LCS is loaded. If it is, use it to create pretty output
- # for diff.
- #
- # @return [Boolean]
- #
- # source://thor//lib/thor/shell/color.rb#144
- def diff_lcs_loaded?; end
-
- # source://thor//lib/thor/shell/color.rb#127
- def output_diff_line(diff); end
-
- # Overwrite show_diff to show diff with colors if Diff::LCS is
- # available.
- #
- # source://thor//lib/thor/shell/color.rb#114
- def show_diff(destination, content); end
end
# Set the terminal's foreground ANSI color to black.
#
-# source://thor//lib/thor/shell/color.rb#15
+# source://thor//lib/thor/shell/color.rb#18
Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String)
# Set the terminal's foreground ANSI color to blue.
#
-# source://thor//lib/thor/shell/color.rb#23
+# source://thor//lib/thor/shell/color.rb#26
Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String)
# The start of an ANSI bold sequence.
#
-# source://thor//lib/thor/shell/color.rb#12
+# source://thor//lib/thor/shell/color.rb#15
Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String)
# Embed in a String to clear all previous ANSI sequences.
#
-# source://thor//lib/thor/shell/color.rb#10
+# source://thor//lib/thor/shell/color.rb#13
Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String)
# Set the terminal's foreground ANSI color to cyan.
#
-# source://thor//lib/thor/shell/color.rb#27
+# source://thor//lib/thor/shell/color.rb#30
Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String)
# Set the terminal's foreground ANSI color to green.
#
-# source://thor//lib/thor/shell/color.rb#19
+# source://thor//lib/thor/shell/color.rb#22
Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String)
# Set the terminal's foreground ANSI color to magenta.
#
-# source://thor//lib/thor/shell/color.rb#25
+# source://thor//lib/thor/shell/color.rb#28
Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String)
# Set the terminal's background ANSI color to black.
#
-# source://thor//lib/thor/shell/color.rb#32
+# source://thor//lib/thor/shell/color.rb#35
Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String)
# Set the terminal's background ANSI color to blue.
#
-# source://thor//lib/thor/shell/color.rb#40
+# source://thor//lib/thor/shell/color.rb#43
Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String)
# Set the terminal's background ANSI color to cyan.
#
-# source://thor//lib/thor/shell/color.rb#44
+# source://thor//lib/thor/shell/color.rb#47
Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String)
# Set the terminal's background ANSI color to green.
#
-# source://thor//lib/thor/shell/color.rb#36
+# source://thor//lib/thor/shell/color.rb#39
Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String)
# Set the terminal's background ANSI color to magenta.
#
-# source://thor//lib/thor/shell/color.rb#42
+# source://thor//lib/thor/shell/color.rb#45
Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String)
# Set the terminal's background ANSI color to red.
#
-# source://thor//lib/thor/shell/color.rb#34
+# source://thor//lib/thor/shell/color.rb#37
Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String)
# Set the terminal's background ANSI color to white.
#
-# source://thor//lib/thor/shell/color.rb#46
+# source://thor//lib/thor/shell/color.rb#49
Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String)
# Set the terminal's background ANSI color to yellow.
#
-# source://thor//lib/thor/shell/color.rb#38
+# source://thor//lib/thor/shell/color.rb#41
Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String)
# Set the terminal's foreground ANSI color to red.
#
-# source://thor//lib/thor/shell/color.rb#17
+# source://thor//lib/thor/shell/color.rb#20
Thor::Shell::Color::RED = T.let(T.unsafe(nil), String)
# Set the terminal's foreground ANSI color to white.
#
-# source://thor//lib/thor/shell/color.rb#29
+# source://thor//lib/thor/shell/color.rb#32
Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String)
# Set the terminal's foreground ANSI color to yellow.
#
-# source://thor//lib/thor/shell/color.rb#21
+# source://thor//lib/thor/shell/color.rb#24
Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String)
+# source://thor//lib/thor/shell/column_printer.rb#5
+class Thor::Shell::ColumnPrinter
+ # @return [ColumnPrinter] a new instance of ColumnPrinter
+ #
+ # source://thor//lib/thor/shell/column_printer.rb#8
+ def initialize(stdout, options = T.unsafe(nil)); end
+
+ # Returns the value of attribute options.
+ #
+ # source://thor//lib/thor/shell/column_printer.rb#6
+ def options; end
+
+ # source://thor//lib/thor/shell/column_printer.rb#14
+ def print(array); end
+
+ # Returns the value of attribute stdout.
+ #
+ # source://thor//lib/thor/shell/column_printer.rb#6
+ def stdout; end
+end
+
# Inherit from Thor::Shell::Basic and add set_color behavior. Check
# Thor::Shell::Basic to see all available methods.
#
-# source://thor//lib/thor/shell/html.rb#8
+# source://thor//lib/thor/shell/html.rb#9
class Thor::Shell::HTML < ::Thor::Shell::Basic
+ include ::LCSDiff
+
# Ask something to the user and receives a response.
#
# ==== Example
@@ -3551,7 +3879,7 @@ class Thor::Shell::HTML < ::Thor::Shell::Basic
#
# @raise [NotImplementedError]
#
- # source://thor//lib/thor/shell/html.rb#70
+ # source://thor//lib/thor/shell/html.rb#73
def ask(statement, color = T.unsafe(nil)); end
# Set color by using a string or one of the defined constants. If a third
@@ -3559,122 +3887,174 @@ class Thor::Shell::HTML < ::Thor::Shell::Basic
# on Highline implementation and it automatically appends CLEAR to the end
# of the returned String.
#
- # source://thor//lib/thor/shell/html.rb#51
+ # source://thor//lib/thor/shell/html.rb#54
def set_color(string, *colors); end
protected
# @return [Boolean]
#
- # source://thor//lib/thor/shell/html.rb#76
+ # source://thor//lib/thor/shell/html.rb#79
def can_display_colors?; end
-
- # Check if Diff::LCS is loaded. If it is, use it to create pretty output
- # for diff.
- #
- # @return [Boolean]
- #
- # source://thor//lib/thor/shell/html.rb#113
- def diff_lcs_loaded?; end
-
- # source://thor//lib/thor/shell/html.rb#96
- def output_diff_line(diff); end
-
- # Overwrite show_diff to show diff with colors if Diff::LCS is
- # available.
- #
- # source://thor//lib/thor/shell/html.rb#83
- def show_diff(destination, content); end
end
# Set the terminal's foreground HTML color to black.
#
-# source://thor//lib/thor/shell/html.rb#13
+# source://thor//lib/thor/shell/html.rb#16
Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String)
# Set the terminal's foreground HTML color to blue.
#
-# source://thor//lib/thor/shell/html.rb#21
+# source://thor//lib/thor/shell/html.rb#24
Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String)
# The start of an HTML bold sequence.
#
-# source://thor//lib/thor/shell/html.rb#10
+# source://thor//lib/thor/shell/html.rb#13
Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String)
# Set the terminal's foreground HTML color to cyan.
#
-# source://thor//lib/thor/shell/html.rb#25
+# source://thor//lib/thor/shell/html.rb#28
Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String)
# Set the terminal's foreground HTML color to green.
#
-# source://thor//lib/thor/shell/html.rb#17
+# source://thor//lib/thor/shell/html.rb#20
Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String)
# Set the terminal's foreground HTML color to magenta.
#
-# source://thor//lib/thor/shell/html.rb#23
+# source://thor//lib/thor/shell/html.rb#26
Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String)
# Set the terminal's background HTML color to black.
#
-# source://thor//lib/thor/shell/html.rb#30
+# source://thor//lib/thor/shell/html.rb#33
Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String)
# Set the terminal's background HTML color to blue.
#
-# source://thor//lib/thor/shell/html.rb#38
+# source://thor//lib/thor/shell/html.rb#41
Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String)
# Set the terminal's background HTML color to cyan.
#
-# source://thor//lib/thor/shell/html.rb#42
+# source://thor//lib/thor/shell/html.rb#45
Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String)
# Set the terminal's background HTML color to green.
#
-# source://thor//lib/thor/shell/html.rb#34
+# source://thor//lib/thor/shell/html.rb#37
Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String)
# Set the terminal's background HTML color to magenta.
#
-# source://thor//lib/thor/shell/html.rb#40
+# source://thor//lib/thor/shell/html.rb#43
Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String)
# Set the terminal's background HTML color to red.
#
-# source://thor//lib/thor/shell/html.rb#32
+# source://thor//lib/thor/shell/html.rb#35
Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String)
# Set the terminal's background HTML color to white.
#
-# source://thor//lib/thor/shell/html.rb#44
+# source://thor//lib/thor/shell/html.rb#47
Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String)
# Set the terminal's background HTML color to yellow.
#
-# source://thor//lib/thor/shell/html.rb#36
+# source://thor//lib/thor/shell/html.rb#39
Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String)
# Set the terminal's foreground HTML color to red.
#
-# source://thor//lib/thor/shell/html.rb#15
+# source://thor//lib/thor/shell/html.rb#18
Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String)
# Set the terminal's foreground HTML color to white.
#
-# source://thor//lib/thor/shell/html.rb#27
+# source://thor//lib/thor/shell/html.rb#30
Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String)
# Set the terminal's foreground HTML color to yellow.
#
-# source://thor//lib/thor/shell/html.rb#19
+# source://thor//lib/thor/shell/html.rb#22
Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String)
# source://thor//lib/thor/shell.rb#24
Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array)
+# source://thor//lib/thor/shell/table_printer.rb#6
+class Thor::Shell::TablePrinter < ::Thor::Shell::ColumnPrinter
+ # @return [TablePrinter] a new instance of TablePrinter
+ #
+ # source://thor//lib/thor/shell/table_printer.rb#9
+ def initialize(stdout, options = T.unsafe(nil)); end
+
+ # source://thor//lib/thor/shell/table_printer.rb#18
+ def print(array); end
+
+ private
+
+ # source://thor//lib/thor/shell/table_printer.rb#120
+ def as_unicode; end
+
+ # source://thor//lib/thor/shell/table_printer.rb#72
+ def format_cell(column, row_size, index); end
+
+ # source://thor//lib/thor/shell/table_printer.rb#115
+ def indentation; end
+
+ # source://thor//lib/thor/shell/table_printer.rb#47
+ def prepare(array); end
+
+ # source://thor//lib/thor/shell/table_printer.rb#96
+ def print_border_separator; end
+
+ # source://thor//lib/thor/shell/table_printer.rb#103
+ def truncate(string); end
+end
+
+# source://thor//lib/thor/shell/table_printer.rb#7
+Thor::Shell::TablePrinter::BORDER_SEPARATOR = T.let(T.unsafe(nil), Symbol)
+
+# source://thor//lib/thor/shell/terminal.rb#3
+module Thor::Shell::Terminal
+ class << self
+ # source://thor//lib/thor/shell/terminal.rb#9
+ def terminal_width; end
+
+ # @return [Boolean]
+ #
+ # source://thor//lib/thor/shell/terminal.rb#20
+ def unix?; end
+
+ private
+
+ # Calculate the dynamic width of the terminal
+ #
+ # source://thor//lib/thor/shell/terminal.rb#27
+ def dynamic_width; end
+
+ # source://thor//lib/thor/shell/terminal.rb#31
+ def dynamic_width_stty; end
+
+ # source://thor//lib/thor/shell/terminal.rb#35
+ def dynamic_width_tput; end
+ end
+end
+
+# source://thor//lib/thor/shell/terminal.rb#4
+Thor::Shell::Terminal::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer)
+
+# source://thor//lib/thor/shell/wrapped_printer.rb#6
+class Thor::Shell::WrappedPrinter < ::Thor::Shell::ColumnPrinter
+ # source://thor//lib/thor/shell/wrapped_printer.rb#7
+ def print(message); end
+end
+
# source://thor//lib/thor/base.rb#23
Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String)
@@ -3683,89 +4063,89 @@ Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String)
# source://thor//lib/thor/base.rb#20
Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array)
-# source://thor//lib/thor/command.rb#117
+# source://thor//lib/thor/command.rb#126
Thor::Task = Thor::Command
# Raised when a command was not found.
#
-# source://thor//lib/thor/error.rb#35
+# source://thor//lib/thor/error.rb#24
class Thor::UndefinedCommandError < ::Thor::Error
include ::Thor::Correctable
# @return [UndefinedCommandError] a new instance of UndefinedCommandError
#
- # source://thor//lib/thor/error.rb#54
+ # source://thor//lib/thor/error.rb#43
def initialize(command, all_commands, namespace); end
# Returns the value of attribute all_commands.
#
- # source://thor//lib/thor/error.rb#52
+ # source://thor//lib/thor/error.rb#41
def all_commands; end
# Returns the value of attribute command.
#
- # source://thor//lib/thor/error.rb#52
+ # source://thor//lib/thor/error.rb#41
def command; end
end
-# source://thor//lib/thor/error.rb#36
+# source://thor//lib/thor/error.rb#25
class Thor::UndefinedCommandError::SpellChecker
# @return [SpellChecker] a new instance of SpellChecker
#
- # source://thor//lib/thor/error.rb#39
+ # source://thor//lib/thor/error.rb#28
def initialize(error); end
- # source://thor//lib/thor/error.rb#43
+ # source://thor//lib/thor/error.rb#32
def corrections; end
# Returns the value of attribute error.
#
- # source://thor//lib/thor/error.rb#37
+ # source://thor//lib/thor/error.rb#26
def error; end
- # source://thor//lib/thor/error.rb#47
+ # source://thor//lib/thor/error.rb#36
def spell_checker; end
end
-# source://thor//lib/thor/error.rb#66
+# source://thor//lib/thor/error.rb#55
Thor::UndefinedTaskError = Thor::UndefinedCommandError
-# source://thor//lib/thor/error.rb#76
+# source://thor//lib/thor/error.rb#65
class Thor::UnknownArgumentError < ::Thor::Error
include ::Thor::Correctable
# @return [UnknownArgumentError] a new instance of UnknownArgumentError
#
- # source://thor//lib/thor/error.rb#96
+ # source://thor//lib/thor/error.rb#85
def initialize(switches, unknown); end
# Returns the value of attribute switches.
#
- # source://thor//lib/thor/error.rb#94
+ # source://thor//lib/thor/error.rb#83
def switches; end
# Returns the value of attribute unknown.
#
- # source://thor//lib/thor/error.rb#94
+ # source://thor//lib/thor/error.rb#83
def unknown; end
end
-# source://thor//lib/thor/error.rb#77
+# source://thor//lib/thor/error.rb#66
class Thor::UnknownArgumentError::SpellChecker
# @return [SpellChecker] a new instance of SpellChecker
#
- # source://thor//lib/thor/error.rb#80
+ # source://thor//lib/thor/error.rb#69
def initialize(error); end
- # source://thor//lib/thor/error.rb#84
+ # source://thor//lib/thor/error.rb#73
def corrections; end
# Returns the value of attribute error.
#
- # source://thor//lib/thor/error.rb#78
+ # source://thor//lib/thor/error.rb#67
def error; end
- # source://thor//lib/thor/error.rb#89
+ # source://thor//lib/thor/error.rb#78
def spell_checker; end
end
@@ -3806,7 +4186,7 @@ module Thor::Util
# ==== Returns
# String
#
- # source://thor//lib/thor/util.rb#263
+ # source://thor//lib/thor/util.rb#264
def escape_globs(path); end
# Returns a string that has had any HTML characters escaped.
@@ -3821,7 +4201,7 @@ module Thor::Util
# ==== Returns
# String
#
- # source://thor//lib/thor/util.rb#279
+ # source://thor//lib/thor/util.rb#280
def escape_html(string); end
# Receives a namespace and search for it in the Thor::Base subclasses.
@@ -3884,13 +4264,13 @@ module Thor::Util
# Where to look for Thor files.
#
- # source://thor//lib/thor/util.rb#212
+ # source://thor//lib/thor/util.rb#213
def globs_for(path); end
# Receives a path and load the thor file in the path. The file is evaluated
# inside the sandbox to avoid namespacing conflicts.
#
- # source://thor//lib/thor/util.rb#152
+ # source://thor//lib/thor/util.rb#153
def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end
# Receives a constant and converts it to a Thor namespace. Since Thor
@@ -3925,7 +4305,7 @@ module Thor::Util
# Return the path to the ruby interpreter taking into account multiple
# installations and windows extensions.
#
- # source://thor//lib/thor/util.rb#220
+ # source://thor//lib/thor/util.rb#221
def ruby_command; end
# Receives a string and convert it to snake case. SnakeCase returns snake_case.
@@ -3946,7 +4326,7 @@ module Thor::Util
# Returns the root where thor files are located, depending on the OS.
#
- # source://thor//lib/thor/util.rb#191
+ # source://thor//lib/thor/util.rb#192
def thor_root; end
# Returns the files in the thor root. On Windows thor_root will be something
@@ -3956,10 +4336,10 @@ module Thor::Util
#
# If we don't #gsub the \ character, Dir.glob will fail.
#
- # source://thor//lib/thor/util.rb#202
+ # source://thor//lib/thor/util.rb#203
def thor_root_glob; end
- # source://thor//lib/thor/util.rb#167
+ # source://thor//lib/thor/util.rb#168
def user_home; end
end
end
diff --git a/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi b/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi
similarity index 100%
rename from sorbet/rbi/gems/unicode-display_width@2.4.2.rbi
rename to sorbet/rbi/gems/unicode-display_width@2.5.0.rbi
diff --git a/sorbet/rbi/gems/unparser@0.6.8.rbi b/sorbet/rbi/gems/unparser@0.6.8.rbi
deleted file mode 100644
index 937e2731..00000000
--- a/sorbet/rbi/gems/unparser@0.6.8.rbi
+++ /dev/null
@@ -1,4525 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `unparser` gem.
-# Please instead update this file by running `bin/tapioca gem unparser`.
-
-# Library namespace
-#
-# source://unparser//lib/unparser/equalizer.rb#3
-module Unparser
- class << self
- # Construct a parser buffer from string
- #
- # @param source [String]
- # @return [Parser::Source::Buffer]
- #
- # source://unparser//lib/unparser.rb#147
- def buffer(source, identification = T.unsafe(nil)); end
-
- # Parse string into AST
- #
- # @param source [String]
- # @return [Parser::AST::Node, nil]
- #
- # source://unparser//lib/unparser.rb#105
- def parse(source); end
-
- # Parse string into either syntax error or AST
- #
- # @param source [String]
- # @return [Either]
- #
- # source://unparser//lib/unparser.rb#114
- def parse_either(source); end
-
- # Parse string into AST, with comments
- #
- # @param source [String]
- # @return [Parser::AST::Node]
- #
- # source://unparser//lib/unparser.rb#125
- def parse_with_comments(source); end
-
- # Parser instance that produces AST unparser understands
- #
- # @api private
- # @return [Parser::Base]
- #
- # source://unparser//lib/unparser.rb#134
- def parser; end
-
- # Unparse an AST (and, optionally, comments) into a string
- #
- # @api public
- # @param node [Parser::AST::Node, nil]
- # @param comment_array [Array]
- # @raise InvalidNodeError
- # if the node passed is invalid
- # @return [String]
- #
- # source://unparser//lib/unparser.rb#60
- def unparse(node, comment_array = T.unsafe(nil)); end
-
- # Unparse capturing errors
- #
- # This is mostly useful for writing testing tools against unparser.
- #
- # @param node [Parser::AST::Node, nil]
- # @return [Either]
- #
- # source://unparser//lib/unparser.rb#96
- def unparse_either(node); end
-
- # Unparse with validation
- #
- # @param node [Parser::AST::Node, nil]
- # @param comment_array [Array]
- # @return [Either]
- #
- # source://unparser//lib/unparser.rb#78
- def unparse_validate(node, comment_array = T.unsafe(nil)); end
- end
-end
-
-# Namespace for AST processing tools
-#
-# source://unparser//lib/unparser/ast.rb#5
-module Unparser::AST
- class << self
- # Return local variables that get assigned in scope
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @return [Set]
- #
- # source://unparser//lib/unparser/ast.rb#57
- def local_variable_assignments(node); end
-
- # Return local variables read
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @return [Set]
- #
- # source://unparser//lib/unparser/ast.rb#72
- def local_variable_reads(node); end
-
- # Test for local variable inherited scope reset
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @return [Boolean]
- #
- # source://unparser//lib/unparser/ast.rb#33
- def not_close_scope?(node); end
-
- # Test for local variable scope reset
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @return [Boolean]
- #
- # source://unparser//lib/unparser/ast.rb#45
- def not_reset_scope?(node); end
- end
-end
-
-# Nodes that assign a local variable
-#
-# source://unparser//lib/unparser/ast.rb#14
-Unparser::AST::ASSIGN_NODES = T.let(T.unsafe(nil), Set)
-
-# source://unparser//lib/unparser/ast.rb#11
-Unparser::AST::CLOSE_NODES = T.let(T.unsafe(nil), Array)
-
-# AST enumerator
-#
-# source://unparser//lib/unparser/ast.rb#80
-class Unparser::AST::Enumerator
- include ::Enumerable
- include ::Unparser::Equalizer::Methods
- include ::Unparser::Adamantium
- include ::Unparser::Adamantium::InstanceMethods
- extend ::Unparser::Adamantium::ModuleMethods
- extend ::Unparser::Adamantium::ClassMethods
-
- # Return each node
- #
- # @api private
- # @return [Enumerator] if no block given
- # @return [self] otherwise
- #
- # source://unparser//lib/unparser/ast.rb#106
- def each(&block); end
-
- # Return nodes selected by type
- #
- # @api private
- # @param type [Symbol]
- # @return [Enumerable]
- #
- # source://unparser//lib/unparser/ast.rb#130
- def type(type); end
-
- # Return nodes selected by types
- #
- # @api private
- # @param types [Enumerable]
- # @return [Enumerable]
- #
- # source://unparser//lib/unparser/ast.rb#118
- def types(types); end
-
- class << self
- # Return new instance
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @param controller [#call(node)]
- # @return [Enumerator]
- #
- # source://unparser//lib/unparser/ast.rb#92
- def new(node, controller = T.unsafe(nil)); end
-
- private
-
- # Return frozne set of objects
- #
- # @api private
- # @param enumerable [Enumerable]
- # @return [Set]
- #
- # source://unparser//lib/unparser/ast.rb#142
- def set(enumerable); end
-
- # Return nodes of type
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @param type [Symbol]
- # @return [Enumerable>] ]
- # otherwise
- #
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#121
- def each(node, &block); end
-
- private
-
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#127
- def current; end
-
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#156
- def define(name); end
-
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#141
- def enter(node); end
-
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#152
- def leave(node); end
-
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#168
- def pop; end
-
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#164
- def push_inherit; end
-
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#160
- def push_reset; end
-
- # @yield [node, current.dup, before]
- #
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#131
- def visit(node, &block); end
-
- class << self
- # Enumerate each node with its local variable scope
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @return [self]
- #
- # source://unparser//lib/unparser/ast/local_variable_scope.rb#106
- def each(node, &block); end
- end
-end
-
-# source://unparser//lib/unparser/ast.rb#9
-Unparser::AST::RESET_NODES = T.let(T.unsafe(nil), Array)
-
-# source://unparser//lib/unparser/ast.rb#7
-Unparser::AST::TAUTOLOGY = T.let(T.unsafe(nil), Proc)
-
-# Controlled AST walker walking the AST in deeth first search with pre order
-#
-# source://unparser//lib/unparser/ast.rb#164
-class Unparser::AST::Walker
- include ::Unparser::Equalizer::Methods
-
- # Call walker with node
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/ast.rb#188
- def call(node); end
-
- class << self
- # Call ast walker
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @return [self]
- #
- # source://unparser//lib/unparser/ast.rb#175
- def call(node, controller = T.unsafe(nil), &block); end
- end
-end
-
-# Module to allow class and methods to be abstract
-#
-# Original code before vendoring and reduction from: https://github.com/dkubb/abstract_type.
-#
-# source://unparser//lib/unparser/abstract_type.rb#7
-module Unparser::AbstractType
- mixes_in_class_methods ::Unparser::AbstractType::AbstractMethodDeclarations
-
- class << self
- private
-
- # Define the new method on the abstract type
- #
- # Ensures that the instance cannot be of the abstract type
- # and must be a descendant.
- #
- # @api private
- # @param abstract_class [Class]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/abstract_type.rb#35
- def create_new_method(abstract_class); end
-
- # Hook called when module is included
- #
- # @api private
- # @param descendant [Module] the module or class including AbstractType
- # @return [undefined]
- #
- # source://unparser//lib/unparser/abstract_type.rb#17
- def included(descendant); end
- end
-end
-
-# source://unparser//lib/unparser/abstract_type.rb#47
-module Unparser::AbstractType::AbstractMethodDeclarations
- # Create abstract instance methods
- #
- # @api public
- # @example
- # class Foo
- # include AbstractType
- #
- # # Create an abstract instance method
- # abstract_method :some_method
- # end
- # @param names [Array<#to_s>]
- # @return [self]
- #
- # source://unparser//lib/unparser/abstract_type.rb#64
- def abstract_method(*names); end
-
- # Create abstract singleton methods
- #
- # @api private
- # @example
- # class Foo
- # include AbstractType
- #
- # # Create an abstract instance method
- # abstract_singleton_method :some_method
- # end
- # @param names [Array<#to_s>]
- # @return [self]
- #
- # source://unparser//lib/unparser/abstract_type.rb#84
- def abstract_singleton_method(*names); end
-
- private
-
- # Create abstract instance method
- #
- # @api private
- # @param name [#to_s] the name of the method to create
- # @return [undefined]
- #
- # source://unparser//lib/unparser/abstract_type.rb#113
- def create_abstract_instance_method(name); end
-
- # Create abstract singleton method
- #
- # @api private
- # @param name [#to_s] the name of the method to create
- # @return [undefined]
- #
- # source://unparser//lib/unparser/abstract_type.rb#99
- def create_abstract_singleton_method(name); end
-end
-
-# Allows objects to be made immutable
-#
-# Original code before vendoring and reduction from: https://github.com/dkubb/adamantium.
-#
-# source://unparser//lib/unparser/adamantium.rb#7
-module Unparser::Adamantium
- include ::Unparser::Adamantium::InstanceMethods
-
- mixes_in_class_methods ::Unparser::Adamantium::ModuleMethods
- mixes_in_class_methods ::Unparser::Adamantium::ClassMethods
-
- class << self
- private
-
- # ModuleMethods
- #
- # source://unparser//lib/unparser/adamantium.rb#141
- def included(descendant); end
- end
-end
-
-# Methods mixed in to adamantium classes
-#
-# source://unparser//lib/unparser/adamantium.rb#70
-module Unparser::Adamantium::ClassMethods
- # Instantiate a new frozen object
- #
- # @api public
- # @return [Object]
- #
- # source://unparser//lib/unparser/adamantium.rb#77
- def new(*_arg0); end
-end
-
-# source://unparser//lib/unparser/adamantium.rb#8
-module Unparser::Adamantium::InstanceMethods
- # A noop #dup for immutable objects
- #
- # @api public
- # @return [self]
- #
- # source://unparser//lib/unparser/adamantium.rb#14
- def dup; end
-
- # Freeze the object
- #
- # @api public
- # @return [Object]
- #
- # source://unparser//lib/unparser/adamantium.rb#23
- def freeze; end
-
- private
-
- # source://unparser//lib/unparser/adamantium.rb#30
- def memoized_method_cache; end
-end
-
-# Storage for memoized methods
-#
-# source://unparser//lib/unparser/adamantium.rb#37
-class Unparser::Adamantium::Memory
- # Initialize the memory storage for memoized methods
- #
- # @api private
- # @return [undefined]
- #
- # source://unparser//lib/unparser/adamantium.rb#44
- def initialize(values); end
-
- # Fetch the value from memory, or evaluate if it does not exist
- #
- # @api public
- # @param name [Symbol]
- # @yieldreturn [Object] the value to memoize
- #
- # source://unparser//lib/unparser/adamantium.rb#58
- def fetch(name); end
-end
-
-# Build the memoized method
-#
-# source://unparser//lib/unparser/adamantium/method_builder.rb#6
-class Unparser::Adamantium::MethodBuilder
- # Initialize an object to build a memoized method
- #
- # @api private
- # @param descendant [Module]
- # @param method_name [Symbol]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/adamantium/method_builder.rb#47
- def initialize(descendant, method_name); end
-
- # Build a new memoized method
- #
- # @api public
- # @example
- # method_builder.call # => creates new method
- # @return [UnboundMethod]
- #
- # source://unparser//lib/unparser/adamantium/method_builder.rb#63
- def call; end
-
- private
-
- # source://unparser//lib/unparser/adamantium/method_builder.rb#72
- def assert_arity(arity); end
-
- # source://unparser//lib/unparser/adamantium/method_builder.rb#83
- def create_memoized_method; end
-
- # source://unparser//lib/unparser/adamantium/method_builder.rb#78
- def remove_original_method; end
-
- # source://unparser//lib/unparser/adamantium/method_builder.rb#97
- def set_method_visibility; end
-
- # source://unparser//lib/unparser/adamantium/method_builder.rb#101
- def visibility; end
-end
-
-# Raised when a block is passed to a memoized method
-#
-# source://unparser//lib/unparser/adamantium/method_builder.rb#25
-class Unparser::Adamantium::MethodBuilder::BlockNotAllowedError < ::ArgumentError
- # Initialize a block not allowed exception
- #
- # @api private
- # @param descendant [Module]
- # @param method [Symbol]
- # @return [BlockNotAllowedError] a new instance of BlockNotAllowedError
- #
- # source://unparser//lib/unparser/adamantium/method_builder.rb#33
- def initialize(descendant, method); end
-end
-
-# Raised when the method arity is invalid
-#
-# source://unparser//lib/unparser/adamantium/method_builder.rb#9
-class Unparser::Adamantium::MethodBuilder::InvalidArityError < ::ArgumentError
- # Initialize an invalid arity exception
- #
- # @api private
- # @param descendant [Module]
- # @param method [Symbol]
- # @param arity [Integer]
- # @return [InvalidArityError] a new instance of InvalidArityError
- #
- # source://unparser//lib/unparser/adamantium/method_builder.rb#18
- def initialize(descendant, method, arity); end
-end
-
-# Methods mixed in to adamantium modules
-#
-# source://unparser//lib/unparser/adamantium.rb#84
-module Unparser::Adamantium::ModuleMethods
- # Memoize a list of methods
- #
- # @api public
- # @param methods [Array<#to_s>] a list of methods to memoize
- # @return [self]
- #
- # source://unparser//lib/unparser/adamantium.rb#94
- def memoize(*methods); end
-
- # Test if method is memoized
- #
- # @param name [Symbol]
- # @return [Bool]
- #
- # source://unparser//lib/unparser/adamantium.rb#104
- def memoized?(method_name); end
-
- # Return unmemoized instance method
- #
- # @api public
- # @param name [Symbol]
- # @raise [NameError] raised if the method is unknown
- # @return [UnboundMethod] the memoized method
- #
- # source://unparser//lib/unparser/adamantium.rb#119
- def unmemoized_instance_method(method_name); end
-
- private
-
- # source://unparser//lib/unparser/adamantium.rb#127
- def memoize_method(method_name); end
-
- # source://unparser//lib/unparser/adamantium.rb#135
- def memoized_methods; end
-end
-
-# Original code before vendoring and reduction from: https://github.com/mbj/anima.
-#
-# source://unparser//lib/unparser/anima.rb#5
-class Unparser::Anima < ::Module
- include ::Unparser::Equalizer::Methods
- include ::Unparser::Adamantium
- include ::Unparser::Adamantium::InstanceMethods
- extend ::Unparser::Adamantium::ModuleMethods
- extend ::Unparser::Adamantium::ClassMethods
-
- # Initialize object
- #
- #
- # @return [undefined]
- #
- # source://unparser//lib/unparser/anima.rb#18
- def initialize(*names); end
-
- # Return new anima with attributes added
- #
- # @example
- # anima = Anima.new(:foo)
- # anima.add(:bar) # equals Anima.new(:foo, :bar)
- # @return [Anima]
- #
- # source://unparser//lib/unparser/anima.rb#31
- def add(*names); end
-
- # Return attribute names
- #
- # @return [Enumerable]
- #
- # source://unparser//lib/unparser/adamantium/method_builder.rb#87
- def attribute_names(&block); end
-
- # Return names
- #
- # @return [AttributeSet]
- #
- # source://unparser//lib/unparser/anima.rb#11
- def attributes; end
-
- # Return attributes hash for instance
- #
- # @param object [Object]
- # @return [Hash]
- #
- # source://unparser//lib/unparser/anima.rb#52
- def attributes_hash(object); end
-
- # Initialize instance
- #
- # @param object [Object]
- # @param attribute_hash [Hash]
- # @return [self]
- #
- # source://unparser//lib/unparser/anima.rb#73
- def initialize_instance(object, attribute_hash); end
-
- # Return new anima with attributes removed
- #
- # @example
- # anima = Anima.new(:foo, :bar)
- # anima.remove(:bar) # equals Anima.new(:foo)
- # @return [Anima]
- #
- # source://unparser//lib/unparser/anima.rb#43
- def remove(*names); end
-
- private
-
- # Fail unless keys in +attribute_hash+ matches #attribute_names
- #
- # @param klass [Class] the class being initialized
- # @param attribute_hash [Hash] the attributes to initialize +object+ with
- # @raise [Error]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/anima.rb#164
- def assert_known_attributes(klass, attribute_hash); end
-
- # Infect the instance with anima
- #
- # @param scope [Class, Module]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/anima.rb#137
- def included(descendant); end
-
- # Return new instance
- #
- # @param attributes [Enumerable]
- # @return [Anima]
- #
- # source://unparser//lib/unparser/anima.rb#180
- def new(attributes); end
-end
-
-# An attribute
-#
-# source://unparser//lib/unparser/anima/attribute.rb#6
-class Unparser::Anima::Attribute
- include ::Unparser::Equalizer::Methods
- include ::Unparser::Adamantium
- include ::Unparser::Adamantium::InstanceMethods
- extend ::Unparser::Adamantium::ModuleMethods
- extend ::Unparser::Adamantium::ClassMethods
-
- # Initialize attribute
- #
- # @param name [Symbol]
- # @return [Attribute] a new instance of Attribute
- #
- # source://unparser//lib/unparser/anima/attribute.rb#12
- def initialize(name); end
-
- # Get attribute value from object
- #
- # @param object [Object]
- # @return [Object]
- #
- # source://unparser//lib/unparser/anima/attribute.rb#42
- def get(object); end
-
- # Return instance variable name
- #
- # @return [Symbol]
- #
- # source://unparser//lib/unparser/anima/attribute.rb#25
- def instance_variable_name; end
-
- # Load attribute
- #
- # @param object [Object]
- # @param attributes [Hash]
- # @return [self]
- #
- # source://unparser//lib/unparser/anima/attribute.rb#33
- def load(object, attributes); end
-
- # Return attribute name
- #
- # @return [Symbol]
- #
- # source://unparser//lib/unparser/anima/attribute.rb#20
- def name; end
-
- # Set attribute value in object
- #
- # @param object [Object]
- # @param value [Object]
- # @return [self]
- #
- # source://unparser//lib/unparser/anima/attribute.rb#52
- def set(object, value); end
-end
-
-# Abstract base class for anima errors
-#
-# source://unparser//lib/unparser/anima/error.rb#6
-class Unparser::Anima::Error < ::RuntimeError
- # Initialize object
- #
- # @param klass [Class] the class being initialized
- # @param missing [Enumerable]
- # @param unknown [Enumerable]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/anima/error.rb#18
- def initialize(klass, missing, unknown); end
-end
-
-# source://unparser//lib/unparser/anima/error.rb#7
-Unparser::Anima::Error::FORMAT = T.let(T.unsafe(nil), String)
-
-# Static instance methods for anima infected classes
-#
-# source://unparser//lib/unparser/anima.rb#82
-module Unparser::Anima::InstanceMethods
- # Initialize an anima infected object
- #
- #
- # @param attributes [#to_h] a hash that matches anima defined attributes
- # @return [undefined]
- #
- # source://unparser//lib/unparser/anima.rb#91
- def initialize(attributes); end
-
- # Return a hash representation of an anima infected object
- #
- # @api public
- # @example
- # anima.to_h # => { :foo => : bar }
- # @return [Hash]
- #
- # source://unparser//lib/unparser/anima.rb#104
- def to_h; end
-
- # Return updated instance
- #
- # @api public
- # @example
- # klass = Class.new do
- # include Anima.new(:foo, :bar)
- # end
- #
- # foo = klass.new(:foo => 1, :bar => 2)
- # updated = foo.with(:foo => 3)
- # updated.foo # => 3
- # updated.bar # => 2
- # @param attributes [Hash]
- # @return [Anima]
- #
- # source://unparser//lib/unparser/anima.rb#125
- def with(attributes); end
-end
-
-# Buffer used to emit into
-#
-# source://unparser//lib/unparser/buffer.rb#6
-class Unparser::Buffer
- # Initialize object
- #
- # @api private
- # @return [undefined]
- #
- # source://unparser//lib/unparser/buffer.rb#16
- def initialize; end
-
- # Append string
- #
- # @api private
- # @param string [String]
- # @return [self]
- #
- # source://unparser//lib/unparser/buffer.rb#29
- def append(string); end
-
- # Append a string without an indentation prefix
- #
- # @api private
- # @param string [String]
- # @return [self]
- #
- # source://unparser//lib/unparser/buffer.rb#45
- def append_without_prefix(string); end
-
- # Return content of buffer
- #
- # @api private
- # @return [String]
- #
- # source://unparser//lib/unparser/buffer.rb#104
- def content; end
-
- # Test for a fresh line
- #
- # @api private
- # @return [Boolean]
- #
- # source://unparser//lib/unparser/buffer.rb#94
- def fresh_line?; end
-
- # Increase indent
- #
- # @api private
- # @return [self]
- #
- # source://unparser//lib/unparser/buffer.rb#55
- def indent; end
-
- # Write newline
- #
- # @api private
- # @return [self]
- #
- # source://unparser//lib/unparser/buffer.rb#77
- def nl; end
-
- # source://unparser//lib/unparser/buffer.rb#81
- def root_indent; end
-
- # Decrease indent
- #
- # @api private
- # @return [self]
- #
- # source://unparser//lib/unparser/buffer.rb#66
- def unindent; end
-
- # Write raw fragment to buffer
- #
- # Does not do indentation logic.
- #
- # @param fragment [String]
- # @return [self]
- #
- # source://unparser//lib/unparser/buffer.rb#115
- def write(fragment); end
-
- private
-
- # source://unparser//lib/unparser/buffer.rb#124
- def prefix; end
-end
-
-# source://unparser//lib/unparser/buffer.rb#122
-Unparser::Buffer::INDENT_SPACE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/buffer.rb#8
-Unparser::Buffer::NL = T.let(T.unsafe(nil), String)
-
-# Unparser specific AST builder defaulting to modern AST format
-#
-# source://unparser//lib/unparser.rb#23
-class Unparser::Builder < ::Parser::Builders::Default
- # @return [Builder] a new instance of Builder
- #
- # source://unparser//lib/unparser.rb#26
- def initialize; end
-end
-
-# Unparser CLI implementation
-#
-# source://unparser//lib/unparser/cli.rb#5
-class Unparser::CLI
- # Initialize object
- #
- # @api private
- # @param arguments [Array]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/cli.rb#74
- def initialize(arguments); end
-
- # Add options
- #
- #
- # @api private
- # @param builder [OptionParser]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/cli.rb#102
- def add_options(builder); end
-
- # Return exit status
- #
- # @api private
- # @return [Integer]
- #
- # source://unparser//lib/unparser/cli.rb#132
- def exit_status; end
-
- private
-
- # source://unparser//lib/unparser/cli.rb#155
- def effective_targets; end
-
- # source://unparser//lib/unparser/cli.rb#143
- def process_target(target); end
-
- # source://unparser//lib/unparser/cli.rb#170
- def targets(file_name); end
-
- class << self
- # Run CLI
- #
- # @api private
- # @param arguments [Array]
- # @return [Integer] the exit status
- #
- # source://unparser//lib/unparser/cli.rb#63
- def run(*arguments); end
- end
-end
-
-# source://unparser//lib/unparser/cli.rb#8
-Unparser::CLI::EXIT_FAILURE = T.let(T.unsafe(nil), Integer)
-
-# source://unparser//lib/unparser/cli.rb#7
-Unparser::CLI::EXIT_SUCCESS = T.let(T.unsafe(nil), Integer)
-
-# source://unparser//lib/unparser/cli.rb#10
-class Unparser::CLI::Target
- include ::Unparser::AbstractType
- extend ::Unparser::AbstractType::AbstractMethodDeclarations
-
- class << self
- # source://unparser//lib/unparser/abstract_type.rb#36
- def new(*args, &block); end
- end
-end
-
-# Path target
-#
-# source://unparser//lib/unparser/cli.rb#14
-class Unparser::CLI::Target::Path < ::Unparser::CLI::Target
- include ::Unparser::Equalizer::Methods
-
- # Literal for this target
- #
- # @return [Validation]
- #
- # source://unparser//lib/unparser/cli.rb#27
- def literal_validation; end
-
- # Validation for this target
- #
- # @return [Validation]
- #
- # source://unparser//lib/unparser/cli.rb#20
- def validation; end
-end
-
-# String target
-#
-# source://unparser//lib/unparser/cli.rb#33
-class Unparser::CLI::Target::String
- include ::Unparser::Equalizer::Methods
-
- # Literal for this target
- #
- # @return [Validation]
- #
- # source://unparser//lib/unparser/cli.rb#46
- def literal_validation; end
-
- # Validation for this target
- #
- # @return [Validation]
- #
- # source://unparser//lib/unparser/cli.rb#39
- def validation; end
-end
-
-# Class to colorize strings
-#
-# source://unparser//lib/unparser/color.rb#5
-class Unparser::Color
- include ::Unparser::Equalizer::Methods
- include ::Unparser::Adamantium
- include ::Unparser::Adamantium::InstanceMethods
- extend ::Unparser::Adamantium::ModuleMethods
- extend ::Unparser::Adamantium::ClassMethods
-
- # Format text with color
- #
- # @param text [String]
- # @return [String]
- #
- # source://unparser//lib/unparser/color.rb#13
- def format(text); end
-end
-
-# source://unparser//lib/unparser/color.rb#41
-Unparser::Color::GREEN = T.let(T.unsafe(nil), Unparser::Color)
-
-# source://unparser//lib/unparser/color.rb#17
-Unparser::Color::NONE = T.let(T.unsafe(nil), T.untyped)
-
-# source://unparser//lib/unparser/color.rb#40
-Unparser::Color::RED = T.let(T.unsafe(nil), Unparser::Color)
-
-# Holds the comments that remain to be emitted
-#
-# source://unparser//lib/unparser/comments.rb#6
-class Unparser::Comments
- # Initialize object
- #
- # @api private
- # @param comments [Array]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/comments.rb#30
- def initialize(comments); end
-
- # Consume part or all of the node
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @param source_part [Symbol]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/comments.rb#44
- def consume(node, source_part = T.unsafe(nil)); end
-
- # Proxy to singleton
- #
- # NOTICE:
- # Delegating to stateless helpers is a pattern I saw many times in our code.
- # Maybe we should make another helper module? include SingletonDelegator.new(:source_range) ?
- #
- # @api private
- # @return [undefined]
- #
- # source://unparser//lib/unparser/comments.rb#18
- def source_range(*arguments); end
-
- # Take all remaining comments
- #
- # @api private
- # @return [Array]
- #
- # source://unparser//lib/unparser/comments.rb#68
- def take_all; end
-
- # Take comments appear in the source before the specified part of the node
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @param source_part [Symbol]
- # @return [Array]
- #
- # source://unparser//lib/unparser/comments.rb#81
- def take_before(node, source_part); end
-
- # Take end-of-line comments
- #
- # @api private
- # @return [Array]
- #
- # source://unparser//lib/unparser/comments.rb#55
- def take_eol_comments; end
-
- private
-
- # source://unparser//lib/unparser/comments.rb#119
- def take_up_to_line(line); end
-
- # source://unparser//lib/unparser/comments.rb#114
- def take_while; end
-
- # source://unparser//lib/unparser/comments.rb#123
- def unshift_documents(comments); end
-
- class << self
- # Return source location part
- #
- # FIXME: This method should not be needed. It does to much inline signalling.
- #
- # :reek:ManualDispatch
- #
- # @api private
- # @param node [Parser::AST::Node]
- # @param part [Symbol]
- # @return [Parser::Source::Range] if present
- # @return [nil] otherwise
- #
- # source://unparser//lib/unparser/comments.rb#107
- def source_range(node, part); end
- end
-end
-
-# A mixin to define a composition
-#
-# Original code before vendoring and reduction from: https://github.com/mbj/concord.
-#
-# source://unparser//lib/unparser/concord.rb#7
-class Unparser::Concord < ::Module
- include ::Unparser::Equalizer::Methods
- include ::Unparser::Adamantium
- include ::Unparser::Adamantium::InstanceMethods
- extend ::Unparser::Adamantium::ModuleMethods
- extend ::Unparser::Adamantium::ClassMethods
-
- # Initialize object
- #
- #
- # @api private
- # @return [undefined]
- #
- # source://unparser//lib/unparser/concord.rb#30
- def initialize(*names); end
-
- # Return names
- #
- # @api private
- # @return [Enumerable]
- #
- # source://unparser//lib/unparser/concord.rb#19
- def names; end
-
- private
-
- # Define equalizer
- #
- # @api private
- # @return [undefined]
- #
- # source://unparser//lib/unparser/concord.rb#48
- def define_equalizer; end
-
- # Define initialize method
- #
- # @api private
- # @return [undefined]
- #
- # source://unparser//lib/unparser/concord.rb#72
- def define_initialize; end
-
- # Define readers
- #
- # @api private
- # @return [undefined]
- #
- # source://unparser//lib/unparser/concord.rb#58
- def define_readers; end
-
- # Return instance variable names
- #
- # @api private
- # @return [String]
- #
- # source://unparser//lib/unparser/concord.rb#92
- def instance_variable_names; end
-end
-
-# The maximum number of objects the hosting class is composed of
-#
-# source://unparser//lib/unparser/concord.rb#11
-Unparser::Concord::MAX_NR_OF_OBJECTS = T.let(T.unsafe(nil), Integer)
-
-# Mixin for public attribute readers
-#
-# source://unparser//lib/unparser/concord.rb#97
-class Unparser::Concord::Public < ::Unparser::Concord
- # Hook called when module is included
- #
- # @api private
- # @param descendant [Class, Module]
- # @return [undefined]
- #
- # source://unparser//lib/unparser/concord.rb#107
- def included(descendant); end
-end
-
-# All unparser constants maybe included in other libraries.
-#
-# source://unparser//lib/unparser/constants.rb#5
-module Unparser::Constants; end
-
-# All binary operators of the ruby language
-#
-# source://unparser//lib/unparser/constants.rb#13
-Unparser::Constants::BINARY_OPERATORS = T.let(T.unsafe(nil), Set)
-
-# source://unparser//lib/unparser/constants.rb#63
-Unparser::Constants::KEYWORDS = T.let(T.unsafe(nil), Set)
-
-# source://unparser//lib/unparser/constants.rb#45
-Unparser::Constants::K_ALIAS = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#44
-Unparser::Constants::K_AND = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#23
-Unparser::Constants::K_BEGIN = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#37
-Unparser::Constants::K_BREAK = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#24
-Unparser::Constants::K_CASE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#25
-Unparser::Constants::K_CLASS = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#21
-Unparser::Constants::K_DEF = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#28
-Unparser::Constants::K_DEFINE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#33
-Unparser::Constants::K_DEFINED = T.let(T.unsafe(nil), String)
-
-# Keywords
-#
-# source://unparser//lib/unparser/constants.rb#20
-Unparser::Constants::K_DO = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#59
-Unparser::Constants::K_EEND = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#46
-Unparser::Constants::K_ELSE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#47
-Unparser::Constants::K_ELSIF = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#58
-Unparser::Constants::K_ENCODING = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#22
-Unparser::Constants::K_END = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#27
-Unparser::Constants::K_ENSURE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#41
-Unparser::Constants::K_FALSE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#60
-Unparser::Constants::K_FILE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#48
-Unparser::Constants::K_FOR = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#43
-Unparser::Constants::K_IF = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#51
-Unparser::Constants::K_IN = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#29
-Unparser::Constants::K_MODULE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#40
-Unparser::Constants::K_NEXT = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#49
-Unparser::Constants::K_NIL = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#50
-Unparser::Constants::K_NOT = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#52
-Unparser::Constants::K_OR = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#35
-Unparser::Constants::K_POSTEXE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#34
-Unparser::Constants::K_PREEXE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#39
-Unparser::Constants::K_REDO = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#30
-Unparser::Constants::K_RESCUE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#38
-Unparser::Constants::K_RETRY = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#31
-Unparser::Constants::K_RETURN = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#26
-Unparser::Constants::K_SELF = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#36
-Unparser::Constants::K_SUPER = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#61
-Unparser::Constants::K_THEN = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#42
-Unparser::Constants::K_TRUE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#32
-Unparser::Constants::K_UNDEF = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#53
-Unparser::Constants::K_UNLESS = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#56
-Unparser::Constants::K_UNTIL = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#54
-Unparser::Constants::K_WHEN = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#55
-Unparser::Constants::K_WHILE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/constants.rb#57
-Unparser::Constants::K_YIELD = T.let(T.unsafe(nil), String)
-
-# All unary operators of the ruby language
-#
-# source://unparser//lib/unparser/constants.rb#8
-Unparser::Constants::UNARY_OPERATORS = T.let(T.unsafe(nil), Set)
-
-# DSL to help defining emitters
-#
-# source://unparser//lib/unparser/dsl.rb#5
-module Unparser::DSL
- private
-
- # source://unparser//lib/unparser/dsl.rb#32
- def children(*names); end
-
- # source://unparser//lib/unparser/dsl.rb#17
- def define_child(name, index); end
-
- # source://unparser//lib/unparser/dsl.rb#24
- def define_group(name, range); end
-
- # source://unparser//lib/unparser/dsl.rb#9
- def define_remaining_children(names); end
-end
-
-# Class to create diffs from source code
-#
-# source://unparser//lib/unparser/diff.rb#5
-class Unparser::Diff
- include ::Unparser::Equalizer::Methods
- include ::Unparser::Adamantium
- include ::Unparser::Adamantium::InstanceMethods
- extend ::Unparser::Adamantium::ModuleMethods
- extend ::Unparser::Adamantium::ClassMethods
-
- # Colorized unified source diff between old and new
- #
- # @return [String] if there is a diff
- # @return [nil] otherwise
- #
- # source://unparser//lib/unparser/adamantium/method_builder.rb#87
- def colorized_diff(&block); end
-
- # Unified source diff between old and new
- #
- # @return [String] if there is exactly one diff
- # @return [nil] otherwise
- #
- # source://unparser//lib/unparser/adamantium/method_builder.rb#87
- def diff(&block); end
-
- private
-
- # source://unparser//lib/unparser/diff.rb#62
- def diffs; end
-
- # source://unparser//lib/unparser/diff.rb#66
- def hunks; end
-
- # source://unparser//lib/unparser/diff.rb#81
- def max_length; end
-
- # source://unparser//lib/unparser/diff.rb#72
- def minimized_hunk; end
-
- class << self
- # Build new object from source strings
- #
- # @param old [String]
- # @param new [String]
- # @return [Diff]
- #
- # source://unparser//lib/unparser/diff.rb#46
- def build(old, new); end
-
- private
-
- # source://unparser//lib/unparser/diff.rb#85
- def colorize_line(line); end
-
- # Break up source into lines
- #
- # @param source [String]
- # @return [Array]
- #
- # source://unparser//lib/unparser/diff.rb#55
- def lines(source); end
- end
-end
-
-# source://unparser//lib/unparser/diff.rb#8
-Unparser::Diff::ADDITION = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/diff.rb#9
-Unparser::Diff::DELETION = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser/diff.rb#10
-Unparser::Diff::NEWLINE = T.let(T.unsafe(nil), String)
-
-# source://unparser//lib/unparser.rb#34
-Unparser::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
-
-# source://unparser//lib/unparser.rb#33
-Unparser::EMPTY_STRING = T.let(T.unsafe(nil), String)
-
-# RequireBLock
-#
-# source://unparser//lib/unparser/either.rb#21
-class Unparser::Either
- include ::Unparser::RequireBlock
- include ::Unparser::Equalizer::Methods
- include ::Unparser::Adamantium
- include ::Unparser::Adamantium::InstanceMethods
- extend ::Unparser::Adamantium::ModuleMethods
- extend ::Unparser::Adamantium::ClassMethods
-
- # Test for left constructor
- #
- # @return [Boolean]
- #
- # source://unparser//lib/unparser/either.rb#42
- def left?; end
-
- # Test for right constructor
- #
- # @return [Boolean]
- #
- # source://unparser//lib/unparser/either.rb#49
- def right?; end
-
- class << self
- # Execute block and wrap error in left
- #
- # @param exception [Class]
- # @return [Either]
- #
- # source://unparser//lib/unparser/either.rb#33
- def wrap_error(*exceptions); end
- end
-end
-
-# source://unparser//lib/unparser/either.rb#53
-class Unparser::Either::Left < ::Unparser::Either
- # Evaluate applicative block
- #
- # @return [Either::Left