From 28955f31e3c19e6214ab884b874a0b5115b1b325 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 13 Oct 2023 19:25:19 +0100 Subject: [PATCH] Migrate to Prism (#1090) * Migrate to Prism * Update ShowSyntaxTreeTest * Remove obsolete submodule * Remove obsolete overrides --- .github/dependabot.yml | 2 +- .gitmodules | 6 +- ADDONS.md | 2 +- Gemfile.lock | 5 +- Rakefile | 2 +- bin/test | 2 +- lib/ruby_indexer/lib/ruby_indexer/index.rb | 8 +- lib/ruby_indexer/lib/ruby_indexer/visitor.rb | 90 +- lib/ruby_lsp/document.rb | 28 +- lib/ruby_lsp/event_emitter.rb | 27 +- lib/ruby_lsp/executor.rb | 20 +- lib/ruby_lsp/internal.rb | 2 +- lib/ruby_lsp/requests/base_request.rb | 10 +- lib/ruby_lsp/requests/code_action_resolve.rb | 6 +- lib/ruby_lsp/requests/code_lens.rb | 20 +- lib/ruby_lsp/requests/completion.rb | 10 +- lib/ruby_lsp/requests/definition.rb | 8 +- lib/ruby_lsp/requests/diagnostics.rb | 2 +- lib/ruby_lsp/requests/document_highlight.rb | 270 +- lib/ruby_lsp/requests/document_link.rb | 16 +- lib/ruby_lsp/requests/document_symbol.rb | 30 +- lib/ruby_lsp/requests/folding_ranges.rb | 60 +- lib/ruby_lsp/requests/hover.rb | 18 +- lib/ruby_lsp/requests/inlay_hints.rb | 2 +- lib/ruby_lsp/requests/selection_ranges.rb | 1 - .../requests/semantic_highlighting.rb | 64 +- lib/ruby_lsp/requests/support/annotation.rb | 6 +- lib/ruby_lsp/requests/support/common.rb | 8 +- lib/ruby_lsp/requests/support/sorbet.rb | 2 +- ruby-lsp.gemspec | 2 +- sorbet/rbi/gems/minitest-reporters@1.6.1.rbi | 52 +- sorbet/rbi/gems/parser@3.2.2.3.rbi | 1804 +- sorbet/rbi/gems/prism@0.13.0.rbi | 8 + sorbet/rbi/gems/psych@5.1.0.rbi | 129 - sorbet/rbi/gems/rbi@0.1.1.rbi | 58 +- sorbet/rbi/gems/rubocop-ast@1.29.0.rbi | 16 +- sorbet/rbi/gems/rubocop@1.56.4.rbi | 354 +- sorbet/rbi/gems/spoom@1.2.4.rbi | 30 +- sorbet/rbi/gems/yard-sorbet@0.8.1.rbi | 2 +- sorbet/rbi/gems/yard@0.9.34.rbi | 113 - sorbet/rbi/gems/yarp@0.12.0.rbi | 17544 ------------- sorbet/rbi/gems/yarp@0.13.0.rbi | 21646 ++++++++++++++++ sorbet/rbi/shims/{yarp.rbi => prism.rbi} | 2 +- sorbet/tapioca/require.rb | 3 +- test/document_test.rb | 34 +- test/expectations/expectations_test_runner.rb | 8 +- test/fixtures/prism | 1 + test/fixtures/yarp | 1 - test/requests/show_syntax_tree_test.rb | 46 +- .../support/dependency_detector_test.rb | 2 +- .../support/semantic_token_encoder_test.rb | 2 +- test/requests/support/sorbet_test.rb | 8 +- 52 files changed, 22328 insertions(+), 20264 deletions(-) create mode 100644 sorbet/rbi/gems/prism@0.13.0.rbi delete mode 100644 sorbet/rbi/gems/yarp@0.12.0.rbi create mode 100644 sorbet/rbi/gems/yarp@0.13.0.rbi rename sorbet/rbi/shims/{yarp.rbi => prism.rbi} (99%) create mode 160000 test/fixtures/prism delete mode 160000 test/fixtures/yarp diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6d54febc9..fa7ae2317 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,7 +15,7 @@ updates: - "minor" - "patch" exclude-patterns: - - "yarp" + - "prism" - package-ecosystem: "gitsubmodule" directory: "/" schedule: diff --git a/.gitmodules b/.gitmodules index 94256e74f..b2280fc15 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "test/fixtures/yarp"] - path = test/fixtures/yarp - url = https://github.com/ruby/yarp.git +[submodule "test/fixtures/prism"] + path = test/fixtures/prism + url = https://github.com/ruby/prism.git diff --git a/ADDONS.md b/ADDONS.md index fc3f09666..1e83a5853 100644 --- a/ADDONS.md +++ b/ADDONS.md @@ -157,7 +157,7 @@ module RubyLsp # Listeners must define methods for each event they registered with the emitter. In this case, we have to define # `on_const` to specify what this listener should do every time we find a constant - sig { params(node: YARP::ConstantReadNode).void } + sig { params(node: Prism::ConstantReadNode).void } def on_constant_read(node) # Certain helpers are made available to listeners to build LSP responses. The classes under `RubyLsp::Interface` # are generally used to build responses and they match exactly what the specification requests. diff --git a/Gemfile.lock b/Gemfile.lock index 194aecefc..5d36eb837 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,8 +3,8 @@ PATH specs: ruby-lsp (0.11.2) language_server-protocol (~> 3.17.0) + prism (>= 0.13, < 0.14) sorbet-runtime (>= 0.5.5685) - yarp (>= 0.12, < 0.13) GEM remote: https://rubygems.org/ @@ -37,6 +37,7 @@ GEM ast (~> 2.4.1) racc prettier_print (1.2.1) + prism (0.13.0) psych (5.1.0) stringio racc (1.7.1) @@ -106,7 +107,7 @@ GEM yard-sorbet (0.8.1) sorbet-runtime (>= 0.5) yard (>= 0.9) - yarp (0.12.0) + yarp (0.13.0) PLATFORMS arm64-darwin diff --git a/Rakefile b/Rakefile index f6b60cf7a..1765ea589 100644 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,7 @@ require "ruby_lsp/check_docs" Rake::TestTask.new(:test) do |t| t.libs << "test" t.libs << "lib" - t.test_files = FileList["test/**/*_test.rb", "lib/ruby_indexer/test/**/*_test.rb"].exclude("test/fixtures/yarp/**/*") + t.test_files = FileList["test/**/*_test.rb", "lib/ruby_indexer/test/**/*_test.rb"].exclude("test/fixtures/prism/**/*") end RDoc::Task.new do |rdoc| diff --git a/bin/test b/bin/test index e73fd6a3a..c039b4e47 100755 --- a/bin/test +++ b/bin/test @@ -1,6 +1,6 @@ #!/usr/bin/env bash -PRISM_FIXTURES_DIR=test/fixtures/yarp/test/prism/fixtures +PRISM_FIXTURES_DIR=test/fixtures/prism/test/prism/fixtures if [ ! -d "$PRISM_FIXTURES_DIR" ]; then echo "$PRISM_FIXTURES_DIR does not exist." diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 6e7e5fc04..83d3f1b1a 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -179,7 +179,7 @@ def index_all(indexable_paths: RubyIndexer.configuration.indexables, &block) sig { params(indexable_path: IndexablePath, source: T.nilable(String)).void } def index_single(indexable_path, source = nil) content = source || File.read(indexable_path.full_path) - result = YARP.parse(content) + result = Prism.parse(content) visitor = IndexVisitor.new(self, result, indexable_path.full_path) result.value.accept(visitor) @@ -262,7 +262,7 @@ class Entry sig { returns(String) } attr_reader :file_path - sig { returns(YARP::Location) } + sig { returns(Prism::Location) } attr_reader :location sig { returns(T::Array[String]) } @@ -271,7 +271,7 @@ class Entry sig { returns(Symbol) } attr_accessor :visibility - sig { params(name: String, file_path: String, location: YARP::Location, comments: T::Array[String]).void } + sig { params(name: String, file_path: String, location: Prism::Location, comments: T::Array[String]).void } def initialize(name, file_path, location, comments) @name = name @file_path = file_path @@ -326,7 +326,7 @@ class UnresolvedAlias < Entry nesting: T::Array[String], name: String, file_path: String, - location: YARP::Location, + location: Prism::Location, comments: T::Array[String], ).void end diff --git a/lib/ruby_indexer/lib/ruby_indexer/visitor.rb b/lib/ruby_indexer/lib/ruby_indexer/visitor.rb index f5df8fe80..5d68f067c 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/visitor.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/visitor.rb @@ -2,10 +2,10 @@ # frozen_string_literal: true module RubyIndexer - class IndexVisitor < YARP::Visitor + class IndexVisitor < Prism::Visitor extend T::Sig - sig { params(index: Index, parse_result: YARP::ParseResult, file_path: String).void } + sig { params(index: Index, parse_result: Prism::ParseResult, file_path: String).void } def initialize(index, parse_result, file_path) @index = index @file_path = file_path @@ -14,107 +14,107 @@ def initialize(index, parse_result, file_path) parse_result.comments.to_h do |c| [c.location.start_line, c] end, - T::Hash[Integer, YARP::Comment], + T::Hash[Integer, Prism::Comment], ) super() end - sig { override.params(node: YARP::ClassNode).void } + sig { override.params(node: Prism::ClassNode).void } def visit_class_node(node) add_index_entry(node, Index::Entry::Class) end - sig { override.params(node: YARP::ModuleNode).void } + sig { override.params(node: Prism::ModuleNode).void } def visit_module_node(node) add_index_entry(node, Index::Entry::Module) end - sig { override.params(node: YARP::MultiWriteNode).void } + sig { override.params(node: Prism::MultiWriteNode).void } def visit_multi_write_node(node) value = node.value - values = value.is_a?(YARP::ArrayNode) && value.opening_loc ? value.elements : [] + values = value.is_a?(Prism::ArrayNode) && value.opening_loc ? value.elements : [] node.targets.each_with_index do |target, i| current_value = values[i] # The moment we find a splat on the right hand side of the assignment, we can no longer figure out which value # gets assigned to what - values.clear if current_value.is_a?(YARP::SplatNode) + values.clear if current_value.is_a?(Prism::SplatNode) case target - when YARP::ConstantTargetNode + when Prism::ConstantTargetNode add_constant(target, fully_qualify_name(target.name.to_s), current_value) - when YARP::ConstantPathTargetNode + when Prism::ConstantPathTargetNode add_constant(target, fully_qualify_name(target.slice), current_value) end end end - sig { override.params(node: YARP::ConstantPathWriteNode).void } + sig { override.params(node: Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node) # ignore variable constants like `var::FOO` or `self.class::FOO` target = node.target - return unless target.parent.nil? || target.parent.is_a?(YARP::ConstantReadNode) + return unless target.parent.nil? || target.parent.is_a?(Prism::ConstantReadNode) name = fully_qualify_name(target.location.slice) add_constant(node, name) end - sig { override.params(node: YARP::ConstantPathOrWriteNode).void } + sig { override.params(node: Prism::ConstantPathOrWriteNode).void } def visit_constant_path_or_write_node(node) # ignore variable constants like `var::FOO` or `self.class::FOO` target = node.target - return unless target.parent.nil? || target.parent.is_a?(YARP::ConstantReadNode) + return unless target.parent.nil? || target.parent.is_a?(Prism::ConstantReadNode) name = fully_qualify_name(target.location.slice) add_constant(node, name) end - sig { override.params(node: YARP::ConstantPathOperatorWriteNode).void } + sig { override.params(node: Prism::ConstantPathOperatorWriteNode).void } def visit_constant_path_operator_write_node(node) # ignore variable constants like `var::FOO` or `self.class::FOO` target = node.target - return unless target.parent.nil? || target.parent.is_a?(YARP::ConstantReadNode) + return unless target.parent.nil? || target.parent.is_a?(Prism::ConstantReadNode) name = fully_qualify_name(target.location.slice) add_constant(node, name) end - sig { override.params(node: YARP::ConstantPathAndWriteNode).void } + sig { override.params(node: Prism::ConstantPathAndWriteNode).void } def visit_constant_path_and_write_node(node) # ignore variable constants like `var::FOO` or `self.class::FOO` target = node.target - return unless target.parent.nil? || target.parent.is_a?(YARP::ConstantReadNode) + return unless target.parent.nil? || target.parent.is_a?(Prism::ConstantReadNode) name = fully_qualify_name(target.location.slice) add_constant(node, name) end - sig { override.params(node: YARP::ConstantWriteNode).void } + sig { override.params(node: Prism::ConstantWriteNode).void } def visit_constant_write_node(node) name = fully_qualify_name(node.name.to_s) add_constant(node, name) end - sig { override.params(node: YARP::ConstantOrWriteNode).void } + sig { override.params(node: Prism::ConstantOrWriteNode).void } def visit_constant_or_write_node(node) name = fully_qualify_name(node.name.to_s) add_constant(node, name) end - sig { override.params(node: YARP::ConstantAndWriteNode).void } + sig { override.params(node: Prism::ConstantAndWriteNode).void } def visit_constant_and_write_node(node) name = fully_qualify_name(node.name.to_s) add_constant(node, name) end - sig { override.params(node: YARP::ConstantOperatorWriteNode).void } + sig { override.params(node: Prism::ConstantOperatorWriteNode).void } def visit_constant_operator_write_node(node) name = fully_qualify_name(node.name.to_s) add_constant(node, name) end - sig { override.params(node: YARP::CallNode).void } + sig { override.params(node: Prism::CallNode).void } def visit_call_node(node) message = node.message handle_private_constant(node) if message == "private_constant" @@ -122,7 +122,7 @@ def visit_call_node(node) private - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def handle_private_constant(node) arguments = node.arguments&.arguments return unless arguments @@ -130,9 +130,9 @@ def handle_private_constant(node) first_argument = arguments.first name = case first_argument - when YARP::StringNode + when Prism::StringNode first_argument.content - when YARP::SymbolNode + when Prism::SymbolNode first_argument.value end @@ -150,37 +150,37 @@ def handle_private_constant(node) sig do params( node: T.any( - YARP::ConstantWriteNode, - YARP::ConstantOrWriteNode, - YARP::ConstantAndWriteNode, - YARP::ConstantOperatorWriteNode, - YARP::ConstantPathWriteNode, - YARP::ConstantPathOrWriteNode, - YARP::ConstantPathOperatorWriteNode, - YARP::ConstantPathAndWriteNode, - YARP::ConstantTargetNode, - YARP::ConstantPathTargetNode, + Prism::ConstantWriteNode, + Prism::ConstantOrWriteNode, + Prism::ConstantAndWriteNode, + Prism::ConstantOperatorWriteNode, + Prism::ConstantPathWriteNode, + Prism::ConstantPathOrWriteNode, + Prism::ConstantPathOperatorWriteNode, + Prism::ConstantPathAndWriteNode, + Prism::ConstantTargetNode, + Prism::ConstantPathTargetNode, ), name: String, - value: T.nilable(YARP::Node), + value: T.nilable(Prism::Node), ).void end def add_constant(node, name, value = nil) - value = node.value unless node.is_a?(YARP::ConstantTargetNode) || node.is_a?(YARP::ConstantPathTargetNode) + value = node.value unless node.is_a?(Prism::ConstantTargetNode) || node.is_a?(Prism::ConstantPathTargetNode) comments = collect_comments(node) @index << case value - when YARP::ConstantReadNode, YARP::ConstantPathNode + when Prism::ConstantReadNode, Prism::ConstantPathNode Index::Entry::UnresolvedAlias.new(value.slice, @stack.dup, name, @file_path, node.location, comments) - when YARP::ConstantWriteNode, YARP::ConstantAndWriteNode, YARP::ConstantOrWriteNode, - YARP::ConstantOperatorWriteNode + when Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, + Prism::ConstantOperatorWriteNode # If the right hand side is another constant assignment, we need to visit it because that constant has to be # indexed too visit(value) Index::Entry::UnresolvedAlias.new(value.name.to_s, @stack.dup, name, @file_path, node.location, comments) - when YARP::ConstantPathWriteNode, YARP::ConstantPathOrWriteNode, YARP::ConstantPathOperatorWriteNode, - YARP::ConstantPathAndWriteNode + when Prism::ConstantPathWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode, + Prism::ConstantPathAndWriteNode visit(value) Index::Entry::UnresolvedAlias.new(value.target.slice, @stack.dup, name, @file_path, node.location, comments) @@ -189,7 +189,7 @@ def add_constant(node, name, value = nil) end end - sig { params(node: T.any(YARP::ClassNode, YARP::ModuleNode), klass: T.class_of(Index::Entry)).void } + sig { params(node: T.any(Prism::ClassNode, Prism::ModuleNode), klass: T.class_of(Index::Entry)).void } def add_index_entry(node, klass) name = node.constant_path.location.slice @@ -204,7 +204,7 @@ def add_index_entry(node, klass) @stack.pop end - sig { params(node: YARP::Node).returns(T::Array[String]) } + sig { params(node: Prism::Node).returns(T::Array[String]) } def collect_comments(node) comments = [] diff --git a/lib/ruby_lsp/document.rb b/lib/ruby_lsp/document.rb index 57fca07b7..4e4d71fc3 100644 --- a/lib/ruby_lsp/document.rb +++ b/lib/ruby_lsp/document.rb @@ -9,7 +9,7 @@ class Document RangeShape = T.type_alias { { start: PositionShape, end: PositionShape } } EditShape = T.type_alias { { range: RangeShape, text: String } } - sig { returns(YARP::ParseResult) } + sig { returns(Prism::ParseResult) } attr_reader :parse_result sig { returns(String) } @@ -29,15 +29,15 @@ def initialize(source:, version:, uri:, encoding: Constant::PositionEncodingKind @version = T.let(version, Integer) @uri = T.let(uri, URI::Generic) @needs_parsing = T.let(false, T::Boolean) - @parse_result = T.let(YARP.parse(@source), YARP::ParseResult) + @parse_result = T.let(Prism.parse(@source), Prism::ParseResult) end - sig { returns(YARP::ProgramNode) } + sig { returns(Prism::ProgramNode) } def tree @parse_result.value end - sig { returns(T::Array[YARP::Comment]) } + sig { returns(T::Array[Prism::Comment]) } def comments @parse_result.comments end @@ -96,7 +96,7 @@ def parse return unless @needs_parsing @needs_parsing = false - @parse_result = YARP.parse(@source) + @parse_result = Prism.parse(@source) end sig { returns(T::Boolean) } @@ -112,8 +112,8 @@ def create_scanner sig do params( position: PositionShape, - node_types: T::Array[T.class_of(YARP::Node)], - ).returns([T.nilable(YARP::Node), T.nilable(YARP::Node), T::Array[String]]) + node_types: T::Array[T.class_of(Prism::Node)], + ).returns([T.nilable(Prism::Node), T.nilable(Prism::Node), T::Array[String]]) end def locate_node(position, node_types: []) locate(@parse_result.value, create_scanner.find_char_position(position), node_types: node_types) @@ -121,16 +121,16 @@ def locate_node(position, node_types: []) sig do params( - node: YARP::Node, + node: Prism::Node, char_position: Integer, - node_types: T::Array[T.class_of(YARP::Node)], - ).returns([T.nilable(YARP::Node), T.nilable(YARP::Node), T::Array[String]]) + node_types: T::Array[T.class_of(Prism::Node)], + ).returns([T.nilable(Prism::Node), T.nilable(Prism::Node), T::Array[String]]) end def locate(node, char_position, node_types: []) - queue = T.let(node.child_nodes.compact, T::Array[T.nilable(YARP::Node)]) + queue = T.let(node.child_nodes.compact, T::Array[T.nilable(Prism::Node)]) closest = node - parent = T.let(nil, T.nilable(YARP::Node)) - nesting = T.let([], T::Array[T.any(YARP::ClassNode, YARP::ModuleNode)]) + parent = T.let(nil, T.nilable(Prism::Node)) + nesting = T.let([], T::Array[T.any(Prism::ClassNode, Prism::ModuleNode)]) until queue.empty? candidate = queue.shift @@ -158,7 +158,7 @@ def locate(node, char_position, node_types: []) # Keep track of the nesting where we found the target. This is used to determine the fully qualified name of the # target when it is a constant - if candidate.is_a?(YARP::ClassNode) || candidate.is_a?(YARP::ModuleNode) + if candidate.is_a?(Prism::ClassNode) || candidate.is_a?(Prism::ModuleNode) nesting << candidate end diff --git a/lib/ruby_lsp/event_emitter.rb b/lib/ruby_lsp/event_emitter.rb index eb8db423d..19458afe8 100644 --- a/lib/ruby_lsp/event_emitter.rb +++ b/lib/ruby_lsp/event_emitter.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true module RubyLsp - # EventEmitter is an intermediary between our requests and YARP visitors. It's used to visit the document's AST + # EventEmitter is an intermediary between our requests and Prism visitors. It's used to visit the document's AST # and emit events that the requests can listen to for providing functionality. Usages: # # - For positional requests, locate the target node and use `emit_for_target` to fire events for each listener @@ -18,7 +18,7 @@ module RubyLsp # emitter.emit_for_target(target_node) # listener.response # ``` - class EventEmitter < YARP::Visitor + class EventEmitter < Prism::Visitor extend T::Sig sig { void } @@ -34,32 +34,27 @@ def register(listener, *events) # Emit events for a specific node. This is similar to the regular `visit` method, but avoids going deeper into the # tree for performance - sig { params(node: T.nilable(YARP::Node)).void } + sig { params(node: T.nilable(Prism::Node)).void } def emit_for_target(node) case node - when YARP::CallNode + when Prism::CallNode @listeners[:on_call]&.each { |l| T.unsafe(l).on_call(node) } - when YARP::ConstantPathNode + when Prism::ConstantPathNode @listeners[:on_constant_path]&.each { |l| T.unsafe(l).on_constant_path(node) } - when YARP::StringNode + when Prism::StringNode @listeners[:on_string]&.each { |l| T.unsafe(l).on_string(node) } - when YARP::ClassNode + when Prism::ClassNode @listeners[:on_class]&.each { |l| T.unsafe(l).on_class(node) } - when YARP::ModuleNode + when Prism::ModuleNode @listeners[:on_module]&.each { |l| T.unsafe(l).on_module(node) } - when YARP::ConstantWriteNode + when Prism::ConstantWriteNode @listeners[:on_constant_write]&.each { |l| T.unsafe(l).on_constant_write(node) } - when YARP::ConstantReadNode + when Prism::ConstantReadNode @listeners[:on_constant_read]&.each { |l| T.unsafe(l).on_constant_read(node) } end end - sig { params(nodes: T::Array[T.nilable(YARP::Node)]).void } - def visit_all(nodes) - nodes.each { |node| visit(node) } - end - - YARP::Visitor.instance_methods.grep(/^visit_.*_node/).each do |method| + Prism::Visitor.instance_methods.grep(/^visit_.*_node/).each do |method| event_name = method.to_s.delete_prefix("visit_").delete_suffix("_node") class_eval(<<~RUBY, __FILE__, __LINE__ + 1) diff --git a/lib/ruby_lsp/executor.rb b/lib/ruby_lsp/executor.rb index a5787e655..d3006d44c 100644 --- a/lib/ruby_lsp/executor.rb +++ b/lib/ruby_lsp/executor.rb @@ -257,10 +257,10 @@ def definition(uri, position) document = @store.get(uri) target, parent, nesting = document.locate_node( position, - node_types: [YARP::CallNode, YARP::ConstantReadNode, YARP::ConstantPathNode], + node_types: [Prism::CallNode, Prism::ConstantReadNode, Prism::ConstantPathNode], ) - target = parent if target.is_a?(YARP::ConstantReadNode) && parent.is_a?(YARP::ConstantPathNode) + target = parent if target.is_a?(Prism::ConstantReadNode) && parent.is_a?(Prism::ConstantPathNode) emitter = EventEmitter.new base_listener = Requests::Definition.new( @@ -289,7 +289,7 @@ def hover(uri, position) if (Requests::Hover::ALLOWED_TARGETS.include?(parent.class) && !Requests::Hover::ALLOWED_TARGETS.include?(target.class)) || - (parent.is_a?(YARP::ConstantPathNode) && target.is_a?(YARP::ConstantReadNode)) + (parent.is_a?(Prism::ConstantPathNode) && target.is_a?(Prism::ConstantReadNode)) target = parent end @@ -481,29 +481,29 @@ def completion(uri, position) # the node, as it could not be a constant target_node_types = if ("A".."Z").cover?(document.source[char_position - 1]) char_position -= 1 - [YARP::ConstantReadNode, YARP::ConstantPathNode] + [Prism::ConstantReadNode, Prism::ConstantPathNode] else - [YARP::CallNode] + [Prism::CallNode] end matched, parent, nesting = document.locate(document.tree, char_position, node_types: target_node_types) return unless matched && parent target = case matched - when YARP::CallNode + when Prism::CallNode message = matched.message return unless message == "require" args = matched.arguments&.arguments - return if args.nil? || args.is_a?(YARP::ForwardingArgumentsNode) + return if args.nil? || args.is_a?(Prism::ForwardingArgumentsNode) argument = args.first - return unless argument.is_a?(YARP::StringNode) + return unless argument.is_a?(Prism::StringNode) return unless (argument.location.start_offset..argument.location.end_offset).cover?(char_position) argument - when YARP::ConstantReadNode, YARP::ConstantPathNode - if parent.is_a?(YARP::ConstantPathNode) && matched.is_a?(YARP::ConstantReadNode) + when Prism::ConstantReadNode, Prism::ConstantPathNode + if parent.is_a?(Prism::ConstantPathNode) && matched.is_a?(Prism::ConstantReadNode) parent else matched diff --git a/lib/ruby_lsp/internal.rb b/lib/ruby_lsp/internal.rb index c3ad3b0c0..1b7bdbc63 100644 --- a/lib/ruby_lsp/internal.rb +++ b/lib/ruby_lsp/internal.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "sorbet-runtime" -require "yarp" +require "prism" require "language_server-protocol" require "bundler" require "uri" diff --git a/lib/ruby_lsp/requests/base_request.rb b/lib/ruby_lsp/requests/base_request.rb index 745e3427b..e90424eb4 100644 --- a/lib/ruby_lsp/requests/base_request.rb +++ b/lib/ruby_lsp/requests/base_request.rb @@ -4,7 +4,7 @@ module RubyLsp module Requests # :nodoc: - class BaseRequest < YARP::Visitor + class BaseRequest < Prism::Visitor extend T::Sig extend T::Helpers include Support::Common @@ -19,14 +19,6 @@ def initialize(document) sig { abstract.returns(Object) } def run; end - - # YARP implements `visit_all` using `map` instead of `each` for users who want to use the pattern - # `result = visitor.visit(tree)`. However, we don't use that pattern and should avoid producing a new array for - # every single node visited - sig { params(nodes: T::Array[T.nilable(YARP::Node)]).void } - def visit_all(nodes) - nodes.each { |node| visit(node) } - end end end end diff --git a/lib/ruby_lsp/requests/code_action_resolve.rb b/lib/ruby_lsp/requests/code_action_resolve.rb index 258b4128e..577f1eeef 100644 --- a/lib/ruby_lsp/requests/code_action_resolve.rb +++ b/lib/ruby_lsp/requests/code_action_resolve.rb @@ -55,7 +55,7 @@ def run # Find the closest statements node, so that we place the refactor in a valid position closest_statements, parent_statements = @document - .locate(@document.tree, start_index, node_types: [YARP::StatementsNode, YARP::BlockNode]) + .locate(@document.tree, start_index, node_types: [Prism::StatementsNode, Prism::BlockNode]) return Error::InvalidTargetRange if closest_statements.nil? || closest_statements.child_nodes.compact.empty? @@ -66,11 +66,11 @@ def run distance <= 0 ? Float::INFINITY : distance end) - return Error::InvalidTargetRange if closest_node.is_a?(YARP::MissingNode) + return Error::InvalidTargetRange if closest_node.is_a?(Prism::MissingNode) closest_node_loc = closest_node.location # If the parent expression is a single line block, then we have to extract it inside of the oneline block - if parent_statements.is_a?(YARP::BlockNode) && + if parent_statements.is_a?(Prism::BlockNode) && parent_statements.location.start_line == parent_statements.location.end_line variable_source = " #{NEW_VARIABLE_NAME} = #{extracted_source};" diff --git a/lib/ruby_lsp/requests/code_lens.rb b/lib/ruby_lsp/requests/code_lens.rb index 2c93d13b3..26e314fc2 100644 --- a/lib/ruby_lsp/requests/code_lens.rb +++ b/lib/ruby_lsp/requests/code_lens.rb @@ -52,7 +52,7 @@ def initialize(uri, emitter, message_queue) ) end - sig { params(node: YARP::ClassNode).void } + sig { params(node: Prism::ClassNode).void } def on_class(node) @visibility_stack.push(["public", "public"]) class_name = node.constant_path.slice @@ -68,13 +68,13 @@ def on_class(node) end end - sig { params(node: YARP::ClassNode).void } + sig { params(node: Prism::ClassNode).void } def after_class(node) @visibility_stack.pop @class_stack.pop end - sig { params(node: YARP::DefNode).void } + sig { params(node: Prism::DefNode).void } def on_def(node) class_name = @class_stack.last return unless class_name&.end_with?("Test") @@ -93,7 +93,7 @@ def on_def(node) end end - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def on_call(node) name = node.name arguments = node.arguments @@ -103,7 +103,7 @@ def on_call(node) if arguments.nil? @visibility_stack.pop @visibility_stack.push([name, name]) - elsif arguments.arguments.first.is_a?(YARP::DefNode) + elsif arguments.arguments.first.is_a?(Prism::DefNode) visibility, _ = @visibility_stack.pop @visibility_stack.push([name, visibility]) end @@ -113,7 +113,7 @@ def on_call(node) if @path&.include?("Gemfile") && name == "gem" && arguments first_argument = arguments.arguments.first - return unless first_argument.is_a?(YARP::StringNode) + return unless first_argument.is_a?(Prism::StringNode) remote = resolve_gem_remote(first_argument) return unless remote @@ -122,7 +122,7 @@ def on_call(node) end end - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def after_call(node) _, prev_visibility = @visibility_stack.pop @visibility_stack.push([prev_visibility, prev_visibility]) @@ -141,7 +141,7 @@ def merge_response!(other) private - sig { params(node: YARP::Node, name: String, command: String, kind: Symbol).void } + sig { params(node: Prism::Node, name: String, command: String, kind: Symbol).void } def add_test_code_lens(node, name:, command:, kind:) # don't add code lenses if the test library is not supported or unknown return unless SUPPORTED_TEST_LIBRARIES.include?(DependencyDetector.instance.detected_test_library) && @path @@ -183,7 +183,7 @@ def add_test_code_lens(node, name:, command:, kind:) ) end - sig { params(gem_name: YARP::StringNode).returns(T.nilable(String)) } + sig { params(gem_name: Prism::StringNode).returns(T.nilable(String)) } def resolve_gem_remote(gem_name) spec = Gem::Specification.stubs.find { |gem| gem.name == gem_name.content }&.to_spec return if spec.nil? @@ -215,7 +215,7 @@ def generate_test_command(class_name:, method_name: nil) command end - sig { params(node: YARP::CallNode, remote: String).void } + sig { params(node: Prism::CallNode, remote: String).void } def add_open_gem_remote_code_lens(node, remote) @_response << create_code_lens( node, diff --git a/lib/ruby_lsp/requests/completion.rb b/lib/ruby_lsp/requests/completion.rb index 05987b951..e1e45da0a 100644 --- a/lib/ruby_lsp/requests/completion.rb +++ b/lib/ruby_lsp/requests/completion.rb @@ -43,7 +43,7 @@ def initialize(index, nesting, emitter, message_queue) emitter.register(self, :on_string, :on_constant_path, :on_constant_read) end - sig { params(node: YARP::StringNode).void } + sig { params(node: Prism::StringNode).void } def on_string(node) @index.search_require_paths(node.content).map!(&:require_path).sort!.each do |path| @_response << build_completion(T.must(path), node) @@ -51,7 +51,7 @@ def on_string(node) end # Handle completion on regular constant references (e.g. `Bar`) - sig { params(node: YARP::ConstantReadNode).void } + sig { params(node: Prism::ConstantReadNode).void } def on_constant_read(node) return if DependencyDetector.instance.typechecker @@ -64,7 +64,7 @@ def on_constant_read(node) end # Handle completion on namespaced constant references (e.g. `Foo::Bar`) - sig { params(node: YARP::ConstantPathNode).void } + sig { params(node: Prism::ConstantPathNode).void } def on_constant_path(node) return if DependencyDetector.instance.typechecker @@ -108,7 +108,7 @@ def on_constant_path(node) private - sig { params(label: String, node: YARP::StringNode).returns(Interface::CompletionItem) } + sig { params(label: String, node: Prism::StringNode).returns(Interface::CompletionItem) } def build_completion(label, node) Interface::CompletionItem.new( label: label, @@ -123,7 +123,7 @@ def build_completion(label, node) sig do params( name: String, - node: YARP::Node, + node: Prism::Node, entries: T::Array[RubyIndexer::Index::Entry], top_level: T::Boolean, ).returns(Interface::CompletionItem) diff --git a/lib/ruby_lsp/requests/definition.rb b/lib/ruby_lsp/requests/definition.rb index f3f0cb3d5..745327d35 100644 --- a/lib/ruby_lsp/requests/definition.rb +++ b/lib/ruby_lsp/requests/definition.rb @@ -66,7 +66,7 @@ def merge_response!(other) self end - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def on_call(node) message = node.name return unless message == "require" || message == "require_relative" @@ -75,7 +75,7 @@ def on_call(node) return unless arguments argument = arguments.arguments.first - return unless argument.is_a?(YARP::StringNode) + return unless argument.is_a?(Prism::StringNode) case message when "require" @@ -110,12 +110,12 @@ def on_call(node) end end - sig { params(node: YARP::ConstantPathNode).void } + sig { params(node: Prism::ConstantPathNode).void } def on_constant_path(node) find_in_index(node.slice) end - sig { params(node: YARP::ConstantReadNode).void } + sig { params(node: Prism::ConstantReadNode).void } def on_constant_read(node) find_in_index(node.slice) end diff --git a/lib/ruby_lsp/requests/diagnostics.rb b/lib/ruby_lsp/requests/diagnostics.rb index dc523f430..4628d2ea9 100644 --- a/lib/ruby_lsp/requests/diagnostics.rb +++ b/lib/ruby_lsp/requests/diagnostics.rb @@ -60,7 +60,7 @@ def syntax_error_diagnostics ), message: error.message, severity: Constant::DiagnosticSeverity::ERROR, - source: "YARP", + source: "Prism", ) end end diff --git a/lib/ruby_lsp/requests/document_highlight.rb b/lib/ruby_lsp/requests/document_highlight.rb index 82b52f51a..b7594ac98 100644 --- a/lib/ruby_lsp/requests/document_highlight.rb +++ b/lib/ruby_lsp/requests/document_highlight.rb @@ -29,80 +29,80 @@ class DocumentHighlight < Listener GLOBAL_VARIABLE_NODES = T.let( [ - YARP::GlobalVariableAndWriteNode, - YARP::GlobalVariableOperatorWriteNode, - YARP::GlobalVariableOrWriteNode, - YARP::GlobalVariableReadNode, - YARP::GlobalVariableTargetNode, - YARP::GlobalVariableWriteNode, + Prism::GlobalVariableAndWriteNode, + Prism::GlobalVariableOperatorWriteNode, + Prism::GlobalVariableOrWriteNode, + Prism::GlobalVariableReadNode, + Prism::GlobalVariableTargetNode, + Prism::GlobalVariableWriteNode, ], - T::Array[T.class_of(YARP::Node)], + T::Array[T.class_of(Prism::Node)], ) INSTANCE_VARIABLE_NODES = T.let( [ - YARP::InstanceVariableAndWriteNode, - YARP::InstanceVariableOperatorWriteNode, - YARP::InstanceVariableOrWriteNode, - YARP::InstanceVariableReadNode, - YARP::InstanceVariableTargetNode, - YARP::InstanceVariableWriteNode, + Prism::InstanceVariableAndWriteNode, + Prism::InstanceVariableOperatorWriteNode, + Prism::InstanceVariableOrWriteNode, + Prism::InstanceVariableReadNode, + Prism::InstanceVariableTargetNode, + Prism::InstanceVariableWriteNode, ], - T::Array[T.class_of(YARP::Node)], + T::Array[T.class_of(Prism::Node)], ) CONSTANT_NODES = T.let( [ - YARP::ConstantAndWriteNode, - YARP::ConstantOperatorWriteNode, - YARP::ConstantOrWriteNode, - YARP::ConstantReadNode, - YARP::ConstantTargetNode, - YARP::ConstantWriteNode, + Prism::ConstantAndWriteNode, + Prism::ConstantOperatorWriteNode, + Prism::ConstantOrWriteNode, + Prism::ConstantReadNode, + Prism::ConstantTargetNode, + Prism::ConstantWriteNode, ], - T::Array[T.class_of(YARP::Node)], + T::Array[T.class_of(Prism::Node)], ) CONSTANT_PATH_NODES = T.let( [ - YARP::ConstantPathAndWriteNode, - YARP::ConstantPathNode, - YARP::ConstantPathOperatorWriteNode, - YARP::ConstantPathOrWriteNode, - YARP::ConstantPathTargetNode, - YARP::ConstantPathWriteNode, + Prism::ConstantPathAndWriteNode, + Prism::ConstantPathNode, + Prism::ConstantPathOperatorWriteNode, + Prism::ConstantPathOrWriteNode, + Prism::ConstantPathTargetNode, + Prism::ConstantPathWriteNode, ], - T::Array[T.class_of(YARP::Node)], + T::Array[T.class_of(Prism::Node)], ) CLASS_VARIABLE_NODES = T.let( [ - YARP::ClassVariableAndWriteNode, - YARP::ClassVariableOperatorWriteNode, - YARP::ClassVariableOrWriteNode, - YARP::ClassVariableReadNode, - YARP::ClassVariableTargetNode, - YARP::ClassVariableWriteNode, + Prism::ClassVariableAndWriteNode, + Prism::ClassVariableOperatorWriteNode, + Prism::ClassVariableOrWriteNode, + Prism::ClassVariableReadNode, + Prism::ClassVariableTargetNode, + Prism::ClassVariableWriteNode, ], - T::Array[T.class_of(YARP::Node)], + T::Array[T.class_of(Prism::Node)], ) LOCAL_NODES = T.let( [ - YARP::LocalVariableAndWriteNode, - YARP::LocalVariableOperatorWriteNode, - YARP::LocalVariableOrWriteNode, - YARP::LocalVariableReadNode, - YARP::LocalVariableTargetNode, - YARP::LocalVariableWriteNode, - YARP::BlockParameterNode, - YARP::RequiredParameterNode, - YARP::KeywordParameterNode, - YARP::RestParameterNode, - YARP::OptionalParameterNode, - YARP::KeywordRestParameterNode, + Prism::LocalVariableAndWriteNode, + Prism::LocalVariableOperatorWriteNode, + Prism::LocalVariableOrWriteNode, + Prism::LocalVariableReadNode, + Prism::LocalVariableTargetNode, + Prism::LocalVariableWriteNode, + Prism::BlockParameterNode, + Prism::RequiredParameterNode, + Prism::KeywordParameterNode, + Prism::RestParameterNode, + Prism::OptionalParameterNode, + Prism::KeywordRestParameterNode, ], - T::Array[T.class_of(YARP::Node)], + T::Array[T.class_of(Prism::Node)], ) sig { override.returns(ResponseType) } @@ -110,8 +110,8 @@ class DocumentHighlight < Listener sig do params( - target: T.nilable(YARP::Node), - parent: T.nilable(YARP::Node), + target: T.nilable(Prism::Node), + parent: T.nilable(Prism::Node), emitter: EventEmitter, message_queue: Thread::Queue, ).void @@ -125,24 +125,24 @@ def initialize(target, parent, emitter, message_queue) highlight_target = case target - when YARP::GlobalVariableReadNode, YARP::GlobalVariableAndWriteNode, YARP::GlobalVariableOperatorWriteNode, - YARP::GlobalVariableOrWriteNode, YARP::GlobalVariableTargetNode, YARP::GlobalVariableWriteNode, - YARP::InstanceVariableAndWriteNode, YARP::InstanceVariableOperatorWriteNode, - YARP::InstanceVariableOrWriteNode, YARP::InstanceVariableReadNode, YARP::InstanceVariableTargetNode, - YARP::InstanceVariableWriteNode, YARP::ConstantAndWriteNode, YARP::ConstantOperatorWriteNode, - YARP::ConstantOrWriteNode, YARP::ConstantPathAndWriteNode, YARP::ConstantPathNode, - YARP::ConstantPathOperatorWriteNode, YARP::ConstantPathOrWriteNode, YARP::ConstantPathTargetNode, - YARP::ConstantPathWriteNode, YARP::ConstantReadNode, YARP::ConstantTargetNode, YARP::ConstantWriteNode, - YARP::ClassVariableAndWriteNode, YARP::ClassVariableOperatorWriteNode, YARP::ClassVariableOrWriteNode, - YARP::ClassVariableReadNode, YARP::ClassVariableTargetNode, YARP::ClassVariableWriteNode, - YARP::LocalVariableAndWriteNode, YARP::LocalVariableOperatorWriteNode, YARP::LocalVariableOrWriteNode, - YARP::LocalVariableReadNode, YARP::LocalVariableTargetNode, YARP::LocalVariableWriteNode, YARP::CallNode, - YARP::BlockParameterNode, YARP::KeywordParameterNode, YARP::KeywordRestParameterNode, - YARP::OptionalParameterNode, YARP::RequiredParameterNode, YARP::RestParameterNode + when Prism::GlobalVariableReadNode, Prism::GlobalVariableAndWriteNode, Prism::GlobalVariableOperatorWriteNode, + Prism::GlobalVariableOrWriteNode, Prism::GlobalVariableTargetNode, Prism::GlobalVariableWriteNode, + Prism::InstanceVariableAndWriteNode, Prism::InstanceVariableOperatorWriteNode, + Prism::InstanceVariableOrWriteNode, Prism::InstanceVariableReadNode, Prism::InstanceVariableTargetNode, + Prism::InstanceVariableWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOperatorWriteNode, + Prism::ConstantOrWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathNode, + Prism::ConstantPathOperatorWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathTargetNode, + Prism::ConstantPathWriteNode, Prism::ConstantReadNode, Prism::ConstantTargetNode, Prism::ConstantWriteNode, + Prism::ClassVariableAndWriteNode, Prism::ClassVariableOperatorWriteNode, Prism::ClassVariableOrWriteNode, + Prism::ClassVariableReadNode, Prism::ClassVariableTargetNode, Prism::ClassVariableWriteNode, + Prism::LocalVariableAndWriteNode, Prism::LocalVariableOperatorWriteNode, Prism::LocalVariableOrWriteNode, + Prism::LocalVariableReadNode, Prism::LocalVariableTargetNode, Prism::LocalVariableWriteNode, + Prism::CallNode, Prism::BlockParameterNode, Prism::KeywordParameterNode, Prism::KeywordRestParameterNode, + Prism::OptionalParameterNode, Prism::RequiredParameterNode, Prism::RestParameterNode target end - @target = T.let(highlight_target, T.nilable(YARP::Node)) + @target = T.let(highlight_target, T.nilable(Prism::Node)) @target_value = T.let(node_value(highlight_target), T.nilable(String)) if @target && @target_value @@ -198,175 +198,175 @@ def initialize(target, parent, emitter, message_queue) end end - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def on_call(node) - return unless matches?(node, [YARP::CallNode, YARP::DefNode]) + return unless matches?(node, [Prism::CallNode, Prism::DefNode]) add_highlight(Constant::DocumentHighlightKind::READ, node.location) end - sig { params(node: YARP::DefNode).void } + sig { params(node: Prism::DefNode).void } def on_def(node) - return unless matches?(node, [YARP::CallNode, YARP::DefNode]) + return unless matches?(node, [Prism::CallNode, Prism::DefNode]) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::GlobalVariableTargetNode).void } + sig { params(node: Prism::GlobalVariableTargetNode).void } def on_global_variable_target(node) return unless matches?(node, GLOBAL_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.location) end - sig { params(node: YARP::InstanceVariableTargetNode).void } + sig { params(node: Prism::InstanceVariableTargetNode).void } def on_instance_variable_target(node) return unless matches?(node, INSTANCE_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.location) end - sig { params(node: YARP::ConstantPathTargetNode).void } + sig { params(node: Prism::ConstantPathTargetNode).void } def on_constant_path_target(node) return unless matches?(node, CONSTANT_PATH_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.location) end - sig { params(node: YARP::ConstantTargetNode).void } + sig { params(node: Prism::ConstantTargetNode).void } def on_constant_target(node) return unless matches?(node, CONSTANT_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.location) end - sig { params(node: YARP::ClassVariableTargetNode).void } + sig { params(node: Prism::ClassVariableTargetNode).void } def on_class_variable_target(node) return unless matches?(node, CLASS_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.location) end - sig { params(node: YARP::LocalVariableTargetNode).void } + sig { params(node: Prism::LocalVariableTargetNode).void } def on_local_variable_target(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.location) end - sig { params(node: YARP::BlockParameterNode).void } + sig { params(node: Prism::BlockParameterNode).void } def on_block_parameter(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.location) end - sig { params(node: YARP::RequiredParameterNode).void } + sig { params(node: Prism::RequiredParameterNode).void } def on_required_parameter(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.location) end - sig { params(node: YARP::ClassNode).void } + sig { params(node: Prism::ClassNode).void } def on_class(node) - return unless matches?(node, CONSTANT_NODES + CONSTANT_PATH_NODES + [YARP::ClassNode]) + return unless matches?(node, CONSTANT_NODES + CONSTANT_PATH_NODES + [Prism::ClassNode]) add_highlight(Constant::DocumentHighlightKind::WRITE, node.constant_path.location) end - sig { params(node: YARP::ModuleNode).void } + sig { params(node: Prism::ModuleNode).void } def on_module(node) - return unless matches?(node, CONSTANT_NODES + CONSTANT_PATH_NODES + [YARP::ModuleNode]) + return unless matches?(node, CONSTANT_NODES + CONSTANT_PATH_NODES + [Prism::ModuleNode]) add_highlight(Constant::DocumentHighlightKind::WRITE, node.constant_path.location) end - sig { params(node: YARP::LocalVariableReadNode).void } + sig { params(node: Prism::LocalVariableReadNode).void } def on_local_variable_read(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::READ, node.location) end - sig { params(node: YARP::ConstantPathNode).void } + sig { params(node: Prism::ConstantPathNode).void } def on_constant_path(node) return unless matches?(node, CONSTANT_PATH_NODES) add_highlight(Constant::DocumentHighlightKind::READ, node.location) end - sig { params(node: YARP::ConstantReadNode).void } + sig { params(node: Prism::ConstantReadNode).void } def on_constant_read(node) return unless matches?(node, CONSTANT_NODES) add_highlight(Constant::DocumentHighlightKind::READ, node.location) end - sig { params(node: YARP::InstanceVariableReadNode).void } + sig { params(node: Prism::InstanceVariableReadNode).void } def on_instance_variable_read(node) return unless matches?(node, INSTANCE_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::READ, node.location) end - sig { params(node: YARP::ClassVariableReadNode).void } + sig { params(node: Prism::ClassVariableReadNode).void } def on_class_variable_read(node) return unless matches?(node, CLASS_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::READ, node.location) end - sig { params(node: YARP::GlobalVariableReadNode).void } + sig { params(node: Prism::GlobalVariableReadNode).void } def on_global_variable_read(node) return unless matches?(node, GLOBAL_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::READ, node.location) end - sig { params(node: YARP::ConstantPathWriteNode).void } + sig { params(node: Prism::ConstantPathWriteNode).void } def on_constant_path_write(node) return unless matches?(node, CONSTANT_PATH_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.target.location) end - sig { params(node: YARP::ConstantPathOrWriteNode).void } + sig { params(node: Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write(node) return unless matches?(node, CONSTANT_PATH_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.target.location) end - sig { params(node: YARP::ConstantPathAndWriteNode).void } + sig { params(node: Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write(node) return unless matches?(node, CONSTANT_PATH_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.target.location) end - sig { params(node: YARP::ConstantPathOperatorWriteNode).void } + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write(node) return unless matches?(node, CONSTANT_PATH_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.target.location) end - sig { params(node: YARP::LocalVariableWriteNode).void } + sig { params(node: Prism::LocalVariableWriteNode).void } def on_local_variable_write(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::KeywordParameterNode).void } + sig { params(node: Prism::KeywordParameterNode).void } def on_keyword_parameter(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::RestParameterNode).void } + sig { params(node: Prism::RestParameterNode).void } def on_rest_parameter(node) return unless matches?(node, LOCAL_NODES) @@ -374,14 +374,14 @@ def on_rest_parameter(node) add_highlight(Constant::DocumentHighlightKind::WRITE, name_loc) if name_loc end - sig { params(node: YARP::OptionalParameterNode).void } + sig { params(node: Prism::OptionalParameterNode).void } def on_optional_parameter(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::KeywordRestParameterNode).void } + sig { params(node: Prism::KeywordRestParameterNode).void } def on_keyword_rest_parameter(node) return unless matches?(node, LOCAL_NODES) @@ -389,133 +389,133 @@ def on_keyword_rest_parameter(node) add_highlight(Constant::DocumentHighlightKind::WRITE, name_loc) if name_loc end - sig { params(node: YARP::LocalVariableAndWriteNode).void } + sig { params(node: Prism::LocalVariableAndWriteNode).void } def on_local_variable_and_write(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::LocalVariableOperatorWriteNode).void } + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } def on_local_variable_operator_write(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::LocalVariableOrWriteNode).void } + sig { params(node: Prism::LocalVariableOrWriteNode).void } def on_local_variable_or_write(node) return unless matches?(node, LOCAL_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::ClassVariableWriteNode).void } + sig { params(node: Prism::ClassVariableWriteNode).void } def on_class_variable_write(node) return unless matches?(node, CLASS_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::ClassVariableOrWriteNode).void } + sig { params(node: Prism::ClassVariableOrWriteNode).void } def on_class_variable_or_write(node) return unless matches?(node, CLASS_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::ClassVariableOperatorWriteNode).void } + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } def on_class_variable_operator_write(node) return unless matches?(node, CLASS_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::ClassVariableAndWriteNode).void } + sig { params(node: Prism::ClassVariableAndWriteNode).void } def on_class_variable_and_write(node) return unless matches?(node, CLASS_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::ConstantWriteNode).void } + sig { params(node: Prism::ConstantWriteNode).void } def on_constant_write(node) return unless matches?(node, CONSTANT_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::ConstantOrWriteNode).void } + sig { params(node: Prism::ConstantOrWriteNode).void } def on_constant_or_write(node) return unless matches?(node, CONSTANT_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::ConstantOperatorWriteNode).void } + sig { params(node: Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write(node) return unless matches?(node, CONSTANT_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::InstanceVariableWriteNode).void } + sig { params(node: Prism::InstanceVariableWriteNode).void } def on_instance_variable_write(node) return unless matches?(node, INSTANCE_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::InstanceVariableOrWriteNode).void } + sig { params(node: Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write(node) return unless matches?(node, INSTANCE_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::InstanceVariableAndWriteNode).void } + sig { params(node: Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write(node) return unless matches?(node, INSTANCE_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::InstanceVariableOperatorWriteNode).void } + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write(node) return unless matches?(node, INSTANCE_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::ConstantAndWriteNode).void } + sig { params(node: Prism::ConstantAndWriteNode).void } def on_constant_and_write(node) return unless matches?(node, CONSTANT_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::GlobalVariableWriteNode).void } + sig { params(node: Prism::GlobalVariableWriteNode).void } def on_global_variable_write(node) return unless matches?(node, GLOBAL_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::GlobalVariableOrWriteNode).void } + sig { params(node: Prism::GlobalVariableOrWriteNode).void } def on_global_variable_or_write(node) return unless matches?(node, GLOBAL_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::GlobalVariableAndWriteNode).void } + sig { params(node: Prism::GlobalVariableAndWriteNode).void } def on_global_variable_and_write(node) return unless matches?(node, GLOBAL_VARIABLE_NODES) add_highlight(Constant::DocumentHighlightKind::WRITE, node.name_loc) end - sig { params(node: YARP::GlobalVariableOperatorWriteNode).void } + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } def on_global_variable_operator_write(node) return unless matches?(node, GLOBAL_VARIABLE_NODES) @@ -524,40 +524,40 @@ def on_global_variable_operator_write(node) private - sig { params(node: YARP::Node, classes: T::Array[T.class_of(YARP::Node)]).returns(T.nilable(T::Boolean)) } + sig { params(node: Prism::Node, classes: T::Array[T.class_of(Prism::Node)]).returns(T.nilable(T::Boolean)) } def matches?(node, classes) classes.any? { |klass| @target.is_a?(klass) } && @target_value == node_value(node) end - sig { params(kind: Integer, location: YARP::Location).void } + sig { params(kind: Integer, location: Prism::Location).void } def add_highlight(kind, location) @_response << Interface::DocumentHighlight.new(range: range_from_location(location), kind: kind) end - sig { params(node: T.nilable(YARP::Node)).returns(T.nilable(String)) } + sig { params(node: T.nilable(Prism::Node)).returns(T.nilable(String)) } def node_value(node) case node - when YARP::ConstantReadNode, YARP::ConstantPathNode, YARP::BlockArgumentNode, YARP::ConstantTargetNode, - YARP::ConstantPathWriteNode, YARP::ConstantPathTargetNode, YARP::ConstantPathOrWriteNode, - YARP::ConstantPathOperatorWriteNode, YARP::ConstantPathAndWriteNode + when Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::BlockArgumentNode, Prism::ConstantTargetNode, + Prism::ConstantPathWriteNode, Prism::ConstantPathTargetNode, Prism::ConstantPathOrWriteNode, + Prism::ConstantPathOperatorWriteNode, Prism::ConstantPathAndWriteNode node.slice - when YARP::GlobalVariableReadNode, YARP::GlobalVariableAndWriteNode, YARP::GlobalVariableOperatorWriteNode, - YARP::GlobalVariableOrWriteNode, YARP::GlobalVariableTargetNode, YARP::GlobalVariableWriteNode, - YARP::InstanceVariableAndWriteNode, YARP::InstanceVariableOperatorWriteNode, - YARP::InstanceVariableOrWriteNode, YARP::InstanceVariableReadNode, YARP::InstanceVariableTargetNode, - YARP::InstanceVariableWriteNode, YARP::ConstantAndWriteNode, YARP::ConstantOperatorWriteNode, - YARP::ConstantOrWriteNode, YARP::ConstantWriteNode, YARP::ClassVariableAndWriteNode, - YARP::ClassVariableOperatorWriteNode, YARP::ClassVariableOrWriteNode, YARP::ClassVariableReadNode, - YARP::ClassVariableTargetNode, YARP::ClassVariableWriteNode, YARP::LocalVariableAndWriteNode, - YARP::LocalVariableOperatorWriteNode, YARP::LocalVariableOrWriteNode, YARP::LocalVariableReadNode, - YARP::LocalVariableTargetNode, YARP::LocalVariableWriteNode, YARP::DefNode, YARP::BlockParameterNode, - YARP::KeywordParameterNode, YARP::KeywordRestParameterNode, YARP::OptionalParameterNode, - YARP::RequiredParameterNode, YARP::RestParameterNode + when Prism::GlobalVariableReadNode, Prism::GlobalVariableAndWriteNode, Prism::GlobalVariableOperatorWriteNode, + Prism::GlobalVariableOrWriteNode, Prism::GlobalVariableTargetNode, Prism::GlobalVariableWriteNode, + Prism::InstanceVariableAndWriteNode, Prism::InstanceVariableOperatorWriteNode, + Prism::InstanceVariableOrWriteNode, Prism::InstanceVariableReadNode, Prism::InstanceVariableTargetNode, + Prism::InstanceVariableWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOperatorWriteNode, + Prism::ConstantOrWriteNode, Prism::ConstantWriteNode, Prism::ClassVariableAndWriteNode, + Prism::ClassVariableOperatorWriteNode, Prism::ClassVariableOrWriteNode, Prism::ClassVariableReadNode, + Prism::ClassVariableTargetNode, Prism::ClassVariableWriteNode, Prism::LocalVariableAndWriteNode, + Prism::LocalVariableOperatorWriteNode, Prism::LocalVariableOrWriteNode, Prism::LocalVariableReadNode, + Prism::LocalVariableTargetNode, Prism::LocalVariableWriteNode, Prism::DefNode, Prism::BlockParameterNode, + Prism::KeywordParameterNode, Prism::KeywordRestParameterNode, Prism::OptionalParameterNode, + Prism::RequiredParameterNode, Prism::RestParameterNode node.name.to_s - when YARP::CallNode + when Prism::CallNode node.message - when YARP::ClassNode, YARP::ModuleNode + when Prism::ClassNode, Prism::ModuleNode node.constant_path.slice end end diff --git a/lib/ruby_lsp/requests/document_link.rb b/lib/ruby_lsp/requests/document_link.rb index c75b16ae6..79669edb9 100644 --- a/lib/ruby_lsp/requests/document_link.rb +++ b/lib/ruby_lsp/requests/document_link.rb @@ -78,7 +78,7 @@ def gem_paths sig do params( uri: URI::Generic, - comments: T::Array[YARP::Comment], + comments: T::Array[Prism::Comment], emitter: EventEmitter, message_queue: Thread::Queue, ).void @@ -96,40 +96,40 @@ def initialize(uri, comments, emitter, message_queue) comments.to_h do |comment| [comment.location.end_line, comment] end, - T::Hash[Integer, YARP::Comment], + T::Hash[Integer, Prism::Comment], ) emitter.register(self, :on_def, :on_class, :on_module, :on_constant_write, :on_constant_path_write) end - sig { params(node: YARP::DefNode).void } + sig { params(node: Prism::DefNode).void } def on_def(node) extract_document_link(node) end - sig { params(node: YARP::ClassNode).void } + sig { params(node: Prism::ClassNode).void } def on_class(node) extract_document_link(node) end - sig { params(node: YARP::ModuleNode).void } + sig { params(node: Prism::ModuleNode).void } def on_module(node) extract_document_link(node) end - sig { params(node: YARP::ConstantWriteNode).void } + sig { params(node: Prism::ConstantWriteNode).void } def on_constant_write(node) extract_document_link(node) end - sig { params(node: YARP::ConstantPathWriteNode).void } + sig { params(node: Prism::ConstantPathWriteNode).void } def on_constant_path_write(node) extract_document_link(node) end private - sig { params(node: YARP::Node).void } + sig { params(node: Prism::Node).void } def extract_document_link(node) comment = @lines_to_comments[node.location.start_line - 1] return unless comment diff --git a/lib/ruby_lsp/requests/document_symbol.rb b/lib/ruby_lsp/requests/document_symbol.rb index 1b1307a34..1d759dc2f 100644 --- a/lib/ruby_lsp/requests/document_symbol.rb +++ b/lib/ruby_lsp/requests/document_symbol.rb @@ -88,7 +88,7 @@ def merge_response!(other) self end - sig { params(node: YARP::ClassNode).void } + sig { params(node: Prism::ClassNode).void } def on_class(node) @stack << create_document_symbol( name: node.constant_path.location.slice, @@ -98,12 +98,12 @@ def on_class(node) ) end - sig { params(node: YARP::ClassNode).void } + sig { params(node: Prism::ClassNode).void } def after_class(node) @stack.pop end - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def on_call(node) return unless ATTR_ACCESSORS.include?(node.name) && node.receiver.nil? @@ -111,7 +111,7 @@ def on_call(node) return unless arguments arguments.arguments.each do |argument| - next unless argument.is_a?(YARP::SymbolNode) + next unless argument.is_a?(Prism::SymbolNode) name = argument.value next unless name @@ -125,7 +125,7 @@ def on_call(node) end end - sig { params(node: YARP::ConstantPathWriteNode).void } + sig { params(node: Prism::ConstantPathWriteNode).void } def on_constant_path_write(node) create_document_symbol( name: node.target.location.slice, @@ -135,7 +135,7 @@ def on_constant_path_write(node) ) end - sig { params(node: YARP::ConstantWriteNode).void } + sig { params(node: Prism::ConstantWriteNode).void } def on_constant_write(node) create_document_symbol( name: node.name.to_s, @@ -145,12 +145,12 @@ def on_constant_write(node) ) end - sig { params(node: YARP::DefNode).void } + sig { params(node: Prism::DefNode).void } def after_def(node) @stack.pop end - sig { params(node: YARP::ModuleNode).void } + sig { params(node: Prism::ModuleNode).void } def on_module(node) @stack << create_document_symbol( name: node.constant_path.location.slice, @@ -160,11 +160,11 @@ def on_module(node) ) end - sig { params(node: YARP::DefNode).void } + sig { params(node: Prism::DefNode).void } def on_def(node) receiver = node.receiver - if receiver.is_a?(YARP::SelfNode) + if receiver.is_a?(Prism::SelfNode) name = "self.#{node.name}" kind = Constant::SymbolKind::METHOD else @@ -182,12 +182,12 @@ def on_def(node) @stack << symbol end - sig { params(node: YARP::ModuleNode).void } + sig { params(node: Prism::ModuleNode).void } def after_module(node) @stack.pop end - sig { params(node: YARP::InstanceVariableWriteNode).void } + sig { params(node: Prism::InstanceVariableWriteNode).void } def on_instance_variable_write(node) create_document_symbol( name: node.name.to_s, @@ -197,7 +197,7 @@ def on_instance_variable_write(node) ) end - sig { params(node: YARP::ClassVariableWriteNode).void } + sig { params(node: Prism::ClassVariableWriteNode).void } def on_class_variable_write(node) create_document_symbol( name: node.name.to_s, @@ -213,8 +213,8 @@ def on_class_variable_write(node) params( name: String, kind: Integer, - range_location: YARP::Location, - selection_range_location: YARP::Location, + range_location: Prism::Location, + selection_range_location: Prism::Location, ).returns(Interface::DocumentSymbol) end def create_document_symbol(name:, kind:, range_location:, selection_range_location:) diff --git a/lib/ruby_lsp/requests/folding_ranges.rb b/lib/ruby_lsp/requests/folding_ranges.rb index 01943fec0..e2c413de1 100644 --- a/lib/ruby_lsp/requests/folding_ranges.rb +++ b/lib/ruby_lsp/requests/folding_ranges.rb @@ -21,12 +21,12 @@ class FoldingRanges < Listener ResponseType = type_member { { fixed: T::Array[Interface::FoldingRange] } } - sig { params(comments: T::Array[YARP::Comment], emitter: EventEmitter, queue: Thread::Queue).void } + sig { params(comments: T::Array[Prism::Comment], emitter: EventEmitter, queue: Thread::Queue).void } def initialize(comments, emitter, queue) super(emitter, queue) @_response = T.let([], ResponseType) - @requires = T.let([], T::Array[YARP::CallNode]) + @requires = T.let([], T::Array[Prism::CallNode]) @finalized_response = T.let(false, T::Boolean) @comments = comments @@ -68,27 +68,27 @@ def _response @_response end - sig { params(node: YARP::IfNode).void } + sig { params(node: Prism::IfNode).void } def on_if(node) add_statements_range(node) end - sig { params(node: YARP::InNode).void } + sig { params(node: Prism::InNode).void } def on_in(node) add_statements_range(node) end - sig { params(node: YARP::RescueNode).void } + sig { params(node: Prism::RescueNode).void } def on_rescue(node) add_statements_range(node) end - sig { params(node: YARP::WhenNode).void } + sig { params(node: Prism::WhenNode).void } def on_when(node) add_statements_range(node) end - sig { params(node: YARP::InterpolatedStringNode).void } + sig { params(node: Prism::InterpolatedStringNode).void } def on_interpolated_string(node) opening_loc = node.opening_loc closing_loc = node.closing_loc @@ -96,85 +96,85 @@ def on_interpolated_string(node) add_lines_range(opening_loc.start_line, closing_loc.end_line - 1) if opening_loc && closing_loc end - sig { params(node: YARP::ArrayNode).void } + sig { params(node: Prism::ArrayNode).void } def on_array(node) add_simple_range(node) end - sig { params(node: YARP::BlockNode).void } + sig { params(node: Prism::BlockNode).void } def on_block(node) add_simple_range(node) end - sig { params(node: YARP::CaseNode).void } + sig { params(node: Prism::CaseNode).void } def on_case(node) add_simple_range(node) end - sig { params(node: YARP::ClassNode).void } + sig { params(node: Prism::ClassNode).void } def on_class(node) add_simple_range(node) end - sig { params(node: YARP::ModuleNode).void } + sig { params(node: Prism::ModuleNode).void } def on_module(node) add_simple_range(node) end - sig { params(node: YARP::ForNode).void } + sig { params(node: Prism::ForNode).void } def on_for(node) add_simple_range(node) end - sig { params(node: YARP::HashNode).void } + sig { params(node: Prism::HashNode).void } def on_hash(node) add_simple_range(node) end - sig { params(node: YARP::SingletonClassNode).void } + sig { params(node: Prism::SingletonClassNode).void } def on_singleton_class(node) add_simple_range(node) end - sig { params(node: YARP::UnlessNode).void } + sig { params(node: Prism::UnlessNode).void } def on_unless(node) add_simple_range(node) end - sig { params(node: YARP::UntilNode).void } + sig { params(node: Prism::UntilNode).void } def on_until(node) add_simple_range(node) end - sig { params(node: YARP::WhileNode).void } + sig { params(node: Prism::WhileNode).void } def on_while(node) add_simple_range(node) end - sig { params(node: YARP::ElseNode).void } + sig { params(node: Prism::ElseNode).void } def on_else(node) add_simple_range(node) end - sig { params(node: YARP::EnsureNode).void } + sig { params(node: Prism::EnsureNode).void } def on_ensure(node) add_simple_range(node) end - sig { params(node: YARP::BeginNode).void } + sig { params(node: Prism::BeginNode).void } def on_begin(node) add_simple_range(node) end - sig { params(node: YARP::StringConcatNode).void } + sig { params(node: Prism::StringConcatNode).void } def on_string_concat(node) - left = T.let(node.left, YARP::Node) - left = left.left while left.is_a?(YARP::StringConcatNode) + left = T.let(node.left, Prism::Node) + left = left.left while left.is_a?(Prism::StringConcatNode) add_lines_range(left.location.start_line, node.right.location.end_line - 1) end - sig { params(node: YARP::DefNode).void } + sig { params(node: Prism::DefNode).void } def on_def(node) params = node.parameters parameter_loc = params&.location @@ -189,7 +189,7 @@ def on_def(node) end end - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def on_call(node) # If we find a require, don't visit the child nodes (prevent `super`), so that we can keep accumulating into # the `@requires` array and then push the range whenever we find a node that isn't a CallNode @@ -233,7 +233,7 @@ def emit_requires_range @requires.clear end - sig { params(node: YARP::CallNode).returns(T::Boolean) } + sig { params(node: Prism::CallNode).returns(T::Boolean) } def require?(node) message = node.message return false unless message == "require" || message == "require_relative" @@ -244,10 +244,10 @@ def require?(node) arguments = node.arguments&.arguments return false unless arguments - arguments.length == 1 && arguments.first.is_a?(YARP::StringNode) + arguments.length == 1 && arguments.first.is_a?(Prism::StringNode) end - sig { params(node: T.any(YARP::IfNode, YARP::InNode, YARP::RescueNode, YARP::WhenNode)).void } + sig { params(node: T.any(Prism::IfNode, Prism::InNode, Prism::RescueNode, Prism::WhenNode)).void } def add_statements_range(node) statements = node.statements return unless statements @@ -258,7 +258,7 @@ def add_statements_range(node) add_lines_range(node.location.start_line, T.must(body.last).location.end_line) end - sig { params(node: YARP::Node).void } + sig { params(node: Prism::Node).void } def add_simple_range(node) location = node.location add_lines_range(location.start_line, location.end_line - 1) diff --git a/lib/ruby_lsp/requests/hover.rb b/lib/ruby_lsp/requests/hover.rb index f0f5e7cfa..b8d7759a7 100644 --- a/lib/ruby_lsp/requests/hover.rb +++ b/lib/ruby_lsp/requests/hover.rb @@ -21,12 +21,12 @@ class Hover < ExtensibleListener ALLOWED_TARGETS = T.let( [ - YARP::CallNode, - YARP::ConstantReadNode, - YARP::ConstantWriteNode, - YARP::ConstantPathNode, + Prism::CallNode, + Prism::ConstantReadNode, + Prism::ConstantWriteNode, + Prism::ConstantPathNode, ], - T::Array[T.class_of(YARP::Node)], + T::Array[T.class_of(Prism::Node)], ) sig { override.returns(ResponseType) } @@ -69,21 +69,21 @@ def merge_response!(other) self end - sig { params(node: YARP::ConstantReadNode).void } + sig { params(node: Prism::ConstantReadNode).void } def on_constant_read(node) return if DependencyDetector.instance.typechecker generate_hover(node.slice, node.location) end - sig { params(node: YARP::ConstantWriteNode).void } + sig { params(node: Prism::ConstantWriteNode).void } def on_constant_write(node) return if DependencyDetector.instance.typechecker generate_hover(node.name.to_s, node.name_loc) end - sig { params(node: YARP::ConstantPathNode).void } + sig { params(node: Prism::ConstantPathNode).void } def on_constant_path(node) return if DependencyDetector.instance.typechecker @@ -92,7 +92,7 @@ def on_constant_path(node) private - sig { params(name: String, location: YARP::Location).void } + sig { params(name: String, location: Prism::Location).void } def generate_hover(name, location) entries = @index.resolve(name, @nesting) return unless entries diff --git a/lib/ruby_lsp/requests/inlay_hints.rb b/lib/ruby_lsp/requests/inlay_hints.rb index 0a8d2a34d..e728b40be 100644 --- a/lib/ruby_lsp/requests/inlay_hints.rb +++ b/lib/ruby_lsp/requests/inlay_hints.rb @@ -39,7 +39,7 @@ def initialize(range, emitter, message_queue) emitter.register(self, :on_rescue) end - sig { params(node: YARP::RescueNode).void } + sig { params(node: Prism::RescueNode).void } def on_rescue(node) return unless node.exceptions.empty? diff --git a/lib/ruby_lsp/requests/selection_ranges.rb b/lib/ruby_lsp/requests/selection_ranges.rb index 594d121f0..f3fffb572 100644 --- a/lib/ruby_lsp/requests/selection_ranges.rb +++ b/lib/ruby_lsp/requests/selection_ranges.rb @@ -23,7 +23,6 @@ module Requests class SelectionRanges extend T::Sig include Support::Common - sig { params(document: Document).void } def initialize(document) @document = document diff --git a/lib/ruby_lsp/requests/semantic_highlighting.rb b/lib/ruby_lsp/requests/semantic_highlighting.rb index b1ff709e5..27ef835fa 100644 --- a/lib/ruby_lsp/requests/semantic_highlighting.rb +++ b/lib/ruby_lsp/requests/semantic_highlighting.rb @@ -83,7 +83,7 @@ class SemanticHighlighting < Listener class SemanticToken extend T::Sig - sig { returns(YARP::Location) } + sig { returns(Prism::Location) } attr_reader :location sig { returns(Integer) } @@ -95,7 +95,7 @@ class SemanticToken sig { returns(T::Array[Integer]) } attr_reader :modifier - sig { params(location: YARP::Location, length: Integer, type: Integer, modifier: T::Array[Integer]).void } + sig { params(location: Prism::Location, length: Integer, type: Integer, modifier: T::Array[Integer]).void } def initialize(location:, length:, type:, modifier:) @location = location @length = length @@ -154,7 +154,7 @@ def initialize(emitter, message_queue, range: nil) ) end - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def on_call(node) return unless visible?(node, @range) @@ -172,7 +172,7 @@ def on_call(node) add_token(T.must(node.message_loc), type) end - sig { params(node: YARP::ConstantReadNode).void } + sig { params(node: Prism::ConstantReadNode).void } def on_constant_read(node) return unless visible?(node, @range) # When finding a module or class definition, we will have already pushed a token related to this constant. We @@ -183,42 +183,42 @@ def on_constant_read(node) add_token(node.location, :namespace) end - sig { params(node: YARP::ConstantWriteNode).void } + sig { params(node: Prism::ConstantWriteNode).void } def on_constant_write(node) return unless visible?(node, @range) add_token(node.name_loc, :namespace) end - sig { params(node: YARP::ConstantAndWriteNode).void } + sig { params(node: Prism::ConstantAndWriteNode).void } def on_constant_and_write(node) return unless visible?(node, @range) add_token(node.name_loc, :namespace) end - sig { params(node: YARP::ConstantOperatorWriteNode).void } + sig { params(node: Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write(node) return unless visible?(node, @range) add_token(node.name_loc, :namespace) end - sig { params(node: YARP::ConstantOrWriteNode).void } + sig { params(node: Prism::ConstantOrWriteNode).void } def on_constant_or_write(node) return unless visible?(node, @range) add_token(node.name_loc, :namespace) end - sig { params(node: YARP::ConstantTargetNode).void } + sig { params(node: Prism::ConstantTargetNode).void } def on_constant_target(node) return unless visible?(node, @range) add_token(node.location, :namespace) end - sig { params(node: YARP::DefNode).void } + sig { params(node: Prism::DefNode).void } def on_def(node) @current_scope = ParameterScope.new(@current_scope) return unless visible?(node, @range) @@ -226,33 +226,33 @@ def on_def(node) add_token(node.name_loc, :method, [:declaration]) end - sig { params(node: YARP::DefNode).void } + sig { params(node: Prism::DefNode).void } def after_def(node) @current_scope = T.must(@current_scope.parent) end - sig { params(node: YARP::BlockNode).void } + sig { params(node: Prism::BlockNode).void } def on_block(node) @current_scope = ParameterScope.new(@current_scope) end - sig { params(node: YARP::BlockNode).void } + sig { params(node: Prism::BlockNode).void } def after_block(node) @current_scope = T.must(@current_scope.parent) end - sig { params(node: YARP::BlockLocalVariableNode).void } + sig { params(node: Prism::BlockLocalVariableNode).void } def on_block_local_variable(node) add_token(node.location, :variable) end - sig { params(node: YARP::BlockParameterNode).void } + sig { params(node: Prism::BlockParameterNode).void } def on_block_parameter(node) name = node.name @current_scope << name.to_sym if name end - sig { params(node: YARP::KeywordParameterNode).void } + sig { params(node: Prism::KeywordParameterNode).void } def on_keyword_parameter(node) name = node.name @current_scope << name.to_s.delete_suffix(":").to_sym if name @@ -263,7 +263,7 @@ def on_keyword_parameter(node) add_token(location.copy(length: location.length - 1), :parameter) end - sig { params(node: YARP::KeywordRestParameterNode).void } + sig { params(node: Prism::KeywordRestParameterNode).void } def on_keyword_rest_parameter(node) name = node.name @@ -274,7 +274,7 @@ def on_keyword_rest_parameter(node) end end - sig { params(node: YARP::OptionalParameterNode).void } + sig { params(node: Prism::OptionalParameterNode).void } def on_optional_parameter(node) @current_scope << node.name return unless visible?(node, @range) @@ -282,7 +282,7 @@ def on_optional_parameter(node) add_token(node.name_loc, :parameter) end - sig { params(node: YARP::RequiredParameterNode).void } + sig { params(node: Prism::RequiredParameterNode).void } def on_required_parameter(node) @current_scope << node.name return unless visible?(node, @range) @@ -290,7 +290,7 @@ def on_required_parameter(node) add_token(node.location, :parameter) end - sig { params(node: YARP::RestParameterNode).void } + sig { params(node: Prism::RestParameterNode).void } def on_rest_parameter(node) name = node.name @@ -301,21 +301,21 @@ def on_rest_parameter(node) end end - sig { params(node: YARP::SelfNode).void } + sig { params(node: Prism::SelfNode).void } def on_self(node) return unless visible?(node, @range) add_token(node.location, :variable, [:default_library]) end - sig { params(node: YARP::LocalVariableWriteNode).void } + sig { params(node: Prism::LocalVariableWriteNode).void } def on_local_variable_write(node) return unless visible?(node, @range) add_token(node.name_loc, @current_scope.type_for(node.name)) end - sig { params(node: YARP::LocalVariableReadNode).void } + sig { params(node: Prism::LocalVariableReadNode).void } def on_local_variable_read(node) return unless visible?(node, @range) @@ -328,35 +328,35 @@ def on_local_variable_read(node) add_token(node.location, @current_scope.type_for(node.name)) end - sig { params(node: YARP::LocalVariableAndWriteNode).void } + sig { params(node: Prism::LocalVariableAndWriteNode).void } def on_local_variable_and_write(node) return unless visible?(node, @range) add_token(node.name_loc, @current_scope.type_for(node.name)) end - sig { params(node: YARP::LocalVariableOperatorWriteNode).void } + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } def on_local_variable_operator_write(node) return unless visible?(node, @range) add_token(node.name_loc, @current_scope.type_for(node.name)) end - sig { params(node: YARP::LocalVariableOrWriteNode).void } + sig { params(node: Prism::LocalVariableOrWriteNode).void } def on_local_variable_or_write(node) return unless visible?(node, @range) add_token(node.name_loc, @current_scope.type_for(node.name)) end - sig { params(node: YARP::LocalVariableTargetNode).void } + sig { params(node: Prism::LocalVariableTargetNode).void } def on_local_variable_target(node) return unless visible?(node, @range) add_token(node.location, @current_scope.type_for(node.name)) end - sig { params(node: YARP::ClassNode).void } + sig { params(node: Prism::ClassNode).void } def on_class(node) return unless visible?(node, @range) @@ -366,14 +366,14 @@ def on_class(node) add_token(superclass.location, :class) if superclass end - sig { params(node: YARP::ModuleNode).void } + sig { params(node: Prism::ModuleNode).void } def on_module(node) return unless visible?(node, @range) add_token(node.constant_path.location, :namespace, [:declaration]) end - sig { params(location: YARP::Location, type: Symbol, modifiers: T::Array[Symbol]).void } + sig { params(location: Prism::Location, type: Symbol, modifiers: T::Array[Symbol]).void } def add_token(location, type, modifiers = []) length = location.end_offset - location.start_offset modifiers_indices = modifiers.filter_map { |modifier| TOKEN_MODIFIERS[modifier] } @@ -396,12 +396,12 @@ def special_method?(method_name) SPECIAL_RUBY_METHODS.include?(method_name) end - sig { params(node: YARP::CallNode).void } + sig { params(node: Prism::CallNode).void } def process_regexp_locals(node) receiver = node.receiver # The regexp needs to be the receiver of =~ for local variable capture - return unless receiver.is_a?(YARP::RegularExpressionNode) + return unless receiver.is_a?(Prism::RegularExpressionNode) content = receiver.content loc = receiver.content_loc diff --git a/lib/ruby_lsp/requests/support/annotation.rb b/lib/ruby_lsp/requests/support/annotation.rb index 3f659ba0e..de58a7920 100644 --- a/lib/ruby_lsp/requests/support/annotation.rb +++ b/lib/ruby_lsp/requests/support/annotation.rb @@ -17,20 +17,20 @@ def initialize(arity:, receiver: false) @receiver = receiver end - sig { params(node: YARP::CallNode).returns(T::Boolean) } + sig { params(node: Prism::CallNode).returns(T::Boolean) } def match?(node) receiver_matches?(node) && arity_matches?(node) end private - sig { params(node: YARP::CallNode).returns(T::Boolean) } + sig { params(node: Prism::CallNode).returns(T::Boolean) } def receiver_matches?(node) node_receiver = node.receiver (node_receiver && @receiver && node_receiver.location.slice == "T") || (!node_receiver && !@receiver) end - sig { params(node: YARP::CallNode).returns(T::Boolean) } + sig { params(node: Prism::CallNode).returns(T::Boolean) } def arity_matches?(node) node_arity = node.arguments&.arguments&.size || 0 diff --git a/lib/ruby_lsp/requests/support/common.rb b/lib/ruby_lsp/requests/support/common.rb index e9b72277d..75f8da137 100644 --- a/lib/ruby_lsp/requests/support/common.rb +++ b/lib/ruby_lsp/requests/support/common.rb @@ -10,7 +10,7 @@ module Common # cautious of changing anything. extend T::Sig - sig { params(node: YARP::Node).returns(Interface::Range) } + sig { params(node: Prism::Node).returns(Interface::Range) } def range_from_node(node) loc = node.location @@ -23,7 +23,7 @@ def range_from_node(node) ) end - sig { params(location: YARP::Location).returns(Interface::Range) } + sig { params(location: Prism::Location).returns(Interface::Range) } def range_from_location(location) Interface::Range.new( start: Interface::Position.new( @@ -34,7 +34,7 @@ def range_from_location(location) ) end - sig { params(node: T.nilable(YARP::Node), range: T.nilable(T::Range[Integer])).returns(T::Boolean) } + sig { params(node: T.nilable(Prism::Node), range: T.nilable(T::Range[Integer])).returns(T::Boolean) } def visible?(node, range) return true if range.nil? return false if node.nil? @@ -45,7 +45,7 @@ def visible?(node, range) sig do params( - node: YARP::Node, + node: Prism::Node, title: String, command_name: String, arguments: T.nilable(T::Array[T.untyped]), diff --git a/lib/ruby_lsp/requests/support/sorbet.rb b/lib/ruby_lsp/requests/support/sorbet.rb index 1dcd96e5c..35fcb4db1 100644 --- a/lib/ruby_lsp/requests/support/sorbet.rb +++ b/lib/ruby_lsp/requests/support/sorbet.rb @@ -42,7 +42,7 @@ class << self sig do params( - node: YARP::CallNode, + node: Prism::CallNode, ).returns(T::Boolean) end def annotation?(node) diff --git a/ruby-lsp.gemspec b/ruby-lsp.gemspec index 20366604f..7517c8e99 100644 --- a/ruby-lsp.gemspec +++ b/ruby-lsp.gemspec @@ -18,8 +18,8 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.add_dependency("language_server-protocol", "~> 3.17.0") + s.add_dependency("prism", ">= 0.13", "< 0.14") s.add_dependency("sorbet-runtime", ">= 0.5.5685") - s.add_dependency("yarp", ">= 0.12", "< 0.13") s.required_ruby_version = ">= 3.0" end diff --git a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi b/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi index b5edefb27..3dea314d2 100644 --- a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +++ b/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi @@ -7,73 +7,79 @@ # source://minitest-reporters//lib/minitest/reporters.rb#3 module Minitest class << self - # source://minitest/5.19.0/lib/minitest.rb#173 + # source://minitest/5.20.0/lib/minitest.rb#176 def __run(reporter, options); end - # source://minitest/5.19.0/lib/minitest.rb#94 + # source://minitest/5.20.0/lib/minitest.rb#97 def after_run(&block); end - # source://minitest/5.19.0/lib/minitest.rb#66 + # source://minitest/5.20.0/lib/minitest.rb#19 + def allow_fork; end + + # source://minitest/5.20.0/lib/minitest.rb#19 + def allow_fork=(_arg0); end + + # source://minitest/5.20.0/lib/minitest.rb#69 def autorun; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def backtrace_filter; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def backtrace_filter=(_arg0); end - # source://minitest/5.19.0/lib/minitest.rb#18 + # source://minitest/5.20.0/lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest/5.19.0/lib/minitest.rb#1099 + # source://minitest/5.20.0/lib/minitest.rb#1102 def clock_time; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def extensions; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest/5.19.0/lib/minitest.rb#264 + # source://minitest/5.20.0/lib/minitest.rb#267 def filter_backtrace(bt); end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def info_signal; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest/5.19.0/lib/minitest.rb#98 + # source://minitest/5.20.0/lib/minitest.rb#101 def init_plugins(options); end - # source://minitest/5.19.0/lib/minitest.rb#105 + # source://minitest/5.20.0/lib/minitest.rb#108 def load_plugins; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def parallel_executor; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest/5.19.0/lib/minitest.rb#186 + # source://minitest/5.20.0/lib/minitest.rb#189 def process_args(args = T.unsafe(nil)); end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def reporter; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def reporter=(_arg0); end - # source://minitest/5.19.0/lib/minitest.rb#140 + # source://minitest/5.20.0/lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest/5.19.0/lib/minitest.rb#1090 + # source://minitest/5.20.0/lib/minitest.rb#1093 def run_one_method(klass, method_name); end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def seed; end - # source://minitest/5.19.0/lib/minitest.rb#19 + # source://minitest/5.20.0/lib/minitest.rb#19 def seed=(_arg0); end end end diff --git a/sorbet/rbi/gems/parser@3.2.2.3.rbi b/sorbet/rbi/gems/parser@3.2.2.3.rbi index 680c9da48..79fb0cf09 100644 --- a/sorbet/rbi/gems/parser@3.2.2.3.rbi +++ b/sorbet/rbi/gems/parser@3.2.2.3.rbi @@ -7,14 +7,7 @@ # @api public # # source://parser//lib/parser.rb#19 -module Parser - class << self - private - - # source://parser//lib/parser/current.rb#5 - def warn_syntax_deviation(feature, version); end - end -end +module Parser; end # @api public # @@ -1671,9 +1664,6 @@ class Parser::CurrentArgStack def top; end end -# source://parser//lib/parser/current.rb#111 -Parser::CurrentRuby = Parser::Ruby32 - # @api private # # source://parser//lib/parser/deprecation.rb#7 @@ -3315,1798 +3305,6 @@ end # source://parser//lib/parser/rewriter.rb#91 Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) -# source://parser//lib/parser/ruby32.rb#14 -class Parser::Ruby32 < ::Parser::Base - # reduce 0 omitted - # - # source://parser//lib/parser/ruby32.rb#8421 - def _reduce_1(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8475 - def _reduce_10(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9110 - def _reduce_100(val, _values, result); end - - # reduce 101 omitted - # - # source://parser//lib/parser/ruby32.rb#9119 - def _reduce_102(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9125 - def _reduce_103(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9131 - def _reduce_104(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9137 - def _reduce_105(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9143 - def _reduce_106(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9149 - def _reduce_107(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9155 - def _reduce_108(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9161 - def _reduce_109(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8481 - def _reduce_11(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9167 - def _reduce_110(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9177 - def _reduce_111(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9183 - def _reduce_112(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9193 - def _reduce_113(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9200 - def _reduce_114(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9207 - def _reduce_115(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9213 - def _reduce_116(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9219 - def _reduce_117(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9225 - def _reduce_118(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9231 - def _reduce_119(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8498 - def _reduce_12(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9237 - def _reduce_120(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9243 - def _reduce_121(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9249 - def _reduce_122(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9256 - def _reduce_123(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9263 - def _reduce_124(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9269 - def _reduce_125(val, _values, result); end - - # reduce 126 omitted - # - # source://parser//lib/parser/ruby32.rb#9277 - def _reduce_127(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9283 - def _reduce_128(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9289 - def _reduce_129(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8504 - def _reduce_13(val, _values, result); end - - # reduce 134 omitted - # - # source://parser//lib/parser/ruby32.rb#9305 - def _reduce_135(val, _values, result); end - - # reduce 136 omitted - # - # source://parser//lib/parser/ruby32.rb#9313 - def _reduce_137(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9319 - def _reduce_138(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9325 - def _reduce_139(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8510 - def _reduce_14(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8516 - def _reduce_15(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8522 - def _reduce_16(val, _values, result); end - - # reduce 17 omitted - # - # source://parser//lib/parser/ruby32.rb#8530 - def _reduce_18(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8536 - def _reduce_19(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8428 - def _reduce_2(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8542 - def _reduce_20(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8548 - def _reduce_21(val, _values, result); end - - # reduce 210 omitted - # - # source://parser//lib/parser/ruby32.rb#9473 - def _reduce_211(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9479 - def _reduce_212(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9485 - def _reduce_213(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9494 - def _reduce_214(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9503 - def _reduce_215(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9512 - def _reduce_216(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9521 - def _reduce_217(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9529 - def _reduce_218(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9537 - def _reduce_219(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8556 - def _reduce_22(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9543 - def _reduce_220(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9549 - def _reduce_221(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9555 - def _reduce_222(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9561 - def _reduce_223(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9567 - def _reduce_224(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9573 - def _reduce_225(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9579 - def _reduce_226(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9585 - def _reduce_227(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9591 - def _reduce_228(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9597 - def _reduce_229(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8564 - def _reduce_23(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9603 - def _reduce_230(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9609 - def _reduce_231(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9615 - def _reduce_232(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9623 - def _reduce_233(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9629 - def _reduce_234(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9635 - def _reduce_235(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9641 - def _reduce_236(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9647 - def _reduce_237(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9653 - def _reduce_238(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8570 - def _reduce_24(val, _values, result); end - - # reduce 239 omitted - # - # source://parser//lib/parser/ruby32.rb#9661 - def _reduce_240(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9667 - def _reduce_241(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9673 - def _reduce_242(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9679 - def _reduce_243(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9685 - def _reduce_244(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9691 - def _reduce_245(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9697 - def _reduce_246(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9703 - def _reduce_247(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9709 - def _reduce_248(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9715 - def _reduce_249(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8576 - def _reduce_25(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9721 - def _reduce_250(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9727 - def _reduce_251(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9733 - def _reduce_252(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9740 - def _reduce_253(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9747 - def _reduce_254(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9761 - def _reduce_255(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9781 - def _reduce_256(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9795 - def _reduce_257(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8583 - def _reduce_26(val, _values, result); end - - # reduce 262 omitted - # - # source://parser//lib/parser/ruby32.rb#9825 - def _reduce_263(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9831 - def _reduce_264(val, _values, result); end - - # reduce 267 omitted - # - # source://parser//lib/parser/ruby32.rb#9843 - def _reduce_268(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9849 - def _reduce_269(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8590 - def _reduce_27(val, _values, result); end - - # reduce 270 omitted - # - # source://parser//lib/parser/ruby32.rb#9857 - def _reduce_271(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9867 - def _reduce_272(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9873 - def _reduce_273(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9883 - def _reduce_274(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9893 - def _reduce_275(val, _values, result); end - - # reduce 276 omitted - # - # source://parser//lib/parser/ruby32.rb#9901 - def _reduce_277(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8596 - def _reduce_28(val, _values, result); end - - # reduce 279 omitted - # - # source://parser//lib/parser/ruby32.rb#9911 - def _reduce_280(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9917 - def _reduce_281(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9923 - def _reduce_282(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9929 - def _reduce_283(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9935 - def _reduce_284(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9942 - def _reduce_285(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9950 - def _reduce_286(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9956 - def _reduce_287(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9983 - def _reduce_288(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10004 - def _reduce_289(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8602 - def _reduce_29(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10010 - def _reduce_290(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10020 - def _reduce_291(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10026 - def _reduce_292(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10032 - def _reduce_293(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10038 - def _reduce_294(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10044 - def _reduce_295(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10054 - def _reduce_296(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10060 - def _reduce_297(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10066 - def _reduce_298(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10076 - def _reduce_299(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8437 - def _reduce_3(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8612 - def _reduce_30(val, _values, result); end - - # reduce 300 omitted - # - # source://parser//lib/parser/ruby32.rb#10084 - def _reduce_301(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10090 - def _reduce_302(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10096 - def _reduce_303(val, _values, result); end - - # reduce 313 omitted - # - # source://parser//lib/parser/ruby32.rb#10122 - def _reduce_314(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10128 - def _reduce_315(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10134 - def _reduce_316(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10142 - def _reduce_317(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10148 - def _reduce_318(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10154 - def _reduce_319(val, _values, result); end - - # reduce 31 omitted - # - # source://parser//lib/parser/ruby32.rb#8620 - def _reduce_32(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10160 - def _reduce_320(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10166 - def _reduce_321(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10172 - def _reduce_322(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10178 - def _reduce_323(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10184 - def _reduce_324(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10190 - def _reduce_325(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10196 - def _reduce_326(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10202 - def _reduce_327(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10208 - def _reduce_328(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10214 - def _reduce_329(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8626 - def _reduce_33(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10220 - def _reduce_330(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10226 - def _reduce_331(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10234 - def _reduce_332(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10240 - def _reduce_333(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10246 - def _reduce_334(val, _values, result); end - - # reduce 335 omitted - # - # source://parser//lib/parser/ruby32.rb#10258 - def _reduce_336(val, _values, result); end - - # reduce 337 omitted - # - # source://parser//lib/parser/ruby32.rb#10268 - def _reduce_338(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10277 - def _reduce_339(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8633 - def _reduce_34(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10286 - def _reduce_340(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10292 - def _reduce_341(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10298 - def _reduce_342(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10308 - def _reduce_343(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10318 - def _reduce_344(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10328 - def _reduce_345(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10334 - def _reduce_346(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10341 - def _reduce_347(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10357 - def _reduce_348(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10365 - def _reduce_349(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8644 - def _reduce_35(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10377 - def _reduce_350(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10384 - def _reduce_351(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10398 - def _reduce_352(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10410 - def _reduce_353(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10422 - def _reduce_354(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10428 - def _reduce_355(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10434 - def _reduce_356(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10440 - def _reduce_357(val, _values, result); end - - # reduce 358 omitted - # - # source://parser//lib/parser/ruby32.rb#10448 - def _reduce_359(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10454 - def _reduce_360(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10460 - def _reduce_361(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10467 - def _reduce_362(val, _values, result); end - - # reduce 364 omitted - # - # source://parser//lib/parser/ruby32.rb#10479 - def _reduce_365(val, _values, result); end - - # reduce 368 omitted - # - # source://parser//lib/parser/ruby32.rb#10491 - def _reduce_369(val, _values, result); end - - # reduce 36 omitted - # - # source://parser//lib/parser/ruby32.rb#8652 - def _reduce_37(val, _values, result); end - - # reduce 370 omitted - # - # source://parser//lib/parser/ruby32.rb#10504 - def _reduce_371(val, _values, result); end - - # reduce 373 omitted - # - # source://parser//lib/parser/ruby32.rb#10514 - def _reduce_374(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10520 - def _reduce_375(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10526 - def _reduce_376(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10532 - def _reduce_377(val, _values, result); end - - # reduce 378 omitted - # - # source://parser//lib/parser/ruby32.rb#10540 - def _reduce_379(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8658 - def _reduce_38(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10547 - def _reduce_380(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10555 - def _reduce_381(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10561 - def _reduce_382(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10567 - def _reduce_383(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10573 - def _reduce_384(val, _values, result); end - - # reduce 386 omitted - # - # source://parser//lib/parser/ruby32.rb#10583 - def _reduce_387(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10589 - def _reduce_388(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10595 - def _reduce_389(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8664 - def _reduce_39(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10601 - def _reduce_390(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10607 - def _reduce_391(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10613 - def _reduce_392(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10619 - def _reduce_393(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10625 - def _reduce_394(val, _values, result); end - - # reduce 395 omitted - # - # source://parser//lib/parser/ruby32.rb#10633 - def _reduce_396(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10642 - def _reduce_397(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10652 - def _reduce_398(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10660 - def _reduce_399(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8443 - def _reduce_4(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8673 - def _reduce_40(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10669 - def _reduce_400(val, _values, result); end - - # reduce 401 omitted - # - # source://parser//lib/parser/ruby32.rb#10679 - def _reduce_402(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10688 - def _reduce_403(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10698 - def _reduce_404(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10706 - def _reduce_405(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10715 - def _reduce_406(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10722 - def _reduce_407(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10730 - def _reduce_408(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10737 - def _reduce_409(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8682 - def _reduce_41(val, _values, result); end - - # reduce 410 omitted - # - # source://parser//lib/parser/ruby32.rb#10747 - def _reduce_411(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10753 - def _reduce_412(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10759 - def _reduce_413(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10768 - def _reduce_414(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10777 - def _reduce_415(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10783 - def _reduce_416(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10789 - def _reduce_417(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10795 - def _reduce_418(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10801 - def _reduce_419(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8691 - def _reduce_42(val, _values, result); end - - # reduce 420 omitted - # - # source://parser//lib/parser/ruby32.rb#10810 - def _reduce_421(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10819 - def _reduce_422(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10825 - def _reduce_423(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10841 - def _reduce_424(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10849 - def _reduce_425(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10859 - def _reduce_426(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10866 - def _reduce_427(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10873 - def _reduce_428(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10880 - def _reduce_429(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8699 - def _reduce_43(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10887 - def _reduce_430(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10894 - def _reduce_431(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10901 - def _reduce_432(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10909 - def _reduce_433(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10917 - def _reduce_434(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10929 - def _reduce_435(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10940 - def _reduce_436(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10948 - def _reduce_437(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10956 - def _reduce_438(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10964 - def _reduce_439(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8708 - def _reduce_44(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10970 - def _reduce_440(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10978 - def _reduce_441(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10986 - def _reduce_442(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10994 - def _reduce_443(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11000 - def _reduce_444(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11006 - def _reduce_445(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11013 - def _reduce_446(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11020 - def _reduce_447(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11027 - def _reduce_448(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11034 - def _reduce_449(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8722 - def _reduce_45(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11041 - def _reduce_450(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11051 - def _reduce_451(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11058 - def _reduce_452(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11064 - def _reduce_453(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11075 - def _reduce_454(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11082 - def _reduce_455(val, _values, result); end - - # reduce 456 omitted - # - # source://parser//lib/parser/ruby32.rb#11090 - def _reduce_457(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11102 - def _reduce_458(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11110 - def _reduce_459(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8742 - def _reduce_46(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11117 - def _reduce_460(val, _values, result); end - - # reduce 461 omitted - # - # source://parser//lib/parser/ruby32.rb#11125 - def _reduce_462(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11131 - def _reduce_463(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11137 - def _reduce_464(val, _values, result); end - - # reduce 465 omitted - # - # source://parser//lib/parser/ruby32.rb#11145 - def _reduce_466(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11155 - def _reduce_467(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11161 - def _reduce_468(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11167 - def _reduce_469(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8756 - def _reduce_47(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11173 - def _reduce_470(val, _values, result); end - - # reduce 471 omitted - # - # source://parser//lib/parser/ruby32.rb#11181 - def _reduce_472(val, _values, result); end - - # reduce 473 omitted - # - # source://parser//lib/parser/ruby32.rb#11189 - def _reduce_474(val, _values, result); end - - # reduce 475 omitted - # - # source://parser//lib/parser/ruby32.rb#11197 - def _reduce_476(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11204 - def _reduce_477(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8776 - def _reduce_48(val, _values, result); end - - # reduce 479 omitted - # - # source://parser//lib/parser/ruby32.rb#11215 - def _reduce_480(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11223 - def _reduce_481(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11231 - def _reduce_482(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11239 - def _reduce_483(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11246 - def _reduce_484(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11254 - def _reduce_485(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11262 - def _reduce_486(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11270 - def _reduce_487(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11277 - def _reduce_488(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11283 - def _reduce_489(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11289 - def _reduce_490(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11295 - def _reduce_491(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11303 - def _reduce_492(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11311 - def _reduce_493(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11317 - def _reduce_494(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11323 - def _reduce_495(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11330 - def _reduce_496(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11336 - def _reduce_497(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11342 - def _reduce_498(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11348 - def _reduce_499(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8449 - def _reduce_5(val, _values, result); end - - # reduce 49 omitted - # - # source://parser//lib/parser/ruby32.rb#8784 - def _reduce_50(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11354 - def _reduce_500(val, _values, result); end - - # reduce 501 omitted - # - # source://parser//lib/parser/ruby32.rb#11362 - def _reduce_502(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11372 - def _reduce_503(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11382 - def _reduce_504(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11388 - def _reduce_505(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11394 - def _reduce_506(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11400 - def _reduce_507(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11406 - def _reduce_508(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11412 - def _reduce_509(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11418 - def _reduce_510(val, _values, result); end - - # reduce 511 omitted - # - # source://parser//lib/parser/ruby32.rb#11426 - def _reduce_512(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11432 - def _reduce_513(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11438 - def _reduce_514(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11444 - def _reduce_515(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11450 - def _reduce_516(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11456 - def _reduce_517(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11462 - def _reduce_518(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11468 - def _reduce_519(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11474 - def _reduce_520(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11480 - def _reduce_521(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11486 - def _reduce_522(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11492 - def _reduce_523(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11498 - def _reduce_524(val, _values, result); end - - # reduce 525 omitted - # - # source://parser//lib/parser/ruby32.rb#11506 - def _reduce_526(val, _values, result); end - - # reduce 527 omitted - # - # source://parser//lib/parser/ruby32.rb#11514 - def _reduce_528(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11520 - def _reduce_529(val, _values, result); end - - # reduce 52 omitted - # - # source://parser//lib/parser/ruby32.rb#8798 - def _reduce_53(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11526 - def _reduce_530(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11532 - def _reduce_531(val, _values, result); end - - # reduce 534 omitted - # - # source://parser//lib/parser/ruby32.rb#11544 - def _reduce_535(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11550 - def _reduce_536(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8804 - def _reduce_54(val, _values, result); end - - # reduce 544 omitted - # - # source://parser//lib/parser/ruby32.rb#11572 - def _reduce_545(val, _values, result); end - - # reduce 546 omitted - # - # source://parser//lib/parser/ruby32.rb#11580 - def _reduce_547(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11586 - def _reduce_548(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11598 - def _reduce_549(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8810 - def _reduce_55(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11605 - def _reduce_550(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11612 - def _reduce_551(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11618 - def _reduce_552(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11624 - def _reduce_553(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11630 - def _reduce_554(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11645 - def _reduce_555(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11651 - def _reduce_556(val, _values, result); end - - # reduce 558 omitted - # - # source://parser//lib/parser/ruby32.rb#11661 - def _reduce_559(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8816 - def _reduce_56(val, _values, result); end - - # reduce 560 omitted - # - # source://parser//lib/parser/ruby32.rb#11669 - def _reduce_561(val, _values, result); end - - # reduce 564 omitted - # - # source://parser//lib/parser/ruby32.rb#11681 - def _reduce_565(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11687 - def _reduce_566(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11693 - def _reduce_567(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11699 - def _reduce_568(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11706 - def _reduce_569(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8822 - def _reduce_57(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11713 - def _reduce_570(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11719 - def _reduce_571(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11726 - def _reduce_572(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11733 - def _reduce_573(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11739 - def _reduce_574(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11745 - def _reduce_575(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11751 - def _reduce_576(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11757 - def _reduce_577(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11763 - def _reduce_578(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11769 - def _reduce_579(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8834 - def _reduce_58(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11775 - def _reduce_580(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11781 - def _reduce_581(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11787 - def _reduce_582(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11793 - def _reduce_583(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11799 - def _reduce_584(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11805 - def _reduce_585(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11811 - def _reduce_586(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11817 - def _reduce_587(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11823 - def _reduce_588(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11829 - def _reduce_589(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8843 - def _reduce_59(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11835 - def _reduce_590(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11841 - def _reduce_591(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11847 - def _reduce_592(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11853 - def _reduce_593(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11859 - def _reduce_594(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11865 - def _reduce_595(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11872 - def _reduce_596(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11881 - def _reduce_597(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11887 - def _reduce_598(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11893 - def _reduce_599(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8455 - def _reduce_6(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8855 - def _reduce_60(val, _values, result); end - - # reduce 602 omitted - # - # source://parser//lib/parser/ruby32.rb#11905 - def _reduce_603(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11912 - def _reduce_604(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11919 - def _reduce_605(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11925 - def _reduce_606(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11936 - def _reduce_607(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11943 - def _reduce_608(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11950 - def _reduce_609(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11957 - def _reduce_610(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11964 - def _reduce_611(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11970 - def _reduce_612(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11976 - def _reduce_613(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11982 - def _reduce_614(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11988 - def _reduce_615(val, _values, result); end - - # reduce 616 omitted - # - # source://parser//lib/parser/ruby32.rb#11996 - def _reduce_617(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12002 - def _reduce_618(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12008 - def _reduce_619(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12014 - def _reduce_620(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12020 - def _reduce_621(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12026 - def _reduce_622(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12032 - def _reduce_623(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12038 - def _reduce_624(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12044 - def _reduce_625(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12050 - def _reduce_626(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12056 - def _reduce_627(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12062 - def _reduce_628(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12068 - def _reduce_629(val, _values, result); end - - # reduce 62 omitted - # - # source://parser//lib/parser/ruby32.rb#8868 - def _reduce_63(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12074 - def _reduce_630(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12080 - def _reduce_631(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12086 - def _reduce_632(val, _values, result); end - - # reduce 633 omitted - # - # source://parser//lib/parser/ruby32.rb#12094 - def _reduce_634(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12101 - def _reduce_635(val, _values, result); end - - # reduce 636 omitted - # - # source://parser//lib/parser/ruby32.rb#12112 - def _reduce_637(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12120 - def _reduce_638(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12128 - def _reduce_639(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8874 - def _reduce_64(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12134 - def _reduce_640(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12140 - def _reduce_641(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12146 - def _reduce_642(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12152 - def _reduce_643(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12159 - def _reduce_644(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12165 - def _reduce_645(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12171 - def _reduce_646(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12180 - def _reduce_647(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12190 - def _reduce_648(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12198 - def _reduce_649(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8881 - def _reduce_65(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12207 - def _reduce_650(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12215 - def _reduce_651(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12224 - def _reduce_652(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12231 - def _reduce_653(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12239 - def _reduce_654(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12248 - def _reduce_655(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12255 - def _reduce_656(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12263 - def _reduce_657(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12270 - def _reduce_658(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12278 - def _reduce_659(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8891 - def _reduce_66(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12284 - def _reduce_660(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12290 - def _reduce_661(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12296 - def _reduce_662(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12302 - def _reduce_663(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12308 - def _reduce_664(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12314 - def _reduce_665(val, _values, result); end - - # reduce 666 omitted - # - # source://parser//lib/parser/ruby32.rb#12322 - def _reduce_667(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12332 - def _reduce_668(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12339 - def _reduce_669(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8897 - def _reduce_67(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12346 - def _reduce_670(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12352 - def _reduce_671(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12358 - def _reduce_672(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12364 - def _reduce_673(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12379 - def _reduce_674(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12387 - def _reduce_675(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12395 - def _reduce_676(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12402 - def _reduce_677(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12409 - def _reduce_678(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12415 - def _reduce_679(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8904 - def _reduce_68(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12421 - def _reduce_680(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12427 - def _reduce_681(val, _values, result); end - - # reduce 683 omitted - # - # source://parser//lib/parser/ruby32.rb#12437 - def _reduce_684(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12443 - def _reduce_685(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12451 - def _reduce_686(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12459 - def _reduce_687(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12467 - def _reduce_688(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12475 - def _reduce_689(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12481 - def _reduce_690(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12487 - def _reduce_691(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12493 - def _reduce_692(val, _values, result); end - - # reduce 694 omitted - # - # source://parser//lib/parser/ruby32.rb#12503 - def _reduce_695(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12511 - def _reduce_696(val, _values, result); end - - # reduce 698 omitted - # - # source://parser//lib/parser/ruby32.rb#12523 - def _reduce_699(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8461 - def _reduce_7(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12531 - def _reduce_700(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12539 - def _reduce_701(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12545 - def _reduce_702(val, _values, result); end - - # reduce 703 omitted - # - # source://parser//lib/parser/ruby32.rb#12553 - def _reduce_704(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12559 - def _reduce_705(val, _values, result); end - - # reduce 706 omitted - # - # source://parser//lib/parser/ruby32.rb#12567 - def _reduce_707(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12573 - def _reduce_708(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12579 - def _reduce_709(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12585 - def _reduce_710(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12591 - def _reduce_711(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12597 - def _reduce_712(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12603 - def _reduce_713(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12609 - def _reduce_714(val, _values, result); end - - # reduce 71 omitted - # - # source://parser//lib/parser/ruby32.rb#8916 - def _reduce_72(val, _values, result); end - - # reduce 724 omitted - # - # source://parser//lib/parser/ruby32.rb#12639 - def _reduce_725(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12645 - def _reduce_726(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8923 - def _reduce_73(val, _values, result); end - - # reduce 730 omitted - # - # source://parser//lib/parser/ruby32.rb#12659 - def _reduce_731(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12665 - def _reduce_732(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12671 - def _reduce_733(val, _values, result); end - - # reduce 735 omitted - # - # source://parser//lib/parser/ruby32.rb#12681 - def _reduce_736(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8930 - def _reduce_74(val, _values, result); end - - # reduce 739 omitted - # - # source://parser//lib/parser/ruby32.rb#12693 - def _reduce_740(val, _values, result); end - - # reduce 75 omitted - # - # source://parser//lib/parser/ruby32.rb#8939 - def _reduce_76(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8946 - def _reduce_77(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8957 - def _reduce_78(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8964 - def _reduce_79(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8975 - def _reduce_80(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8982 - def _reduce_81(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8993 - def _reduce_82(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9000 - def _reduce_83(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9007 - def _reduce_84(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9014 - def _reduce_85(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9021 - def _reduce_86(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9028 - def _reduce_87(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9034 - def _reduce_88(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9040 - def _reduce_89(val, _values, result); end - - # reduce 8 omitted - # - # source://parser//lib/parser/ruby32.rb#8469 - def _reduce_9(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9046 - def _reduce_90(val, _values, result); end - - # reduce 91 omitted - # - # source://parser//lib/parser/ruby32.rb#9054 - def _reduce_92(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9061 - def _reduce_93(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9068 - def _reduce_94(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9076 - def _reduce_95(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9083 - def _reduce_96(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9091 - def _reduce_97(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9097 - def _reduce_98(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9104 - def _reduce_99(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12699 - def _reduce_none(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#21 - def default_encoding; end - - # source://parser//lib/parser/ruby32.rb#25 - def endless_method_name(name_t); end - - # source://parser//lib/parser/ruby32.rb#38 - def local_pop; end - - # source://parser//lib/parser/ruby32.rb#31 - def local_push; end - - # source://parser//lib/parser/ruby32.rb#45 - def try_declare_numparam(node); end - - # source://parser//lib/parser/ruby32.rb#17 - def version; end -end - -# source://parser//lib/parser/ruby32.rb#8008 -Parser::Ruby32::Racc_arg = T.let(T.unsafe(nil), Array) - -# source://parser//lib/parser/ruby32.rb#8415 -Parser::Ruby32::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# source://parser//lib/parser/ruby32.rb#8025 -Parser::Ruby32::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - # @api public # # source://parser//lib/parser.rb#30 diff --git a/sorbet/rbi/gems/prism@0.13.0.rbi b/sorbet/rbi/gems/prism@0.13.0.rbi new file mode 100644 index 000000000..c35407cd4 --- /dev/null +++ b/sorbet/rbi/gems/prism@0.13.0.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/psych@5.1.0.rbi b/sorbet/rbi/gems/psych@5.1.0.rbi index ee6befbf9..5d4e3c767 100644 --- a/sorbet/rbi/gems/psych@5.1.0.rbi +++ b/sorbet/rbi/gems/psych@5.1.0.rbi @@ -1113,135 +1113,6 @@ class Psych::JSON::Stream < ::Psych::Visitors::JSONTree extend ::Psych::Streaming::ClassMethods end -# The base class for any Node in a YAML parse tree. This class should -# never be instantiated. -# -# source://psych//lib/psych/nodes/node.rb#11 -class Psych::Nodes::Node - include ::Enumerable - - # Create a new Psych::Nodes::Node - # - # @return [Node] a new instance of Node - # - # source://psych//lib/psych/nodes/node.rb#33 - def initialize; end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#67 - def alias?; end - - # The children of this node - # - # source://psych//lib/psych/nodes/node.rb#15 - def children; end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#68 - def document?; end - - # Iterate over each node in the tree. Yields each node to +block+ depth - # first. - # - # source://psych//lib/psych/nodes/node.rb#40 - def each(&block); end - - # The column number where this node ends - # - # source://psych//lib/psych/nodes/node.rb#30 - def end_column; end - - # The column number where this node ends - # - # source://psych//lib/psych/nodes/node.rb#30 - def end_column=(_arg0); end - - # The line number where this node ends - # - # source://psych//lib/psych/nodes/node.rb#27 - def end_line; end - - # The line number where this node ends - # - # source://psych//lib/psych/nodes/node.rb#27 - def end_line=(_arg0); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#69 - def mapping?; end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#70 - def scalar?; end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#71 - def sequence?; end - - # The column number where this node start - # - # source://psych//lib/psych/nodes/node.rb#24 - def start_column; end - - # The column number where this node start - # - # source://psych//lib/psych/nodes/node.rb#24 - def start_column=(_arg0); end - - # The line number where this node start - # - # source://psych//lib/psych/nodes/node.rb#21 - def start_line; end - - # The line number where this node start - # - # source://psych//lib/psych/nodes/node.rb#21 - def start_line=(_arg0); end - - # @return [Boolean] - # - # source://psych//lib/psych/nodes/node.rb#72 - def stream?; end - - # An associated tag - # - # source://psych//lib/psych/nodes/node.rb#18 - def tag; end - - # Convert this node to Ruby. - # - # See also Psych::Visitors::ToRuby - # - # source://psych//lib/psych/nodes/node.rb#49 - def to_ruby(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end - - # Convert this node to YAML. - # - # See also Psych::Visitors::Emitter - # - # source://psych//lib/psych/nodes/node.rb#58 - def to_yaml(io = T.unsafe(nil), options = T.unsafe(nil)); end - - # Convert this node to Ruby. - # - # See also Psych::Visitors::ToRuby - # - # source://psych//lib/psych/nodes/node.rb#49 - def transform(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end - - # Convert this node to YAML. - # - # See also Psych::Visitors::Emitter - # - # source://psych//lib/psych/nodes/node.rb#58 - def yaml(io = T.unsafe(nil), options = T.unsafe(nil)); end -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 diff --git a/sorbet/rbi/gems/rbi@0.1.1.rbi b/sorbet/rbi/gems/rbi@0.1.1.rbi index 02b45b1f7..ddc45ea92 100644 --- a/sorbet/rbi/gems/rbi@0.1.1.rbi +++ b/sorbet/rbi/gems/rbi@0.1.1.rbi @@ -853,7 +853,7 @@ class RBI::Loc class << self # source://rbi//lib/rbi/loc.rb#12 - sig { params(file: ::String, yarp_location: ::YARP::Location).returns(::RBI::Loc) } + sig { params(file: ::String, yarp_location: ::Prism::Location).returns(::RBI::Loc) } def from_yarp(file, yarp_location); end end end @@ -1313,22 +1313,22 @@ class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor def current; end # source://rbi//lib/rbi/parser.rb#805 - sig { override.params(node: ::YARP::AssocNode).void } + sig { override.params(node: ::Prism::AssocNode).void } def visit_assoc_node(node); end # source://rbi//lib/rbi/parser.rb#760 - sig { override.params(node: ::YARP::CallNode).void } + sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end end # source://rbi//lib/rbi/parser.rb#155 class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # source://rbi//lib/rbi/parser.rb#165 - sig { params(source: ::String, comments: T::Array[::YARP::Comment], file: ::String).void } + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } def initialize(source, comments:, file:); end # source://rbi//lib/rbi/parser.rb#162 - sig { returns(T.nilable(::YARP::Node)) } + sig { returns(T.nilable(::Prism::Node)) } def last_node; end # source://rbi//lib/rbi/parser.rb#159 @@ -1336,43 +1336,43 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor def tree; end # source://rbi//lib/rbi/parser.rb#178 - sig { override.params(node: T.nilable(::YARP::Node)).void } + sig { override.params(node: T.nilable(::Prism::Node)).void } def visit(node); end # source://rbi//lib/rbi/parser.rb#295 - sig { params(node: ::YARP::CallNode).void } + sig { params(node: ::Prism::CallNode).void } def visit_call_node(node); end # source://rbi//lib/rbi/parser.rb#186 - sig { override.params(node: ::YARP::ClassNode).void } + sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end # source://rbi//lib/rbi/parser.rb#212 - sig { params(node: T.any(::YARP::ConstantPathWriteNode, ::YARP::ConstantWriteNode)).void } + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } def visit_constant_assign(node); end # source://rbi//lib/rbi/parser.rb#207 - sig { override.params(node: ::YARP::ConstantPathWriteNode).void } + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end # source://rbi//lib/rbi/parser.rb#202 - sig { override.params(node: ::YARP::ConstantWriteNode).void } + sig { override.params(node: ::Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # source://rbi//lib/rbi/parser.rb#245 - sig { override.params(node: ::YARP::DefNode).void } + sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end # source://rbi//lib/rbi/parser.rb#257 - sig { override.params(node: ::YARP::ModuleNode).void } + sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end # source://rbi//lib/rbi/parser.rb#272 - sig { override.params(node: ::YARP::ProgramNode).void } + sig { override.params(node: ::Prism::ProgramNode).void } def visit_program_node(node); end # source://rbi//lib/rbi/parser.rb#281 - sig { override.params(node: ::YARP::SingletonClassNode).void } + sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end private @@ -1380,7 +1380,7 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # Collect all the remaining comments within a node # # source://rbi//lib/rbi/parser.rb#420 - sig { params(node: ::YARP::Node).void } + sig { params(node: ::Prism::Node).void } def collect_dangling_comments(node); end # Collect all the remaining comments after visiting the tree @@ -1402,39 +1402,39 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor def current_sigs_comments; end # source://rbi//lib/rbi/parser.rb#480 - sig { params(node: ::YARP::Node).returns(T::Array[::RBI::Comment]) } + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } def node_comments(node); end # source://rbi//lib/rbi/parser.rb#498 - sig { params(node: ::YARP::Comment).returns(::RBI::Comment) } + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } def parse_comment(node); end # source://rbi//lib/rbi/parser.rb#527 - sig { params(node: T.nilable(::YARP::Node)).returns(T::Array[::RBI::Param]) } + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } def parse_params(node); end # source://rbi//lib/rbi/parser.rb#503 - sig { params(node: T.nilable(::YARP::Node)).returns(T::Array[::RBI::Arg]) } + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } def parse_send_args(node); end # source://rbi//lib/rbi/parser.rb#603 - sig { params(node: ::YARP::CallNode).returns(::RBI::Sig) } + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } def parse_sig(node); end # source://rbi//lib/rbi/parser.rb#613 sig do params( - node: T.any(::YARP::ConstantPathWriteNode, ::YARP::ConstantWriteNode) + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) ).returns(T.nilable(::RBI::Struct)) end def parse_struct(node); end # source://rbi//lib/rbi/parser.rb#663 - sig { params(send: ::YARP::CallNode).void } + sig { params(send: ::Prism::CallNode).void } def parse_tstruct_field(send); end # source://rbi//lib/rbi/parser.rb#700 - sig { params(name: ::String, node: ::YARP::Node).returns(::RBI::Visibility) } + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } def parse_visibility(name, node); end # source://rbi//lib/rbi/parser.rb#714 @@ -1446,12 +1446,12 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor def set_root_tree_loc; end # source://rbi//lib/rbi/parser.rb#738 - sig { params(node: T.nilable(::YARP::Node)).returns(T::Boolean) } + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def type_variable_definition?(node); end end # source://rbi//lib/rbi/parser.rb#124 -class RBI::Parser::Visitor < ::YARP::Visitor +class RBI::Parser::Visitor < ::Prism::Visitor # source://rbi//lib/rbi/parser.rb#128 sig { params(source: ::String, file: ::String).void } def initialize(source, file:); end @@ -1459,15 +1459,15 @@ class RBI::Parser::Visitor < ::YARP::Visitor private # source://rbi//lib/rbi/parser.rb#138 - sig { params(node: ::YARP::Node).returns(::RBI::Loc) } + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } def node_loc(node); end # source://rbi//lib/rbi/parser.rb#143 - sig { params(node: T.nilable(::YARP::Node)).returns(T.nilable(::String)) } + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } def node_string(node); end # source://rbi//lib/rbi/parser.rb#150 - sig { params(node: ::YARP::Node).returns(::String) } + sig { params(node: ::Prism::Node).returns(::String) } def node_string!(node); end end diff --git a/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi index f2425af6d..30a2f760c 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi @@ -5111,7 +5111,7 @@ RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_ALL_ANY_CLASS_OF_ETC = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) @@ -5252,7 +5252,7 @@ RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let RuboCop::AST::NodePattern::Sets::SET_PRESENT_ANY_BLANK_EMPTY = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) @@ -5293,6 +5293,9 @@ RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SIG_HELPERS = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) @@ -5305,6 +5308,12 @@ RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 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) @@ -5323,9 +5332,6 @@ RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = T.let(T.unsafe(nil), # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) diff --git a/sorbet/rbi/gems/rubocop@1.56.4.rbi b/sorbet/rbi/gems/rubocop@1.56.4.rbi index 370ddf2bb..f481148fc 100644 --- a/sorbet/rbi/gems/rubocop@1.56.4.rbi +++ b/sorbet/rbi/gems/rubocop@1.56.4.rbi @@ -9018,14 +9018,19 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # `AllowAdjacentOneLineDefs` configures whether adjacent # one-line definitions are considered an offense. # -# @example EmptyLineBetweenMethodDefs: true (default) -# # checks for empty lines between method definitions. +# @example AllowAdjacentOneLineDefs: false # # # bad -# def a -# end -# def b -# end +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end # @example # # # good @@ -9089,19 +9094,14 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # class ErrorB < BaseError; end # # class ErrorC < BaseError; end -# @example AllowAdjacentOneLineDefs: false +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. # # # bad -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end +# def a +# end +# def b +# end # # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base @@ -11169,22 +11169,16 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # Alternatively you can specify multiple allowed styles. That's done by # passing a list of styles to EnforcedStyles. # -# @example EnforcedHashRocketStyle: key (default) +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. +# # # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } +# do_something(foo: 1, +# bar: 2) # # # good -# { -# :foo => bar, -# :ba => baz -# } +# do_something({foo: 1, +# bar: 2}) # @example EnforcedHashRocketStyle: separator # # bad # { @@ -11303,16 +11297,22 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # # good # do_something(foo: 1, # bar: 2) -# @example EnforcedLastArgumentHashStyle: ignore_explicit -# # Ignore only explicit hashes. -# +# @example EnforcedHashRocketStyle: key (default) # # bad -# do_something(foo: 1, -# bar: 2) +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } # # # good -# do_something({foo: 1, -# bar: 2}) +# { +# :foo => bar, +# :ba => baz +# } # # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base @@ -20358,17 +20358,14 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # Checks for nested method definitions. # -# @example -# -# # bad -# -# # `bar` definition actually produces methods in the same scope -# # as the outer `foo` method. Furthermore, the `bar` method -# # will be redefined every time `foo` is invoked. -# def foo +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do # def bar # end # end +# end # @example # # # good @@ -20431,14 +20428,17 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example AllowedPatterns: ['baz'] -# # good -# def foo(obj) -# obj.do_baz do +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo # def bar # end # end -# end # # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base @@ -28393,22 +28393,9 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # can be used to specify whether method names and symbols should be checked. # Both are enabled by default. # -# @example EnforcedStyle: normalcase (default) -# # bad -# :some_sym_1 -# variable_1 = 1 -# -# def some_method_1; end -# -# def some_method1(arg_1); end -# +# @example AllowedPatterns: ['_v\d+\z'] # # good -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method1(arg1); end +# :some_sym_v1 # @example EnforcedStyle: snake_case # # bad # :some_sym1 @@ -28470,9 +28457,22 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # @example AllowedIdentifiers: [capture3] # # good # expect(Open3).to receive(:capture3) -# @example AllowedPatterns: ['_v\d+\z'] +# @example EnforcedStyle: normalcase (default) +# # bad +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method1(arg_1); end +# # # good -# :some_sym_v1 +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method1(arg1); end # # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base @@ -31463,24 +31463,13 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # `lambda`, `proc`, and `it` are their defaults. # Additional methods can be added to the `AllowedMethods`. # -# @example EnforcedStyle: line_count_based (default) -# # bad - single line block -# items.each do |item| item / 5 end -# -# # good - single line block -# items.each { |item| item / 5 } +# @example AllowedPatterns: ['map'] # -# # bad - multi-line block +# # good # things.map { |thing| # something = thing.some_method # process(something) # } -# -# # good - multi-line block -# things.map do |thing| -# something = thing.some_method -# process(something) -# end # @example EnforcedStyle: semantic # # Prefer `do...end` over `{...}` for procedural blocks. # @@ -31601,14 +31590,25 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # something = thing.some_method # process(something) # } -# @example AllowedPatterns: ['map'] +# @example EnforcedStyle: line_count_based (default) +# # bad - single line block +# items.each do |item| item / 5 end # -# # good +# # good - single line block +# items.each { |item| item / 5 } +# +# # bad - multi-line block # things.map { |thing| # something = thing.some_method # process(something) # } # +# # good - multi-line block +# things.map do |thing| +# something = thing.some_method +# process(something) +# end +# # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle @@ -36357,14 +36357,10 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # if the number of them is less than or equals to # `MaxUnannotatedPlaceholdersAllowed`. # -# @example EnforcedStyle: annotated (default) -# -# # bad -# format('%{greeting}', greeting: 'Hello') -# format('%s', 'Hello') +# @example AllowedPatterns: ['redirect'] # # # good -# format('%s', greeting: 'Hello') +# redirect('foo/%{bar_id}') # @example EnforcedStyle: template # # # bad @@ -36408,10 +36404,14 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # # # bad # redirect('foo/%{bar_id}') -# @example AllowedPatterns: ['redirect'] +# @example EnforcedStyle: annotated (default) +# +# # bad +# format('%{greeting}', greeting: 'Hello') +# format('%s', 'Hello') # # # good -# redirect('foo/%{bar_id}') +# format('%s', greeting: 'Hello') # # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85 class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base @@ -37286,15 +37286,22 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # * either - accepts both shorthand and explicit use of hash literal value # * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash # -# @example EnforcedStyle: ruby19 (default) -# # bad -# {:a => 2} -# {b: 1, :c => 2} +# @example EnforcedShorthandSyntax: consistent +# +# # bad - `foo` and `bar` values can be omitted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} # # # good -# {a: 2, b: 1} -# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol -# {d: 1, 'e' => 2} # technically not forbidden +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} # @example EnforcedStyle: hash_rockets # # bad # {a: 1, b: 2} @@ -37342,22 +37349,15 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good # {foo:, bar:} -# @example EnforcedShorthandSyntax: consistent -# -# # bad - `foo` and `bar` values can be omitted -# {foo: foo, bar: bar} -# -# # bad - `bar` value can be omitted -# {foo:, bar: bar} -# -# # bad - mixed syntaxes -# {foo:, bar: baz} +# @example EnforcedStyle: ruby19 (default) +# # bad +# {:a => 2} +# {b: 1, :c => 2} # # # good -# {foo:, bar:} -# -# # good - can't omit `baz` -# {foo: foo, bar: baz} +# {a: 2, b: 1} +# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol +# {d: 1, 'e' => 2} # technically not forbidden # # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113 class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base @@ -38863,22 +38863,12 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # NOTE: If one of these configuration is set to nil, any capitalization is allowed. # -# @example EnforcedStyle: snake_case (default) -# # The `snake_case` style will enforce that the frozen string literal -# # comment is written in snake case. (Words separated by underscores) +# @example ValueCapitalization: uppercase # # bad # # frozen-string-literal: true # -# module Bar -# # ... -# end -# # # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end +# # frozen-string-literal: TRUE # @example EnforcedStyle: kebab_case # # The `kebab_case` style will enforce that the frozen string literal # # comment is written in kebab case. (Words separated by hyphens) @@ -38931,12 +38921,22 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # # good # # frozen-string-literal: TRUE -# @example ValueCapitalization: uppercase +# @example EnforcedStyle: snake_case (default) +# # The `snake_case` style will enforce that the frozen string literal +# # comment is written in snake case. (Words separated by underscores) # # bad # # frozen-string-literal: true # +# module Bar +# # ... +# end +# # # good -# # frozen-string-literal: TRUE +# # frozen_string_literal: false +# +# module Bar +# # ... +# end # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base @@ -39282,27 +39282,13 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # - Parentheses are required in anonymous arguments, keyword arguments # and block passing in Ruby 3.2. # -# @example EnforcedStyle: require_parentheses (default) -# -# # bad -# array.delete e -# -# # good -# array.delete(e) +# @example AllowParenthesesInStringInterpolation: true # # # good -# # Operators don't need parens -# foo == bar +# "#{t('this.is.good')}" # # # good -# # Setter methods don't need parens -# foo.bar = baz -# -# # okay with `puts` listed in `AllowedMethods` -# puts 'test' -# -# # okay with `^assert` listed in `AllowedPatterns` -# assert_equal 'test', x +# "#{t 'this.is.also.good'}" # @example EnforcedStyle: omit_parentheses # # # bad @@ -39401,13 +39387,27 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # "#{t 'this.is.better'}" -# @example AllowParenthesesInStringInterpolation: true +# @example EnforcedStyle: require_parentheses (default) +# +# # bad +# array.delete e # # # good -# "#{t('this.is.good')}" +# array.delete(e) # # # good -# "#{t 'this.is.also.good'}" +# # Operators don't need parens +# foo == bar +# +# # good +# # Setter methods don't need parens +# foo.bar = baz +# +# # okay with `puts` listed in `AllowedMethods` +# puts 'test' +# +# # okay with `^assert` listed in `AllowedPatterns` +# assert_equal 'test', x # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202 class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base @@ -48869,13 +48869,9 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # `define_method?` methods are allowed by default. # These are customizable with `AllowedMethods` option. # -# @example -# # bad -# something.map { |s| s.upcase } -# something.map { _1.upcase } -# +# @example AllowedPatterns: ['map'] (default) # # good -# something.map(&:upcase) +# something.map { |s| s.upcase } # @example AllowMethodsWithArguments: false (default) # # bad # something.do_something(foo) { |o| o.bar } @@ -48905,9 +48901,13 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # @example AllowedPatterns: [] (default) # # bad # something.map { |s| s.upcase } -# @example AllowedPatterns: ['map'] (default) -# # good +# @example +# # bad # something.map { |s| s.upcase } +# something.map { _1.upcase } +# +# # good +# something.map(&:upcase) # # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#87 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base @@ -49851,26 +49851,10 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods # are allowed by default. These are customizable with `AllowedMethods` option. # -# @example -# # bad -# def foo -# @foo -# end -# -# def bar=(val) -# @bar = val -# end -# -# def self.baz -# @baz -# end -# +# @example AllowedMethods: ['allowed_method'] # # good -# attr_reader :foo -# attr_writer :bar -# -# class << self -# attr_reader :baz +# def allowed_method +# @foo # end # @example ExactNameMatch: true (default) # # good @@ -49923,12 +49907,28 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # def self.foo # @foo # end -# @example AllowedMethods: ['allowed_method'] -# # good -# def allowed_method +# @example +# # bad +# def foo # @foo # end # +# def bar=(val) +# @bar = val +# end +# +# def self.baz +# @baz +# end +# +# # good +# attr_reader :foo +# attr_writer :bar +# +# class << self +# attr_reader :baz +# end +# # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods @@ -54326,10 +54326,10 @@ RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(ni RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#17 -RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::NullPresenter) +RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#16 -RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::NullPresenter) +RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) # This formatter display dots for files with no offenses and # letters for files with problems in the them. In the end it diff --git a/sorbet/rbi/gems/spoom@1.2.4.rbi b/sorbet/rbi/gems/spoom@1.2.4.rbi index 4c3adad5b..8511e8ae6 100644 --- a/sorbet/rbi/gems/spoom@1.2.4.rbi +++ b/sorbet/rbi/gems/spoom@1.2.4.rbi @@ -971,7 +971,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -1311,7 +1311,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -1463,7 +1463,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def module?; end class << self - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -2356,7 +2356,7 @@ class Spoom::Deadcode::Reference < ::T::Struct def method?; end class << self - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -2606,7 +2606,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -2626,7 +2626,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -2834,7 +2834,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -2900,7 +2900,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end # Parse a line formated as `%h %at` into a `Commit` @@ -3012,7 +3012,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -3045,7 +3045,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -3103,7 +3103,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -3128,7 +3128,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -3191,7 +3191,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -3229,7 +3229,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end @@ -3295,7 +3295,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11016/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi index fb10cc0de..abe500ba2 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi @@ -381,7 +381,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.10875/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11066/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/yard@0.9.34.rbi b/sorbet/rbi/gems/yard@0.9.34.rbi index d98489d72..39510918b 100644 --- a/sorbet/rbi/gems/yard@0.9.34.rbi +++ b/sorbet/rbi/gems/yard@0.9.34.rbi @@ -486,51 +486,6 @@ RUBY18 = T.let(T.unsafe(nil), FalseClass) # source://yard//lib/yard.rb#62 RUBY19 = T.let(T.unsafe(nil), TrueClass) -# @private -# -# source://yard//lib/yard/server/rack_adapter.rb#93 -class Rack::Request - # source://rack/2.2.7/lib/rack/request.rb#26 - def initialize(env); end - - # source://rack/2.2.7/lib/rack/request.rb#40 - def delete_param(k); end - - # source://rack/2.2.7/lib/rack/request.rb#31 - def params; end - - # source://rack/2.2.7/lib/rack/request.rb#31 - def query; end - - # source://rack/2.2.7/lib/rack/request.rb#35 - def update_param(k, v); end - - # Returns the value of attribute version_supplied. - # - # source://yard//lib/yard/server/rack_adapter.rb#94 - def version_supplied; end - - # Sets the attribute version_supplied - # - # @param value the value to set the attribute version_supplied to. - # - # source://yard//lib/yard/server/rack_adapter.rb#94 - def version_supplied=(_arg0); end - - # @return [Boolean] - # - # source://yard//lib/yard/server/rack_adapter.rb#96 - def xhr?; end - - class << self - # source://rack/2.2.7/lib/rack/request.rb#16 - def ip_filter; end - - # source://rack/2.2.7/lib/rack/request.rb#16 - def ip_filter=(_arg0); end - end -end - # source://yard//lib/yard/core_ext/string.rb#2 class String include ::Comparable @@ -14380,74 +14335,6 @@ end # source://yard//lib/yard/server/adapter.rb#11 class YARD::Server::NotFoundError < ::RuntimeError; end -# A server adapter to respond to requests using the Rack server infrastructure. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/rack_adapter.rb#52 -class YARD::Server::RackAdapter < ::YARD::Server::Adapter - include ::YARD::Server::HTTPUtils - - # Responds to Rack requests and builds a response with the {Router}. - # - # @return [Array(Numeric,Hash,Array)] the Rack-style response - # @since 0.6.0 - # - # source://yard//lib/yard/server/rack_adapter.rb#57 - def call(env); end - - # Starts the Rack server. This method will pass control to the server and - # block. - # - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/server/rack_adapter.rb#70 - def start; end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/server/rack_adapter.rb#79 - def print_start_message(server); end -end - -# This class wraps the {RackAdapter} into a Rack-compatible middleware. -# See {#initialize} for a list of options to pass via Rack's +#use+ method. -# -# @example Using the RackMiddleware in a Rack application -# libraries = {:mylib => [YARD::Server::LibraryVersion.new('mylib', nil, '/path/to/.yardoc')]} -# use YARD::Server::RackMiddleware, :libraries => libraries -# @note You must pass a +:libraries+ option to the RackMiddleware via +#use+. To -# read about how to return a list of libraries, see {LibraryVersion} or look -# at the example below. -# @since 0.6.0 -# -# source://yard//lib/yard/server/rack_adapter.rb#25 -class YARD::Server::RackMiddleware - # Creates a new Rack-based middleware for serving YARD documentation. - # - # @option opts - # @option opts - # @option opts - # @param app the next Rack middleware in the stack - # @param opts [Hash] a customizable set of options - # @return [RackMiddleware] a new instance of RackMiddleware - # @since 0.6.0 - # - # source://yard//lib/yard/server/rack_adapter.rb#35 - def initialize(app, opts = T.unsafe(nil)); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/rack_adapter.rb#41 - def call(env); end -end - -# source://yard//lib/yard/server/rack_adapter.rb#12 -YARD::Server::RackServer = Rack::Server - # A router class implements the logic used to recognize a request for a specific # URL and run specific {Commands::Base commands}. # diff --git a/sorbet/rbi/gems/yarp@0.12.0.rbi b/sorbet/rbi/gems/yarp@0.12.0.rbi deleted file mode 100644 index a569756bd..000000000 --- a/sorbet/rbi/gems/yarp@0.12.0.rbi +++ /dev/null @@ -1,17544 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `yarp` gem. -# Please instead update this file by running `bin/tapioca gem yarp`. - -# Reopening the YARP module after yarp/node is required so that constant -# reflection APIs will find the constants defined in the node file before these. -# This block is meant to contain extra APIs we define on YARP nodes that aren't -# templated and are meant as convenience methods. -# -# source://yarp//lib/yarp.rb#3 -module YARP - class << self - # Mirror the YARP.dump API by using the serialization API. - def dump(*_arg0); end - - # Mirror the YARP.dump_file API by using the serialization API. - def dump_file(_arg0); end - - # Mirror the YARP.lex API by using the serialization API. - def lex(*_arg0); end - - # Returns an array of tokens that closely resembles that of the Ripper lexer. - # The only difference is that since we don't keep track of lexer state in the - # same way, it's going to always return the NONE state. - # - # source://yarp//lib/yarp/lex_compat.rb#804 - def lex_compat(source, filepath = T.unsafe(nil)); end - - # Mirror the YARP.lex_file API by using the serialization API. - def lex_file(_arg0); end - - # This lexes with the Ripper lex. It drops any space events but otherwise - # returns the same tokens. Raises SyntaxError if the syntax in source is - # invalid. - # - # source://yarp//lib/yarp/lex_compat.rb#811 - def lex_ripper(source); end - - # Load the serialized AST using the source as a reference into a tree. - # - # source://yarp//lib/yarp.rb#380 - def load(source, serialized); end - - # Mirror the YARP.parse API by using the serialization API. - def parse(*_arg0); end - - # Mirror the YARP.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 YARP.parse_lex API by using the serialization API. - def parse_lex(*_arg0); end - - # Mirror the YARP.parse_lex_file API by using the serialization API. - def parse_lex_file(_arg0); end - end -end - -# Represents the use of the `alias` keyword to alias a global variable. -# -# alias $foo $bar -# ^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#13 -class YARP::AliasGlobalVariableNode < ::YARP::Node - # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void - # - # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode - # - # source://yarp//lib/yarp/node.rb#24 - def initialize(new_name, old_name, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#32 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#37 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#47 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#42 - def compact_child_nodes; end - - # def copy: (**params) -> AliasGlobalVariableNode - # - # source://yarp//lib/yarp/node.rb#52 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#37 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#65 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#87 - def human; end - - # source://yarp//lib/yarp/node.rb#74 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#70 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#21 - def keyword_loc; end - - # attr_reader new_name: Node - # - # source://yarp//lib/yarp/node.rb#15 - def new_name; end - - # attr_reader old_name: Node - # - # source://yarp//lib/yarp/node.rb#18 - def old_name; end -end - -# Represents the use of the `alias` keyword to alias a method. -# -# alias foo bar -# ^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#96 -class YARP::AliasMethodNode < ::YARP::Node - # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void - # - # @return [AliasMethodNode] a new instance of AliasMethodNode - # - # source://yarp//lib/yarp/node.rb#107 - def initialize(new_name, old_name, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#115 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#120 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#130 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#125 - def compact_child_nodes; end - - # def copy: (**params) -> AliasMethodNode - # - # source://yarp//lib/yarp/node.rb#135 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#120 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#148 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#170 - def human; end - - # source://yarp//lib/yarp/node.rb#157 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#153 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#104 - def keyword_loc; end - - # attr_reader new_name: Node - # - # source://yarp//lib/yarp/node.rb#98 - def new_name; end - - # attr_reader old_name: Node - # - # source://yarp//lib/yarp/node.rb#101 - def old_name; end -end - -# Represents an alternation pattern in pattern matching. -# -# foo => bar | baz -# ^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#179 -class YARP::AlternationPatternNode < ::YARP::Node - # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - # - # @return [AlternationPatternNode] a new instance of AlternationPatternNode - # - # source://yarp//lib/yarp/node.rb#190 - def initialize(left, right, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#198 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#203 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#213 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#208 - def compact_child_nodes; end - - # def copy: (**params) -> AlternationPatternNode - # - # source://yarp//lib/yarp/node.rb#218 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#203 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#231 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#253 - def human; end - - # source://yarp//lib/yarp/node.rb#240 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://yarp//lib/yarp/node.rb#181 - def left; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#236 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#187 - def operator_loc; end - - # attr_reader right: Node - # - # source://yarp//lib/yarp/node.rb#184 - def right; end -end - -# Represents the use of the `&&` operator or the `and` keyword. -# -# left and right -# ^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#262 -class YARP::AndNode < ::YARP::Node - # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - # - # @return [AndNode] a new instance of AndNode - # - # source://yarp//lib/yarp/node.rb#273 - def initialize(left, right, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#281 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#286 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#296 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#291 - def compact_child_nodes; end - - # def copy: (**params) -> AndNode - # - # source://yarp//lib/yarp/node.rb#301 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#286 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#314 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#336 - def human; end - - # source://yarp//lib/yarp/node.rb#323 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://yarp//lib/yarp/node.rb#264 - def left; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#319 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#270 - def operator_loc; end - - # attr_reader right: Node - # - # source://yarp//lib/yarp/node.rb#267 - def right; end -end - -# Represents a set of arguments to a method or a keyword. -# -# return foo, bar, baz -# ^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#345 -class YARP::ArgumentsNode < ::YARP::Node - # def initialize: (arguments: Array[Node], location: Location) -> void - # - # @return [ArgumentsNode] a new instance of ArgumentsNode - # - # source://yarp//lib/yarp/node.rb#350 - def initialize(arguments, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#356 - def accept(visitor); end - - # attr_reader arguments: Array[Node] - # - # source://yarp//lib/yarp/node.rb#347 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#361 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#371 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#366 - def compact_child_nodes; end - - # def copy: (**params) -> ArgumentsNode - # - # source://yarp//lib/yarp/node.rb#376 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#361 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#387 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#400 - def human; end - - # source://yarp//lib/yarp/node.rb#391 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents an array literal. This can be a regular array using brackets or -# a special array using % like %w or %i. -# -# [1, 2, 3] -# ^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#410 -class YARP::ArrayNode < ::YARP::Node - # def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [ArrayNode] a new instance of ArrayNode - # - # source://yarp//lib/yarp/node.rb#421 - def initialize(elements, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#429 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#434 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#472 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#418 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#444 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#439 - def compact_child_nodes; end - - # def copy: (**params) -> ArrayNode - # - # source://yarp//lib/yarp/node.rb#449 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#434 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#462 - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://yarp//lib/yarp/node.rb#412 - def elements; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#487 - def human; end - - # source://yarp//lib/yarp/node.rb#476 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#467 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#415 - def opening_loc; end -end - -# 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://yarp//lib/yarp/node.rb#508 -class YARP::ArrayPatternNode < ::YARP::Node - # def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [ArrayPatternNode] a new instance of ArrayPatternNode - # - # source://yarp//lib/yarp/node.rb#528 - def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#539 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#544 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#590 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#525 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#559 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#549 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://yarp//lib/yarp/node.rb#510 - def constant; end - - # def copy: (**params) -> ArrayPatternNode - # - # source://yarp//lib/yarp/node.rb#564 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#544 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#580 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#618 - def human; end - - # source://yarp//lib/yarp/node.rb#594 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#585 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#522 - def opening_loc; end - - # attr_reader posts: Array[Node] - # - # source://yarp//lib/yarp/node.rb#519 - def posts; end - - # attr_reader requireds: Array[Node] - # - # source://yarp//lib/yarp/node.rb#513 - def requireds; end - - # attr_reader rest: Node? - # - # source://yarp//lib/yarp/node.rb#516 - def rest; end -end - -# Represents a hash key/value pair. -# -# { a => b } -# ^^^^^^ -# -# source://yarp//lib/yarp/node.rb#627 -class YARP::AssocNode < ::YARP::Node - # def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void - # - # @return [AssocNode] a new instance of AssocNode - # - # source://yarp//lib/yarp/node.rb#638 - def initialize(key, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#646 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#651 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#664 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#656 - def compact_child_nodes; end - - # def copy: (**params) -> AssocNode - # - # source://yarp//lib/yarp/node.rb#669 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#651 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#682 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#708 - def human; end - - # source://yarp//lib/yarp/node.rb#691 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader key: Node - # - # source://yarp//lib/yarp/node.rb#629 - def key; end - - # def operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#687 - def operator; end - - # attr_reader operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#635 - def operator_loc; end - - # attr_reader value: Node? - # - # source://yarp//lib/yarp/node.rb#632 - def value; end -end - -# Represents a splat in a hash literal. -# -# { **foo } -# ^^^^^ -# -# source://yarp//lib/yarp/node.rb#717 -class YARP::AssocSplatNode < ::YARP::Node - # def initialize: (value: Node?, operator_loc: Location, location: Location) -> void - # - # @return [AssocSplatNode] a new instance of AssocSplatNode - # - # source://yarp//lib/yarp/node.rb#725 - def initialize(value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#732 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#737 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#749 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#742 - def compact_child_nodes; end - - # def copy: (**params) -> AssocSplatNode - # - # source://yarp//lib/yarp/node.rb#754 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#737 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#766 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#790 - def human; end - - # source://yarp//lib/yarp/node.rb#775 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#771 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#722 - def operator_loc; end - - # attr_reader value: Node? - # - # source://yarp//lib/yarp/node.rb#719 - def value; end -end - -YARP::BACKEND = T.let(T.unsafe(nil), Symbol) - -# Represents reading a reference to a field in the previous match. -# -# $' -# ^^ -# -# source://yarp//lib/yarp/node.rb#799 -class YARP::BackReferenceReadNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode - # - # source://yarp//lib/yarp/node.rb#801 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#806 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#811 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#821 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#816 - def compact_child_nodes; end - - # def copy: (**params) -> BackReferenceReadNode - # - # source://yarp//lib/yarp/node.rb#826 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#811 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#836 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#848 - def human; end - - # source://yarp//lib/yarp/node.rb#840 - def inspect(inspector = T.unsafe(nil)); 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://yarp//lib/yarp.rb#209 -class YARP::BasicVisitor - # source://yarp//lib/yarp.rb#210 - def visit(node); end - - # source://yarp//lib/yarp.rb#214 - def visit_all(nodes); end - - # source://yarp//lib/yarp.rb#218 - def visit_child_nodes(node); end -end - -# Represents a begin statement. -# -# begin -# foo -# end -# ^^^^^ -# -# source://yarp//lib/yarp/node.rb#859 -class YARP::BeginNode < ::YARP::Node - # def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [BeginNode] a new instance of BeginNode - # - # source://yarp//lib/yarp/node.rb#879 - def initialize(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#890 - def accept(visitor); end - - # def begin_keyword: () -> String? - # - # source://yarp//lib/yarp/node.rb#940 - def begin_keyword; end - - # attr_reader begin_keyword_loc: Location? - # - # source://yarp//lib/yarp/node.rb#861 - def begin_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#899 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#914 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#904 - def compact_child_nodes; end - - # def copy: (**params) -> BeginNode - # - # source://yarp//lib/yarp/node.rb#919 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#899 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#935 - def deconstruct_keys(keys); end - - # attr_reader else_clause: ElseNode? - # - # source://yarp//lib/yarp/node.rb#870 - def else_clause; end - - # def end_keyword: () -> String? - # - # source://yarp//lib/yarp/node.rb#945 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://yarp//lib/yarp/node.rb#876 - def end_keyword_loc; end - - # attr_reader ensure_clause: EnsureNode? - # - # source://yarp//lib/yarp/node.rb#873 - def ensure_clause; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#983 - def human; end - - # source://yarp//lib/yarp/node.rb#949 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader rescue_clause: RescueNode? - # - # source://yarp//lib/yarp/node.rb#867 - def rescue_clause; end - - # source://yarp//lib/yarp/node.rb#894 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#864 - def statements; end -end - -# Represents block method arguments. -# -# bar(&args) -# ^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#992 -class YARP::BlockArgumentNode < ::YARP::Node - # def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void - # - # @return [BlockArgumentNode] a new instance of BlockArgumentNode - # - # source://yarp//lib/yarp/node.rb#1000 - def initialize(expression, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1007 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1012 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1024 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1017 - def compact_child_nodes; end - - # def copy: (**params) -> BlockArgumentNode - # - # source://yarp//lib/yarp/node.rb#1029 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1012 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1041 - def deconstruct_keys(keys); end - - # attr_reader expression: Node? - # - # source://yarp//lib/yarp/node.rb#994 - def expression; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#1065 - def human; end - - # source://yarp//lib/yarp/node.rb#1050 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#1046 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#997 - def operator_loc; end -end - -# Represents a block local variable. -# -# a { |; b| } -# ^ -# -# source://yarp//lib/yarp/node.rb#1074 -class YARP::BlockLocalVariableNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode - # - # source://yarp//lib/yarp/node.rb#1079 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1085 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1090 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1100 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1095 - def compact_child_nodes; end - - # def copy: (**params) -> BlockLocalVariableNode - # - # source://yarp//lib/yarp/node.rb#1105 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1090 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1116 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#1129 - def human; end - - # source://yarp//lib/yarp/node.rb#1120 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#1076 - def name; end -end - -# Represents a block of ruby code. -# -# [1, 2, 3].each { |i| puts x } -# ^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#1138 -class YARP::BlockNode < ::YARP::Node - # def initialize: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [BlockNode] a new instance of BlockNode - # - # source://yarp//lib/yarp/node.rb#1155 - def initialize(locals, parameters, body, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1165 - def accept(visitor); end - - # attr_reader body: Node? - # - # source://yarp//lib/yarp/node.rb#1146 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1170 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#1213 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#1152 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1183 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1175 - def compact_child_nodes; end - - # def copy: (**params) -> BlockNode - # - # source://yarp//lib/yarp/node.rb#1188 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1170 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1203 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#1240 - def human; end - - # source://yarp//lib/yarp/node.rb#1217 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://yarp//lib/yarp/node.rb#1140 - def locals; end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#1208 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#1149 - def opening_loc; end - - # attr_reader parameters: BlockParametersNode? - # - # source://yarp//lib/yarp/node.rb#1143 - def parameters; end -end - -# Represents a block parameter to a method, block, or lambda definition. -# -# def a(&b) -# ^^ -# end -# -# source://yarp//lib/yarp/node.rb#1250 -class YARP::BlockParameterNode < ::YARP::Node - # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - # - # @return [BlockParameterNode] a new instance of BlockParameterNode - # - # source://yarp//lib/yarp/node.rb#1261 - def initialize(name, name_loc, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1269 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1274 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1284 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1279 - def compact_child_nodes; end - - # def copy: (**params) -> BlockParameterNode - # - # source://yarp//lib/yarp/node.rb#1289 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1274 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1302 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#1322 - def human; end - - # source://yarp//lib/yarp/node.rb#1311 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://yarp//lib/yarp/node.rb#1252 - def name; end - - # attr_reader name_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1255 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#1307 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#1258 - def operator_loc; end -end - -# Represents a block's parameters declaration. -# -# -> (a, b = 1; local) { } -# ^^^^^^^^^^^^^^^^^ -# -# foo do |a, b = 1; local| -# ^^^^^^^^^^^^^^^^^ -# end -# -# source://yarp//lib/yarp/node.rb#1335 -class YARP::BlockParametersNode < ::YARP::Node - # def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [BlockParametersNode] a new instance of BlockParametersNode - # - # source://yarp//lib/yarp/node.rb#1349 - def initialize(parameters, locals, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1358 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1363 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#1405 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1346 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1376 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1368 - def compact_child_nodes; end - - # def copy: (**params) -> BlockParametersNode - # - # source://yarp//lib/yarp/node.rb#1381 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1363 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1395 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#1426 - def human; end - - # source://yarp//lib/yarp/node.rb#1409 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Node] - # - # source://yarp//lib/yarp/node.rb#1340 - def locals; end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#1400 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1343 - def opening_loc; end - - # attr_reader parameters: ParametersNode? - # - # source://yarp//lib/yarp/node.rb#1337 - def parameters; end -end - -# Represents the use of the `break` keyword. -# -# break foo -# ^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#1435 -class YARP::BreakNode < ::YARP::Node - # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void - # - # @return [BreakNode] a new instance of BreakNode - # - # source://yarp//lib/yarp/node.rb#1443 - def initialize(arguments, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1450 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#1437 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1455 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1467 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1460 - def compact_child_nodes; end - - # def copy: (**params) -> BreakNode - # - # source://yarp//lib/yarp/node.rb#1472 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1455 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1484 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#1508 - def human; end - - # source://yarp//lib/yarp/node.rb#1493 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#1489 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#1440 - def keyword_loc; end -end - -# Represents the use of the `&&=` operator on a call. -# -# foo.bar &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#1517 -class YARP::CallAndWriteNode < ::YARP::Node - # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [CallAndWriteNode] a new instance of CallAndWriteNode - # - # source://yarp//lib/yarp/node.rb#1552 - def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1568 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#1531 - def arguments; end - - # def call_operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#1618 - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1522 - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1573 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#1633 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1534 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1587 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1578 - def compact_child_nodes; end - - # def copy: (**params) -> CallAndWriteNode - # - # source://yarp//lib/yarp/node.rb#1592 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1573 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1613 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#1683 - def human; end - - # source://yarp//lib/yarp/node.rb#1652 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://yarp//lib/yarp/node.rb#1623 - def message; end - - # attr_reader message_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1525 - def message_loc; end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#1628 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1528 - def opening_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#1648 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#1546 - def operator_loc; end - - # attr_reader read_name: String - # - # source://yarp//lib/yarp/node.rb#1540 - def read_name; end - - # attr_reader receiver: Node? - # - # source://yarp//lib/yarp/node.rb#1519 - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#1638 - def safe_navigation?; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#1549 - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#1643 - def variable_call?; end - - # attr_reader write_name: String - # - # source://yarp//lib/yarp/node.rb#1543 - def write_name; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#1537 - def flags; 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://yarp//lib/yarp/node.rb#1707 -class YARP::CallNode < ::YARP::Node - # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: BlockNode?, flags: Integer, name: String, location: Location) -> void - # - # @return [CallNode] a new instance of CallNode - # - # source://yarp//lib/yarp/node.rb#1736 - def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1750 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#1721 - def arguments; end - - # attr_reader block: BlockNode? - # - # source://yarp//lib/yarp/node.rb#1727 - def block; end - - # def call_operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#1798 - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1712 - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1755 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#1813 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1724 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1769 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1760 - def compact_child_nodes; end - - # def copy: (**params) -> CallNode - # - # source://yarp//lib/yarp/node.rb#1774 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1755 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1793 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#1860 - def human; end - - # source://yarp//lib/yarp/node.rb#1827 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://yarp//lib/yarp/node.rb#1803 - def message; end - - # attr_reader message_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1715 - def message_loc; end - - # attr_reader name: String - # - # source://yarp//lib/yarp/node.rb#1733 - def name; end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#1808 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1718 - def opening_loc; end - - # attr_reader receiver: Node? - # - # source://yarp//lib/yarp/node.rb#1709 - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#1818 - def safe_navigation?; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#1823 - def variable_call?; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#1730 - def flags; end -end - -# source://yarp//lib/yarp/node.rb#12895 -module YARP::CallNodeFlags; end - -# &. operator -# -# source://yarp//lib/yarp/node.rb#12897 -YARP::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) - -# a call that could have been a local variable -# -# source://yarp//lib/yarp/node.rb#12900 -YARP::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) - -# Represents the use of an assignment operator on a call. -# -# foo.bar += baz -# ^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#1869 -class YARP::CallOperatorWriteNode < ::YARP::Node - # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#1907 - def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#1924 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#1883 - def arguments; end - - # def call_operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#1975 - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1874 - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1929 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#1990 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1886 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#1943 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#1934 - def compact_child_nodes; end - - # def copy: (**params) -> CallOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#1948 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#1929 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#1970 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2036 - def human; end - - # source://yarp//lib/yarp/node.rb#2004 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://yarp//lib/yarp/node.rb#1980 - def message; end - - # attr_reader message_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1877 - def message_loc; end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#1985 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#1880 - def opening_loc; end - - # attr_reader operator: Symbol - # - # source://yarp//lib/yarp/node.rb#1898 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#1901 - def operator_loc; end - - # attr_reader read_name: String - # - # source://yarp//lib/yarp/node.rb#1892 - def read_name; end - - # attr_reader receiver: Node? - # - # source://yarp//lib/yarp/node.rb#1871 - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#1995 - def safe_navigation?; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#1904 - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#2000 - def variable_call?; end - - # attr_reader write_name: String - # - # source://yarp//lib/yarp/node.rb#1895 - def write_name; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#1889 - def flags; end -end - -# Represents the use of the `||=` operator on a call. -# -# foo.bar ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#2045 -class YARP::CallOrWriteNode < ::YARP::Node - # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [CallOrWriteNode] a new instance of CallOrWriteNode - # - # source://yarp//lib/yarp/node.rb#2080 - def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2096 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#2059 - def arguments; end - - # def call_operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#2146 - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#2050 - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2101 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#2161 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#2062 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2115 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2106 - def compact_child_nodes; end - - # def copy: (**params) -> CallOrWriteNode - # - # source://yarp//lib/yarp/node.rb#2120 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2101 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2141 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2211 - def human; end - - # source://yarp//lib/yarp/node.rb#2180 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://yarp//lib/yarp/node.rb#2151 - def message; end - - # attr_reader message_loc: Location? - # - # source://yarp//lib/yarp/node.rb#2053 - def message_loc; end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#2156 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#2056 - def opening_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#2176 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#2074 - def operator_loc; end - - # attr_reader read_name: String - # - # source://yarp//lib/yarp/node.rb#2068 - def read_name; end - - # attr_reader receiver: Node? - # - # source://yarp//lib/yarp/node.rb#2047 - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#2166 - def safe_navigation?; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#2077 - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#2171 - def variable_call?; end - - # attr_reader write_name: String - # - # source://yarp//lib/yarp/node.rb#2071 - def write_name; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#2065 - def flags; end -end - -# Represents assigning to a local variable in pattern matching. -# -# foo => [bar => baz] -# ^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#2220 -class YARP::CapturePatternNode < ::YARP::Node - # def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void - # - # @return [CapturePatternNode] a new instance of CapturePatternNode - # - # source://yarp//lib/yarp/node.rb#2231 - def initialize(value, target, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2239 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2244 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2254 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2249 - def compact_child_nodes; end - - # def copy: (**params) -> CapturePatternNode - # - # source://yarp//lib/yarp/node.rb#2259 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2244 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2272 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2294 - def human; end - - # source://yarp//lib/yarp/node.rb#2281 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#2277 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#2228 - def operator_loc; end - - # attr_reader target: Node - # - # source://yarp//lib/yarp/node.rb#2225 - def target; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#2222 - def value; end -end - -# Represents the use of a case statement. -# -# case true -# ^^^^^^^^^ -# when false -# end -# -# source://yarp//lib/yarp/node.rb#2305 -class YARP::CaseNode < ::YARP::Node - # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void - # - # @return [CaseNode] a new instance of CaseNode - # - # source://yarp//lib/yarp/node.rb#2322 - def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2332 - def accept(visitor); end - - # def case_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#2376 - def case_keyword; end - - # attr_reader case_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#2316 - def case_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2337 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2351 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2342 - def compact_child_nodes; end - - # attr_reader conditions: Array[Node] - # - # source://yarp//lib/yarp/node.rb#2310 - def conditions; end - - # attr_reader consequent: ElseNode? - # - # source://yarp//lib/yarp/node.rb#2313 - def consequent; end - - # def copy: (**params) -> CaseNode - # - # source://yarp//lib/yarp/node.rb#2356 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2337 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2371 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#2381 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#2319 - def end_keyword_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2408 - def human; end - - # source://yarp//lib/yarp/node.rb#2385 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader predicate: Node? - # - # source://yarp//lib/yarp/node.rb#2307 - def predicate; end -end - -# Represents a class declaration involving the `class` keyword. -# -# class Foo end -# ^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#2417 -class YARP::ClassNode < ::YARP::Node - # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void - # - # @return [ClassNode] a new instance of ClassNode - # - # source://yarp//lib/yarp/node.rb#2443 - def initialize(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2456 - def accept(visitor); end - - # attr_reader body: Node? - # - # source://yarp//lib/yarp/node.rb#2434 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2461 - def child_nodes; end - - # def class_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#2503 - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#2422 - def class_keyword_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2475 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2466 - def compact_child_nodes; end - - # attr_reader constant_path: Node - # - # source://yarp//lib/yarp/node.rb#2425 - def constant_path; end - - # def copy: (**params) -> ClassNode - # - # source://yarp//lib/yarp/node.rb#2480 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2461 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2498 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#2513 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#2437 - def end_keyword_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2544 - def human; end - - # def inheritance_operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#2508 - def inheritance_operator; end - - # attr_reader inheritance_operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#2428 - def inheritance_operator_loc; end - - # source://yarp//lib/yarp/node.rb#2517 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://yarp//lib/yarp/node.rb#2419 - def locals; end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#2440 - def name; end - - # attr_reader superclass: Node? - # - # source://yarp//lib/yarp/node.rb#2431 - def superclass; end -end - -# Represents the use of the `&&=` operator for assignment to a class variable. -# -# @@target &&= value -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#2553 -class YARP::ClassVariableAndWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode - # - # source://yarp//lib/yarp/node.rb#2567 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2576 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2581 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2591 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2586 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableAndWriteNode - # - # source://yarp//lib/yarp/node.rb#2596 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2581 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2610 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2632 - def human; end - - # source://yarp//lib/yarp/node.rb#2619 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#2555 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#2558 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#2615 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#2561 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#2564 - def value; end -end - -# Represents assigning to a class variable using an operator that isn't `=`. -# -# @@target += value -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#2641 -class YARP::ClassVariableOperatorWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#2658 - def initialize(name, name_loc, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2668 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2673 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2683 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2678 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#2688 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2673 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2703 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2721 - def human; end - - # source://yarp//lib/yarp/node.rb#2707 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#2643 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#2646 - def name_loc; end - - # attr_reader operator: Symbol - # - # source://yarp//lib/yarp/node.rb#2655 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#2649 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#2652 - def value; end -end - -# Represents the use of the `||=` operator for assignment to a class variable. -# -# @@target ||= value -# ^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#2730 -class YARP::ClassVariableOrWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode - # - # source://yarp//lib/yarp/node.rb#2744 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2753 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2758 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2768 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2763 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableOrWriteNode - # - # source://yarp//lib/yarp/node.rb#2773 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2758 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2787 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2809 - def human; end - - # source://yarp//lib/yarp/node.rb#2796 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#2732 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#2735 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#2792 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#2738 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#2741 - def value; end -end - -# Represents referencing a class variable. -# -# @@foo -# ^^^^^ -# -# source://yarp//lib/yarp/node.rb#2818 -class YARP::ClassVariableReadNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode - # - # source://yarp//lib/yarp/node.rb#2823 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2829 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2834 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2844 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2839 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableReadNode - # - # source://yarp//lib/yarp/node.rb#2849 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2834 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2860 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2873 - def human; end - - # source://yarp//lib/yarp/node.rb#2864 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#2820 - def name; end -end - -# Represents writing to a class variable in a context that doesn't have an explicit value. -# -# @@foo, @@bar = baz -# ^^^^^ ^^^^^ -# -# source://yarp//lib/yarp/node.rb#2882 -class YARP::ClassVariableTargetNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode - # - # source://yarp//lib/yarp/node.rb#2887 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2893 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2898 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2908 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2903 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableTargetNode - # - # source://yarp//lib/yarp/node.rb#2913 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2898 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#2924 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#2937 - def human; end - - # source://yarp//lib/yarp/node.rb#2928 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#2884 - def name; end -end - -# Represents writing to a class variable. -# -# @@foo = 1 -# ^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#2946 -class YARP::ClassVariableWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void - # - # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode - # - # source://yarp//lib/yarp/node.rb#2960 - def initialize(name, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#2969 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2974 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#2984 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#2979 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableWriteNode - # - # source://yarp//lib/yarp/node.rb#2989 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#2974 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3003 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3025 - def human; end - - # source://yarp//lib/yarp/node.rb#3012 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#2948 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#2951 - def name_loc; end - - # def operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#3008 - def operator; end - - # attr_reader operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#2957 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#2954 - def value; end -end - -# This represents a comment that was encountered during parsing. -# -# source://yarp//lib/yarp.rb#145 -class YARP::Comment - # @return [Comment] a new instance of Comment - # - # source://yarp//lib/yarp.rb#150 - def initialize(type, location); end - - # source://yarp//lib/yarp.rb#155 - def deconstruct_keys(keys); end - - # source://yarp//lib/yarp.rb#164 - def inspect; end - - # Returns the value of attribute location. - # - # source://yarp//lib/yarp.rb#148 - def location; end - - # Returns true if the comment happens on the same line as other code and false if the comment is by itself - # - # @return [Boolean] - # - # source://yarp//lib/yarp.rb#160 - def trailing?; end - - # Returns the value of attribute type. - # - # source://yarp//lib/yarp.rb#148 - def type; end -end - -# source://yarp//lib/yarp.rb#146 -YARP::Comment::TYPES = T.let(T.unsafe(nil), Array) - -# Represents the use of the `&&=` operator for assignment to a constant. -# -# Target &&= value -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3034 -class YARP::ConstantAndWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode - # - # source://yarp//lib/yarp/node.rb#3048 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3057 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3062 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3072 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3067 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantAndWriteNode - # - # source://yarp//lib/yarp/node.rb#3077 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3062 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3091 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3113 - def human; end - - # source://yarp//lib/yarp/node.rb#3100 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#3036 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#3039 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#3096 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#3042 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#3045 - def value; end -end - -# Represents assigning to a constant using an operator that isn't `=`. -# -# Target += value -# ^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3122 -class YARP::ConstantOperatorWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#3139 - def initialize(name, name_loc, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3149 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3154 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3164 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3159 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#3169 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3154 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3184 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3202 - def human; end - - # source://yarp//lib/yarp/node.rb#3188 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#3124 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#3127 - def name_loc; end - - # attr_reader operator: Symbol - # - # source://yarp//lib/yarp/node.rb#3136 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#3130 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#3133 - def value; end -end - -# Represents the use of the `||=` operator for assignment to a constant. -# -# Target ||= value -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3211 -class YARP::ConstantOrWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode - # - # source://yarp//lib/yarp/node.rb#3225 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3234 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3239 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3249 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3244 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantOrWriteNode - # - # source://yarp//lib/yarp/node.rb#3254 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3239 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3268 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3290 - def human; end - - # source://yarp//lib/yarp/node.rb#3277 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#3213 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#3216 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#3273 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#3219 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#3222 - def value; end -end - -# Represents the use of the `&&=` operator for assignment to a constant path. -# -# Parent::Child &&= value -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3299 -class YARP::ConstantPathAndWriteNode < ::YARP::Node - # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode - # - # source://yarp//lib/yarp/node.rb#3310 - def initialize(target, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3318 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3323 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3333 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3328 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathAndWriteNode - # - # source://yarp//lib/yarp/node.rb#3338 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3323 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3351 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3373 - def human; end - - # source://yarp//lib/yarp/node.rb#3360 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#3356 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#3304 - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://yarp//lib/yarp/node.rb#3301 - def target; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#3307 - def value; end -end - -# Represents accessing a constant through a path of `::` operators. -# -# Foo::Bar -# ^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3382 -class YARP::ConstantPathNode < ::YARP::Node - # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void - # - # @return [ConstantPathNode] a new instance of ConstantPathNode - # - # source://yarp//lib/yarp/node.rb#3393 - def initialize(parent, child, delimiter_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3401 - def accept(visitor); end - - # attr_reader child: Node - # - # source://yarp//lib/yarp/node.rb#3387 - def child; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3406 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3419 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3411 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathNode - # - # source://yarp//lib/yarp/node.rb#3424 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3406 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3437 - def deconstruct_keys(keys); end - - # def delimiter: () -> String - # - # source://yarp//lib/yarp/node.rb#3442 - def delimiter; end - - # attr_reader delimiter_loc: Location - # - # source://yarp//lib/yarp/node.rb#3390 - def delimiter_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3463 - def human; end - - # source://yarp//lib/yarp/node.rb#3446 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader parent: Node? - # - # source://yarp//lib/yarp/node.rb#3384 - def parent; end -end - -# Represents assigning to a constant path using an operator that isn't `=`. -# -# Parent::Child += value -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3472 -class YARP::ConstantPathOperatorWriteNode < ::YARP::Node - # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#3486 - def initialize(target, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3495 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3500 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3510 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3505 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#3515 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3500 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3529 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3547 - def human; end - - # source://yarp//lib/yarp/node.rb#3533 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader operator: Symbol - # - # source://yarp//lib/yarp/node.rb#3483 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#3477 - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://yarp//lib/yarp/node.rb#3474 - def target; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#3480 - def value; end -end - -# Represents the use of the `||=` operator for assignment to a constant path. -# -# Parent::Child ||= value -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3556 -class YARP::ConstantPathOrWriteNode < ::YARP::Node - # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode - # - # source://yarp//lib/yarp/node.rb#3567 - def initialize(target, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3575 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3580 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3590 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3585 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathOrWriteNode - # - # source://yarp//lib/yarp/node.rb#3595 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3580 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3608 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3630 - def human; end - - # source://yarp//lib/yarp/node.rb#3617 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#3613 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#3561 - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://yarp//lib/yarp/node.rb#3558 - def target; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#3564 - def value; end -end - -# Represents writing to a constant path in a context that doesn't have an explicit value. -# -# Foo::Foo, Bar::Bar = baz -# ^^^^^^^^ ^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3639 -class YARP::ConstantPathTargetNode < ::YARP::Node - # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void - # - # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode - # - # source://yarp//lib/yarp/node.rb#3650 - def initialize(parent, child, delimiter_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3658 - def accept(visitor); end - - # attr_reader child: Node - # - # source://yarp//lib/yarp/node.rb#3644 - def child; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3663 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3676 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3668 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathTargetNode - # - # source://yarp//lib/yarp/node.rb#3681 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3663 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3694 - def deconstruct_keys(keys); end - - # def delimiter: () -> String - # - # source://yarp//lib/yarp/node.rb#3699 - def delimiter; end - - # attr_reader delimiter_loc: Location - # - # source://yarp//lib/yarp/node.rb#3647 - def delimiter_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3720 - def human; end - - # source://yarp//lib/yarp/node.rb#3703 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader parent: Node? - # - # source://yarp//lib/yarp/node.rb#3641 - def parent; end -end - -# Represents writing to a constant path. -# -# ::Foo = 1 -# ^^^^^^^^^ -# -# Foo::Bar = 1 -# ^^^^^^^^^^^^ -# -# ::Foo::Bar = 1 -# ^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3735 -class YARP::ConstantPathWriteNode < ::YARP::Node - # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode - # - # source://yarp//lib/yarp/node.rb#3746 - def initialize(target, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3754 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3759 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3769 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3764 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathWriteNode - # - # source://yarp//lib/yarp/node.rb#3774 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3759 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3787 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3809 - def human; end - - # source://yarp//lib/yarp/node.rb#3796 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#3792 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#3740 - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://yarp//lib/yarp/node.rb#3737 - def target; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#3743 - def value; end -end - -# Represents referencing a constant. -# -# Foo -# ^^^ -# -# source://yarp//lib/yarp/node.rb#3818 -class YARP::ConstantReadNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [ConstantReadNode] a new instance of ConstantReadNode - # - # source://yarp//lib/yarp/node.rb#3823 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3829 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3834 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3844 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3839 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantReadNode - # - # source://yarp//lib/yarp/node.rb#3849 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3834 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3860 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3873 - def human; end - - # source://yarp//lib/yarp/node.rb#3864 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#3820 - def name; end -end - -# Represents writing to a constant in a context that doesn't have an explicit value. -# -# Foo, Bar = baz -# ^^^ ^^^ -# -# source://yarp//lib/yarp/node.rb#3882 -class YARP::ConstantTargetNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [ConstantTargetNode] a new instance of ConstantTargetNode - # - # source://yarp//lib/yarp/node.rb#3887 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3893 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3898 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3908 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3903 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantTargetNode - # - # source://yarp//lib/yarp/node.rb#3913 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3898 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#3924 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#3937 - def human; end - - # source://yarp//lib/yarp/node.rb#3928 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#3884 - def name; end -end - -# Represents writing to a constant. -# -# Foo = 1 -# ^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#3946 -class YARP::ConstantWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - # - # @return [ConstantWriteNode] a new instance of ConstantWriteNode - # - # source://yarp//lib/yarp/node.rb#3960 - def initialize(name, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#3969 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3974 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#3984 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#3979 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantWriteNode - # - # source://yarp//lib/yarp/node.rb#3989 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#3974 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4003 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4025 - def human; end - - # source://yarp//lib/yarp/node.rb#4012 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#3948 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#3951 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#4008 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#3957 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#3954 - def value; end -end - -# source://yarp//lib/yarp/node.rb#14408 -module YARP::DSL - private - - # Create a new AliasGlobalVariableNode node - # - # source://yarp//lib/yarp/node.rb#14417 - def AliasGlobalVariableNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end - - # Create a new AliasMethodNode node - # - # source://yarp//lib/yarp/node.rb#14422 - def AliasMethodNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end - - # Create a new AlternationPatternNode node - # - # source://yarp//lib/yarp/node.rb#14427 - def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end - - # Create a new AndNode node - # - # source://yarp//lib/yarp/node.rb#14432 - def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end - - # Create a new ArgumentsNode node - # - # source://yarp//lib/yarp/node.rb#14437 - def ArgumentsNode(arguments, location = T.unsafe(nil)); end - - # Create a new ArrayNode node - # - # source://yarp//lib/yarp/node.rb#14442 - def ArrayNode(elements, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new ArrayPatternNode node - # - # source://yarp//lib/yarp/node.rb#14447 - def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new AssocNode node - # - # source://yarp//lib/yarp/node.rb#14452 - def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new AssocSplatNode node - # - # source://yarp//lib/yarp/node.rb#14457 - def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end - - # Create a new BackReferenceReadNode node - # - # source://yarp//lib/yarp/node.rb#14462 - def BackReferenceReadNode(location = T.unsafe(nil)); end - - # Create a new BeginNode node - # - # source://yarp//lib/yarp/node.rb#14467 - def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new BlockArgumentNode node - # - # source://yarp//lib/yarp/node.rb#14472 - def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end - - # Create a new BlockLocalVariableNode node - # - # source://yarp//lib/yarp/node.rb#14477 - def BlockLocalVariableNode(name, location = T.unsafe(nil)); end - - # Create a new BlockNode node - # - # source://yarp//lib/yarp/node.rb#14482 - def BlockNode(locals, parameters, body, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new BlockParameterNode node - # - # source://yarp//lib/yarp/node.rb#14487 - def BlockParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end - - # Create a new BlockParametersNode node - # - # source://yarp//lib/yarp/node.rb#14492 - def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new BreakNode node - # - # source://yarp//lib/yarp/node.rb#14497 - def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end - - # Create a new CallAndWriteNode node - # - # source://yarp//lib/yarp/node.rb#14502 - def CallAndWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new CallNode node - # - # source://yarp//lib/yarp/node.rb#14507 - def CallNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location = T.unsafe(nil)); end - - # Create a new CallOperatorWriteNode node - # - # source://yarp//lib/yarp/node.rb#14512 - def CallOperatorWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new CallOrWriteNode node - # - # source://yarp//lib/yarp/node.rb#14517 - def CallOrWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new CapturePatternNode node - # - # source://yarp//lib/yarp/node.rb#14522 - def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end - - # Create a new CaseNode node - # - # source://yarp//lib/yarp/node.rb#14527 - def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new ClassNode node - # - # source://yarp//lib/yarp/node.rb#14532 - def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location = T.unsafe(nil)); end - - # Create a new ClassVariableAndWriteNode node - # - # source://yarp//lib/yarp/node.rb#14537 - def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ClassVariableOperatorWriteNode node - # - # source://yarp//lib/yarp/node.rb#14542 - def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new ClassVariableOrWriteNode node - # - # source://yarp//lib/yarp/node.rb#14547 - def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ClassVariableReadNode node - # - # source://yarp//lib/yarp/node.rb#14552 - def ClassVariableReadNode(name, location = T.unsafe(nil)); end - - # Create a new ClassVariableTargetNode node - # - # source://yarp//lib/yarp/node.rb#14557 - def ClassVariableTargetNode(name, location = T.unsafe(nil)); end - - # Create a new ClassVariableWriteNode node - # - # source://yarp//lib/yarp/node.rb#14562 - def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new ConstantAndWriteNode node - # - # source://yarp//lib/yarp/node.rb#14567 - def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantOperatorWriteNode node - # - # source://yarp//lib/yarp/node.rb#14572 - def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new ConstantOrWriteNode node - # - # source://yarp//lib/yarp/node.rb#14577 - def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantPathAndWriteNode node - # - # source://yarp//lib/yarp/node.rb#14582 - def ConstantPathAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantPathNode node - # - # source://yarp//lib/yarp/node.rb#14587 - def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end - - # Create a new ConstantPathOperatorWriteNode node - # - # source://yarp//lib/yarp/node.rb#14592 - def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new ConstantPathOrWriteNode node - # - # source://yarp//lib/yarp/node.rb#14597 - def ConstantPathOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantPathTargetNode node - # - # source://yarp//lib/yarp/node.rb#14602 - def ConstantPathTargetNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end - - # Create a new ConstantPathWriteNode node - # - # source://yarp//lib/yarp/node.rb#14607 - def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantReadNode node - # - # source://yarp//lib/yarp/node.rb#14612 - def ConstantReadNode(name, location = T.unsafe(nil)); end - - # Create a new ConstantTargetNode node - # - # source://yarp//lib/yarp/node.rb#14617 - def ConstantTargetNode(name, location = T.unsafe(nil)); end - - # Create a new ConstantWriteNode node - # - # source://yarp//lib/yarp/node.rb#14622 - def ConstantWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new DefNode node - # - # source://yarp//lib/yarp/node.rb#14627 - def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new DefinedNode node - # - # source://yarp//lib/yarp/node.rb#14632 - def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = T.unsafe(nil)); end - - # Create a new ElseNode node - # - # source://yarp//lib/yarp/node.rb#14637 - def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new EmbeddedStatementsNode node - # - # source://yarp//lib/yarp/node.rb#14642 - def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end - - # Create a new EmbeddedVariableNode node - # - # source://yarp//lib/yarp/node.rb#14647 - def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end - - # Create a new EnsureNode node - # - # source://yarp//lib/yarp/node.rb#14652 - def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new FalseNode node - # - # source://yarp//lib/yarp/node.rb#14657 - def FalseNode(location = T.unsafe(nil)); end - - # Create a new FindPatternNode node - # - # source://yarp//lib/yarp/node.rb#14662 - def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new FlipFlopNode node - # - # source://yarp//lib/yarp/node.rb#14667 - def FlipFlopNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end - - # Create a new FloatNode node - # - # source://yarp//lib/yarp/node.rb#14672 - def FloatNode(location = T.unsafe(nil)); end - - # Create a new ForNode node - # - # source://yarp//lib/yarp/node.rb#14677 - def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new ForwardingArgumentsNode node - # - # source://yarp//lib/yarp/node.rb#14682 - def ForwardingArgumentsNode(location = T.unsafe(nil)); end - - # Create a new ForwardingParameterNode node - # - # source://yarp//lib/yarp/node.rb#14687 - def ForwardingParameterNode(location = T.unsafe(nil)); end - - # Create a new ForwardingSuperNode node - # - # source://yarp//lib/yarp/node.rb#14692 - def ForwardingSuperNode(block, location = T.unsafe(nil)); end - - # Create a new GlobalVariableAndWriteNode node - # - # source://yarp//lib/yarp/node.rb#14697 - def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new GlobalVariableOperatorWriteNode node - # - # source://yarp//lib/yarp/node.rb#14702 - def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new GlobalVariableOrWriteNode node - # - # source://yarp//lib/yarp/node.rb#14707 - def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new GlobalVariableReadNode node - # - # source://yarp//lib/yarp/node.rb#14712 - def GlobalVariableReadNode(name, location = T.unsafe(nil)); end - - # Create a new GlobalVariableTargetNode node - # - # source://yarp//lib/yarp/node.rb#14717 - def GlobalVariableTargetNode(name, location = T.unsafe(nil)); end - - # Create a new GlobalVariableWriteNode node - # - # source://yarp//lib/yarp/node.rb#14722 - def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new HashNode node - # - # source://yarp//lib/yarp/node.rb#14727 - def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end - - # Create a new HashPatternNode node - # - # source://yarp//lib/yarp/node.rb#14732 - def HashPatternNode(constant, assocs, kwrest, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new IfNode node - # - # source://yarp//lib/yarp/node.rb#14737 - def IfNode(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new ImaginaryNode node - # - # source://yarp//lib/yarp/node.rb#14742 - def ImaginaryNode(numeric, location = T.unsafe(nil)); end - - # Create a new ImplicitNode node - # - # source://yarp//lib/yarp/node.rb#14747 - def ImplicitNode(value, location = T.unsafe(nil)); end - - # Create a new InNode node - # - # source://yarp//lib/yarp/node.rb#14752 - def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end - - # Create a new InstanceVariableAndWriteNode node - # - # source://yarp//lib/yarp/node.rb#14757 - def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new InstanceVariableOperatorWriteNode node - # - # source://yarp//lib/yarp/node.rb#14762 - def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new InstanceVariableOrWriteNode node - # - # source://yarp//lib/yarp/node.rb#14767 - def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new InstanceVariableReadNode node - # - # source://yarp//lib/yarp/node.rb#14772 - def InstanceVariableReadNode(name, location = T.unsafe(nil)); end - - # Create a new InstanceVariableTargetNode node - # - # source://yarp//lib/yarp/node.rb#14777 - def InstanceVariableTargetNode(name, location = T.unsafe(nil)); end - - # Create a new InstanceVariableWriteNode node - # - # source://yarp//lib/yarp/node.rb#14782 - def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new IntegerNode node - # - # source://yarp//lib/yarp/node.rb#14787 - def IntegerNode(flags, location = T.unsafe(nil)); end - - # Create a new InterpolatedMatchLastLineNode node - # - # source://yarp//lib/yarp/node.rb#14792 - def InterpolatedMatchLastLineNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end - - # Create a new InterpolatedRegularExpressionNode node - # - # source://yarp//lib/yarp/node.rb#14797 - def InterpolatedRegularExpressionNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end - - # Create a new InterpolatedStringNode node - # - # source://yarp//lib/yarp/node.rb#14802 - def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end - - # Create a new InterpolatedSymbolNode node - # - # source://yarp//lib/yarp/node.rb#14807 - def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end - - # Create a new InterpolatedXStringNode node - # - # source://yarp//lib/yarp/node.rb#14812 - def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end - - # Create a new KeywordHashNode node - # - # source://yarp//lib/yarp/node.rb#14817 - def KeywordHashNode(elements, location = T.unsafe(nil)); end - - # Create a new KeywordParameterNode node - # - # source://yarp//lib/yarp/node.rb#14822 - def KeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end - - # Create a new KeywordRestParameterNode node - # - # source://yarp//lib/yarp/node.rb#14827 - def KeywordRestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end - - # Create a new LambdaNode node - # - # source://yarp//lib/yarp/node.rb#14832 - def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, location = T.unsafe(nil)); end - - # Create a new LocalVariableAndWriteNode node - # - # source://yarp//lib/yarp/node.rb#14837 - def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableOperatorWriteNode node - # - # source://yarp//lib/yarp/node.rb#14842 - def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableOrWriteNode node - # - # source://yarp//lib/yarp/node.rb#14847 - def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableReadNode node - # - # source://yarp//lib/yarp/node.rb#14852 - def LocalVariableReadNode(name, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableTargetNode node - # - # source://yarp//lib/yarp/node.rb#14857 - def LocalVariableTargetNode(name, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableWriteNode node - # - # source://yarp//lib/yarp/node.rb#14862 - def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new Location object - # - # source://yarp//lib/yarp/node.rb#14412 - def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end - - # Create a new MatchLastLineNode node - # - # source://yarp//lib/yarp/node.rb#14867 - def MatchLastLineNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end - - # Create a new MatchPredicateNode node - # - # source://yarp//lib/yarp/node.rb#14872 - def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end - - # Create a new MatchRequiredNode node - # - # source://yarp//lib/yarp/node.rb#14877 - def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end - - # Create a new MatchWriteNode node - # - # source://yarp//lib/yarp/node.rb#14882 - def MatchWriteNode(call, locals, location = T.unsafe(nil)); end - - # Create a new MissingNode node - # - # source://yarp//lib/yarp/node.rb#14887 - def MissingNode(location = T.unsafe(nil)); end - - # Create a new ModuleNode node - # - # source://yarp//lib/yarp/node.rb#14892 - def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = T.unsafe(nil)); end - - # Create a new MultiTargetNode node - # - # source://yarp//lib/yarp/node.rb#14897 - def MultiTargetNode(targets, lparen_loc, rparen_loc, location = T.unsafe(nil)); end - - # Create a new MultiWriteNode node - # - # source://yarp//lib/yarp/node.rb#14902 - def MultiWriteNode(targets, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new NextNode node - # - # source://yarp//lib/yarp/node.rb#14907 - def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end - - # Create a new NilNode node - # - # source://yarp//lib/yarp/node.rb#14912 - def NilNode(location = T.unsafe(nil)); end - - # Create a new NoKeywordsParameterNode node - # - # source://yarp//lib/yarp/node.rb#14917 - def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end - - # Create a new NumberedReferenceReadNode node - # - # source://yarp//lib/yarp/node.rb#14922 - def NumberedReferenceReadNode(number, location = T.unsafe(nil)); end - - # Create a new OptionalParameterNode node - # - # source://yarp//lib/yarp/node.rb#14927 - def OptionalParameterNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new OrNode node - # - # source://yarp//lib/yarp/node.rb#14932 - def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end - - # Create a new ParametersNode node - # - # source://yarp//lib/yarp/node.rb#14937 - def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = T.unsafe(nil)); end - - # Create a new ParenthesesNode node - # - # source://yarp//lib/yarp/node.rb#14942 - def ParenthesesNode(body, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new PinnedExpressionNode node - # - # source://yarp//lib/yarp/node.rb#14947 - def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = T.unsafe(nil)); end - - # Create a new PinnedVariableNode node - # - # source://yarp//lib/yarp/node.rb#14952 - def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end - - # Create a new PostExecutionNode node - # - # source://yarp//lib/yarp/node.rb#14957 - def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new PreExecutionNode node - # - # source://yarp//lib/yarp/node.rb#14962 - def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new ProgramNode node - # - # source://yarp//lib/yarp/node.rb#14967 - def ProgramNode(locals, statements, location = T.unsafe(nil)); end - - # Create a new RangeNode node - # - # source://yarp//lib/yarp/node.rb#14972 - def RangeNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end - - # Create a new RationalNode node - # - # source://yarp//lib/yarp/node.rb#14977 - def RationalNode(numeric, location = T.unsafe(nil)); end - - # Create a new RedoNode node - # - # source://yarp//lib/yarp/node.rb#14982 - def RedoNode(location = T.unsafe(nil)); end - - # Create a new RegularExpressionNode node - # - # source://yarp//lib/yarp/node.rb#14987 - def RegularExpressionNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end - - # Create a new RequiredDestructuredParameterNode node - # - # source://yarp//lib/yarp/node.rb#14992 - def RequiredDestructuredParameterNode(parameters, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new RequiredParameterNode node - # - # source://yarp//lib/yarp/node.rb#14997 - def RequiredParameterNode(name, location = T.unsafe(nil)); end - - # Create a new RescueModifierNode node - # - # source://yarp//lib/yarp/node.rb#15002 - def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end - - # Create a new RescueNode node - # - # source://yarp//lib/yarp/node.rb#15007 - def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = T.unsafe(nil)); end - - # Create a new RestParameterNode node - # - # source://yarp//lib/yarp/node.rb#15012 - def RestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end - - # Create a new RetryNode node - # - # source://yarp//lib/yarp/node.rb#15017 - def RetryNode(location = T.unsafe(nil)); end - - # Create a new ReturnNode node - # - # source://yarp//lib/yarp/node.rb#15022 - def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end - - # Create a new SelfNode node - # - # source://yarp//lib/yarp/node.rb#15027 - def SelfNode(location = T.unsafe(nil)); end - - # Create a new SingletonClassNode node - # - # source://yarp//lib/yarp/node.rb#15032 - def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new SourceEncodingNode node - # - # source://yarp//lib/yarp/node.rb#15037 - def SourceEncodingNode(location = T.unsafe(nil)); end - - # Create a new SourceFileNode node - # - # source://yarp//lib/yarp/node.rb#15042 - def SourceFileNode(filepath, location = T.unsafe(nil)); end - - # Create a new SourceLineNode node - # - # source://yarp//lib/yarp/node.rb#15047 - def SourceLineNode(location = T.unsafe(nil)); end - - # Create a new SplatNode node - # - # source://yarp//lib/yarp/node.rb#15052 - def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end - - # Create a new StatementsNode node - # - # source://yarp//lib/yarp/node.rb#15057 - def StatementsNode(body, location = T.unsafe(nil)); end - - # Create a new StringConcatNode node - # - # source://yarp//lib/yarp/node.rb#15062 - def StringConcatNode(left, right, location = T.unsafe(nil)); end - - # Create a new StringNode node - # - # source://yarp//lib/yarp/node.rb#15067 - def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end - - # Create a new SuperNode node - # - # source://yarp//lib/yarp/node.rb#15072 - def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = T.unsafe(nil)); end - - # Create a new SymbolNode node - # - # source://yarp//lib/yarp/node.rb#15077 - def SymbolNode(opening_loc, value_loc, closing_loc, unescaped, location = T.unsafe(nil)); end - - # Create a new TrueNode node - # - # source://yarp//lib/yarp/node.rb#15082 - def TrueNode(location = T.unsafe(nil)); end - - # Create a new UndefNode node - # - # source://yarp//lib/yarp/node.rb#15087 - def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end - - # Create a new UnlessNode node - # - # source://yarp//lib/yarp/node.rb#15092 - def UnlessNode(keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new UntilNode node - # - # source://yarp//lib/yarp/node.rb#15097 - def UntilNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end - - # Create a new WhenNode node - # - # source://yarp//lib/yarp/node.rb#15102 - def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end - - # Create a new WhileNode node - # - # source://yarp//lib/yarp/node.rb#15107 - def WhileNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end - - # Create a new XStringNode node - # - # source://yarp//lib/yarp/node.rb#15112 - def XStringNode(opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end - - # Create a new YieldNode node - # - # source://yarp//lib/yarp/node.rb#15117 - def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, location = T.unsafe(nil)); end -end - -# This module is used for testing and debugging and is not meant to be used by -# consumers of this library. -# -# source://yarp//lib/yarp.rb#386 -module YARP::Debug - class << self - # For the given source, compiles with CRuby and returns a list of all of the - # sets of local variables that were encountered. - # - # source://yarp//lib/yarp.rb#427 - def cruby_locals(source); end - - def memsize(_arg0); end - def named_captures(_arg0); end - - # source://yarp//lib/yarp.rb#529 - def newlines(source); end - - # source://yarp//lib/yarp.rb#533 - def parse_serialize_file(filepath); end - - def parse_serialize_file_metadata(_arg0, _arg1); end - def profile_file(_arg0); end - def unescape_all(_arg0); end - def unescape_minimal(_arg0); end - def unescape_none(_arg0); end - - # For the given source, parses with YARP and returns a list of all of the - # sets of local variables that were encountered. - # - # source://yarp//lib/yarp.rb#462 - def yarp_locals(source); end - end -end - -# source://yarp//lib/yarp.rb#387 -class YARP::Debug::ISeq - # @return [ISeq] a new instance of ISeq - # - # source://yarp//lib/yarp.rb#390 - def initialize(parts); end - - # source://yarp//lib/yarp.rb#406 - def each_child; end - - # source://yarp//lib/yarp.rb#402 - def instructions; end - - # source://yarp//lib/yarp.rb#398 - def local_table; end - - # Returns the value of attribute parts. - # - # source://yarp//lib/yarp.rb#388 - def parts; end - - # source://yarp//lib/yarp.rb#394 - def type; end -end - -# Represents a method definition. -# -# def method -# end -# ^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#4035 -class YARP::DefNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [DefNode] a new instance of DefNode - # - # source://yarp//lib/yarp/node.rb#4073 - def initialize(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4090 - def accept(visitor); end - - # attr_reader body: Node? - # - # source://yarp//lib/yarp/node.rb#4049 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4095 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4109 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4100 - def compact_child_nodes; end - - # def copy: (**params) -> DefNode - # - # source://yarp//lib/yarp/node.rb#4114 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4095 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4136 - def deconstruct_keys(keys); end - - # def def_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#4141 - def def_keyword; end - - # attr_reader def_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#4055 - def def_keyword_loc; end - - # def end_keyword: () -> String? - # - # source://yarp//lib/yarp/node.rb#4166 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4070 - def end_keyword_loc; end - - # def equal: () -> String? - # - # source://yarp//lib/yarp/node.rb#4161 - def equal; end - - # attr_reader equal_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4067 - def equal_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4205 - def human; end - - # source://yarp//lib/yarp/node.rb#4170 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://yarp//lib/yarp/node.rb#4052 - def locals; end - - # def lparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#4151 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4061 - def lparen_loc; end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#4037 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#4040 - def name_loc; end - - # def operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#4146 - def operator; end - - # attr_reader operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4058 - def operator_loc; end - - # attr_reader parameters: ParametersNode? - # - # source://yarp//lib/yarp/node.rb#4046 - def parameters; end - - # attr_reader receiver: Node? - # - # source://yarp//lib/yarp/node.rb#4043 - def receiver; end - - # def rparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#4156 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4064 - def rparen_loc; end -end - -# Represents the use of the `defined?` keyword. -# -# defined?(a) -# ^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#4214 -class YARP::DefinedNode < ::YARP::Node - # def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void - # - # @return [DefinedNode] a new instance of DefinedNode - # - # source://yarp//lib/yarp/node.rb#4228 - def initialize(lparen_loc, value, rparen_loc, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4237 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4242 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4252 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4247 - def compact_child_nodes; end - - # def copy: (**params) -> DefinedNode - # - # source://yarp//lib/yarp/node.rb#4257 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4242 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4271 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4303 - def human; end - - # source://yarp//lib/yarp/node.rb#4290 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#4286 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#4225 - def keyword_loc; end - - # def lparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#4276 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4216 - def lparen_loc; end - - # def rparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#4281 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4222 - def rparen_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#4219 - def value; end -end - -# source://yarp//lib/yarp/desugar_visitor.rb#4 -class YARP::DesugarVisitor < ::YARP::MutationVisitor - # @@foo &&= bar - # - # becomes - # - # @@foo && @@foo = bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#10 - def visit_class_variable_and_write_node(node); end - - # @@foo += bar - # - # becomes - # - # @@foo = @@foo + bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#28 - def visit_class_variable_operator_write_node(node); end - - # @@foo ||= bar - # - # becomes - # - # defined?(@@foo) ? @@foo : @@foo = bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#19 - def visit_class_variable_or_write_node(node); end - - # Foo &&= bar - # - # becomes - # - # Foo && Foo = bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#37 - def visit_constant_and_write_node(node); end - - # Foo += bar - # - # becomes - # - # Foo = Foo + bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#55 - def visit_constant_operator_write_node(node); end - - # Foo ||= bar - # - # becomes - # - # defined?(Foo) ? Foo : Foo = bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#46 - def visit_constant_or_write_node(node); end - - # $foo &&= bar - # - # becomes - # - # $foo && $foo = bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#64 - def visit_global_variable_and_write_node(node); end - - # $foo += bar - # - # becomes - # - # $foo = $foo + bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#82 - def visit_global_variable_operator_write_node(node); end - - # $foo ||= bar - # - # becomes - # - # defined?($foo) ? $foo : $foo = bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#73 - def visit_global_variable_or_write_node(node); end - - # becomes - # - # source://yarp//lib/yarp/desugar_visitor.rb#91 - def visit_instance_variable_and_write_node(node); end - - # becomes - # - # source://yarp//lib/yarp/desugar_visitor.rb#109 - def visit_instance_variable_operator_write_node(node); end - - # becomes - # - # source://yarp//lib/yarp/desugar_visitor.rb#100 - def visit_instance_variable_or_write_node(node); end - - # foo &&= bar - # - # becomes - # - # foo && foo = bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#118 - def visit_local_variable_and_write_node(node); end - - # foo += bar - # - # becomes - # - # foo = foo + bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#136 - def visit_local_variable_operator_write_node(node); end - - # foo ||= bar - # - # becomes - # - # foo || foo = bar - # - # source://yarp//lib/yarp/desugar_visitor.rb#127 - def visit_local_variable_or_write_node(node); end - - private - - # Desugar `x &&= y` to `x && x = y` - # - # source://yarp//lib/yarp/desugar_visitor.rb#143 - def desugar_and_write_node(node, read_class, write_class, *arguments); end - - # Desugar `x += y` to `x = x + y` - # - # source://yarp//lib/yarp/desugar_visitor.rb#153 - def desugar_operator_write_node(node, read_class, write_class, *arguments); end - - # Desugar `x ||= y` to `defined?(x) ? x : x = y` - # - # source://yarp//lib/yarp/desugar_visitor.rb#185 - def desugar_or_write_defined_node(node, read_class, write_class, *arguments); end - - # Desugar `x ||= y` to `x || x = y` - # - # source://yarp//lib/yarp/desugar_visitor.rb#175 - 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 without having to repeat the same visits multiple times -# -# source://yarp//lib/yarp/node.rb#13385 -class YARP::Dispatcher - # @return [Dispatcher] a new instance of Dispatcher - # - # source://yarp//lib/yarp/node.rb#13389 - def initialize; end - - # Walks `root` dispatching events to all registered listeners - # - # def dispatch: (Node) -> void - # - # source://yarp//lib/yarp/node.rb#13403 - def dispatch(root); end - - # Dispatches a single event for `node` to all registered listeners - # - # def dispatch_once: (Node) -> void - # - # source://yarp//lib/yarp/node.rb#13979 - def dispatch_once(node); end - - # attr_reader listeners: Hash[Symbol, Array[Listener]] - # - # source://yarp//lib/yarp/node.rb#13387 - def listeners; end - - # Register a listener for one or more events - # - # def register: (Listener, *Symbol) -> void - # - # source://yarp//lib/yarp/node.rb#13396 - def register(listener, *events); end -end - -# Represents an `else` clause in a `case`, `if`, or `unless` statement. -# -# if a then b else c end -# ^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#4312 -class YARP::ElseNode < ::YARP::Node - # def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [ElseNode] a new instance of ElseNode - # - # source://yarp//lib/yarp/node.rb#4323 - def initialize(else_keyword_loc, statements, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4331 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4336 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4348 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4341 - def compact_child_nodes; end - - # def copy: (**params) -> ElseNode - # - # source://yarp//lib/yarp/node.rb#4353 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4336 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4366 - def deconstruct_keys(keys); end - - # def else_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#4371 - def else_keyword; end - - # attr_reader else_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#4314 - def else_keyword_loc; end - - # def end_keyword: () -> String? - # - # source://yarp//lib/yarp/node.rb#4376 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4320 - def end_keyword_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4396 - def human; end - - # source://yarp//lib/yarp/node.rb#4380 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#4317 - def statements; end -end - -# Represents an interpolated set of statements. -# -# "foo #{bar}" -# ^^^^^^ -# -# source://yarp//lib/yarp/node.rb#4405 -class YARP::EmbeddedStatementsNode < ::YARP::Node - # def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void - # - # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode - # - # source://yarp//lib/yarp/node.rb#4416 - def initialize(opening_loc, statements, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4424 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4429 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#4469 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#4413 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4441 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4434 - def compact_child_nodes; end - - # def copy: (**params) -> EmbeddedStatementsNode - # - # source://yarp//lib/yarp/node.rb#4446 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4429 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4459 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4489 - def human; end - - # source://yarp//lib/yarp/node.rb#4473 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#4464 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#4407 - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#4410 - def statements; end -end - -# Represents an interpolated variable. -# -# "foo #@bar" -# ^^^^^ -# -# source://yarp//lib/yarp/node.rb#4498 -class YARP::EmbeddedVariableNode < ::YARP::Node - # def initialize: (operator_loc: Location, variable: Node, location: Location) -> void - # - # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode - # - # source://yarp//lib/yarp/node.rb#4506 - def initialize(operator_loc, variable, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4513 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4518 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4528 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4523 - def compact_child_nodes; end - - # def copy: (**params) -> EmbeddedVariableNode - # - # source://yarp//lib/yarp/node.rb#4533 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4518 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4545 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4565 - def human; end - - # source://yarp//lib/yarp/node.rb#4554 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#4550 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#4500 - def operator_loc; end - - # attr_reader variable: Node - # - # source://yarp//lib/yarp/node.rb#4503 - def variable; end -end - -# Represents an `ensure` clause in a `begin` statement. -# -# begin -# foo -# ensure -# ^^^^^^ -# bar -# end -# -# source://yarp//lib/yarp/node.rb#4578 -class YARP::EnsureNode < ::YARP::Node - # def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void - # - # @return [EnsureNode] a new instance of EnsureNode - # - # source://yarp//lib/yarp/node.rb#4589 - def initialize(ensure_keyword_loc, statements, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4597 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4602 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4614 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4607 - def compact_child_nodes; end - - # def copy: (**params) -> EnsureNode - # - # source://yarp//lib/yarp/node.rb#4619 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4602 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4632 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#4642 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#4586 - def end_keyword_loc; end - - # def ensure_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#4637 - def ensure_keyword; end - - # attr_reader ensure_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#4580 - def ensure_keyword_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4662 - def human; end - - # source://yarp//lib/yarp/node.rb#4646 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#4583 - def statements; end -end - -# Represents the use of the literal `false` keyword. -# -# false -# ^^^^^ -# -# source://yarp//lib/yarp/node.rb#4671 -class YARP::FalseNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [FalseNode] a new instance of FalseNode - # - # source://yarp//lib/yarp/node.rb#4673 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4678 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4683 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4693 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4688 - def compact_child_nodes; end - - # def copy: (**params) -> FalseNode - # - # source://yarp//lib/yarp/node.rb#4698 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4683 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4708 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4720 - def human; end - - # source://yarp//lib/yarp/node.rb#4712 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents a find pattern in pattern matching. -# -# foo in *bar, baz, *qux -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# foo in [*bar, baz, *qux] -# ^^^^^^^^^^^^^^^^^^^^^^^^ -# -# foo in Foo(*bar, baz, *qux) -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#4735 -class YARP::FindPatternNode < ::YARP::Node - # def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [FindPatternNode] a new instance of FindPatternNode - # - # source://yarp//lib/yarp/node.rb#4755 - def initialize(constant, left, requireds, right, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4766 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4771 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#4817 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4752 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4786 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4776 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://yarp//lib/yarp/node.rb#4737 - def constant; end - - # def copy: (**params) -> FindPatternNode - # - # source://yarp//lib/yarp/node.rb#4791 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4771 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4807 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4842 - def human; end - - # source://yarp//lib/yarp/node.rb#4821 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://yarp//lib/yarp/node.rb#4740 - def left; end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#4812 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#4749 - def opening_loc; end - - # attr_reader requireds: Array[Node] - # - # source://yarp//lib/yarp/node.rb#4743 - def requireds; end - - # attr_reader right: Node - # - # source://yarp//lib/yarp/node.rb#4746 - def right; end -end - -# Represents the use of the `..` or `...` operators to create flip flops. -# -# baz if foo .. bar -# ^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#4851 -class YARP::FlipFlopNode < ::YARP::Node - # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void - # - # @return [FlipFlopNode] a new instance of FlipFlopNode - # - # source://yarp//lib/yarp/node.rb#4865 - def initialize(left, right, operator_loc, flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4874 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4879 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4892 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4884 - def compact_child_nodes; end - - # def copy: (**params) -> FlipFlopNode - # - # source://yarp//lib/yarp/node.rb#4897 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4879 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4911 - def deconstruct_keys(keys); end - - # def exclude_end?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#4921 - def exclude_end?; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#4948 - def human; end - - # source://yarp//lib/yarp/node.rb#4925 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node? - # - # source://yarp//lib/yarp/node.rb#4853 - def left; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#4916 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#4859 - def operator_loc; end - - # attr_reader right: Node? - # - # source://yarp//lib/yarp/node.rb#4856 - def right; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#4862 - def flags; end -end - -# Represents a floating point number literal. -# -# 1.0 -# ^^^ -# -# source://yarp//lib/yarp/node.rb#4957 -class YARP::FloatNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [FloatNode] a new instance of FloatNode - # - # source://yarp//lib/yarp/node.rb#4959 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#4964 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4969 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#4979 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#4974 - def compact_child_nodes; end - - # def copy: (**params) -> FloatNode - # - # source://yarp//lib/yarp/node.rb#4984 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#4969 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#4994 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5006 - def human; end - - # source://yarp//lib/yarp/node.rb#4998 - def inspect(inspector = T.unsafe(nil)); end - - # Returns the value of the node as a Ruby Float. - # - # source://yarp//lib/yarp.rb#569 - def value; end -end - -# Represents the use of the `for` keyword. -# -# for i in a end -# ^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#5015 -class YARP::ForNode < ::YARP::Node - # def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void - # - # @return [ForNode] a new instance of ForNode - # - # source://yarp//lib/yarp/node.rb#5038 - def initialize(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5050 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5055 - def child_nodes; end - - # attr_reader collection: Node - # - # source://yarp//lib/yarp/node.rb#5020 - def collection; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5069 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5060 - def compact_child_nodes; end - - # def copy: (**params) -> ForNode - # - # source://yarp//lib/yarp/node.rb#5074 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5055 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5091 - def deconstruct_keys(keys); end - - # def do_keyword: () -> String? - # - # source://yarp//lib/yarp/node.rb#5106 - def do_keyword; end - - # attr_reader do_keyword_loc: Location? - # - # source://yarp//lib/yarp/node.rb#5032 - def do_keyword_loc; end - - # def end_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#5111 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#5035 - def end_keyword_loc; end - - # def for_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#5096 - def for_keyword; end - - # attr_reader for_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#5026 - def for_keyword_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5137 - def human; end - - # def in_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#5101 - def in_keyword; end - - # attr_reader in_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#5029 - def in_keyword_loc; end - - # attr_reader index: Node - # - # source://yarp//lib/yarp/node.rb#5017 - def index; end - - # source://yarp//lib/yarp/node.rb#5115 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#5023 - def statements; end -end - -# Represents forwarding all arguments to this method to another method. -# -# def foo(...) -# bar(...) -# ^^^^^^^^ -# end -# -# source://yarp//lib/yarp/node.rb#5148 -class YARP::ForwardingArgumentsNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode - # - # source://yarp//lib/yarp/node.rb#5150 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5155 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5160 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5170 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5165 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingArgumentsNode - # - # source://yarp//lib/yarp/node.rb#5175 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5160 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5185 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5197 - def human; end - - # source://yarp//lib/yarp/node.rb#5189 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of the forwarding parameter in a method, block, or lambda declaration. -# -# def foo(...) -# ^^^ -# end -# -# source://yarp//lib/yarp/node.rb#5207 -class YARP::ForwardingParameterNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode - # - # source://yarp//lib/yarp/node.rb#5209 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5214 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5219 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5229 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5224 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingParameterNode - # - # source://yarp//lib/yarp/node.rb#5234 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5219 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5244 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5256 - def human; end - - # source://yarp//lib/yarp/node.rb#5248 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of the `super` keyword without parentheses or arguments. -# -# super -# ^^^^^ -# -# source://yarp//lib/yarp/node.rb#5265 -class YARP::ForwardingSuperNode < ::YARP::Node - # def initialize: (block: BlockNode?, location: Location) -> void - # - # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode - # - # source://yarp//lib/yarp/node.rb#5270 - def initialize(block, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5276 - def accept(visitor); end - - # attr_reader block: BlockNode? - # - # source://yarp//lib/yarp/node.rb#5267 - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5281 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5293 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5286 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingSuperNode - # - # source://yarp//lib/yarp/node.rb#5298 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5281 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5309 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5327 - def human; end - - # source://yarp//lib/yarp/node.rb#5313 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of the `&&=` operator for assignment to a global variable. -# -# $target &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#5336 -class YARP::GlobalVariableAndWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode - # - # source://yarp//lib/yarp/node.rb#5350 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5359 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5364 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5374 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5369 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableAndWriteNode - # - # source://yarp//lib/yarp/node.rb#5379 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5364 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5393 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5415 - def human; end - - # source://yarp//lib/yarp/node.rb#5402 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#5338 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#5341 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#5398 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#5344 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#5347 - def value; end -end - -# Represents assigning to a global variable using an operator that isn't `=`. -# -# $target += value -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#5424 -class YARP::GlobalVariableOperatorWriteNode < ::YARP::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://yarp//lib/yarp/node.rb#5441 - def initialize(name, name_loc, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5451 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5456 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5466 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5461 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#5471 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5456 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5486 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5504 - def human; end - - # source://yarp//lib/yarp/node.rb#5490 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#5426 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#5429 - def name_loc; end - - # attr_reader operator: Symbol - # - # source://yarp//lib/yarp/node.rb#5438 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#5432 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#5435 - def value; end -end - -# Represents the use of the `||=` operator for assignment to a global variable. -# -# $target ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#5513 -class YARP::GlobalVariableOrWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode - # - # source://yarp//lib/yarp/node.rb#5527 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5536 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5541 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5551 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5546 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableOrWriteNode - # - # source://yarp//lib/yarp/node.rb#5556 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5541 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5570 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5592 - def human; end - - # source://yarp//lib/yarp/node.rb#5579 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#5515 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#5518 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#5575 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#5521 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#5524 - def value; end -end - -# Represents referencing a global variable. -# -# $foo -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#5601 -class YARP::GlobalVariableReadNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode - # - # source://yarp//lib/yarp/node.rb#5606 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5612 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5617 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5627 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5622 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableReadNode - # - # source://yarp//lib/yarp/node.rb#5632 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5617 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5643 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5656 - def human; end - - # source://yarp//lib/yarp/node.rb#5647 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#5603 - def name; end -end - -# Represents writing to a global variable in a context that doesn't have an explicit value. -# -# $foo, $bar = baz -# ^^^^ ^^^^ -# -# source://yarp//lib/yarp/node.rb#5665 -class YARP::GlobalVariableTargetNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode - # - # source://yarp//lib/yarp/node.rb#5670 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5676 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5681 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5691 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5686 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableTargetNode - # - # source://yarp//lib/yarp/node.rb#5696 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5681 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5707 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5720 - def human; end - - # source://yarp//lib/yarp/node.rb#5711 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#5667 - def name; end -end - -# Represents writing to a global variable. -# -# $foo = 1 -# ^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#5729 -class YARP::GlobalVariableWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - # - # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode - # - # source://yarp//lib/yarp/node.rb#5743 - def initialize(name, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5752 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5757 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5767 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5762 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableWriteNode - # - # source://yarp//lib/yarp/node.rb#5772 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5757 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5786 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5808 - def human; end - - # source://yarp//lib/yarp/node.rb#5795 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#5731 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#5734 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#5791 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#5740 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#5737 - def value; end -end - -# Represents a hash literal. -# -# { a => b } -# ^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#5817 -class YARP::HashNode < ::YARP::Node - # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void - # - # @return [HashNode] a new instance of HashNode - # - # source://yarp//lib/yarp/node.rb#5828 - def initialize(opening_loc, elements, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5836 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5841 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#5879 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#5825 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5851 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5846 - def compact_child_nodes; end - - # def copy: (**params) -> HashNode - # - # source://yarp//lib/yarp/node.rb#5856 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5841 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5869 - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://yarp//lib/yarp/node.rb#5822 - def elements; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#5894 - def human; end - - # source://yarp//lib/yarp/node.rb#5883 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#5874 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#5819 - def opening_loc; end -end - -# Represents a hash pattern in pattern matching. -# -# foo => { a: 1, b: 2 } -# ^^^^^^^^^^^^^^ -# -# foo => { a: 1, b: 2, **c } -# ^^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#5906 -class YARP::HashPatternNode < ::YARP::Node - # def initialize: (constant: Node?, assocs: Array[Node], kwrest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [HashPatternNode] a new instance of HashPatternNode - # - # source://yarp//lib/yarp/node.rb#5923 - def initialize(constant, assocs, kwrest, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#5933 - def accept(visitor); end - - # attr_reader assocs: Array[Node] - # - # source://yarp//lib/yarp/node.rb#5911 - def assocs; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5938 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#5982 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#5920 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#5952 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#5943 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://yarp//lib/yarp/node.rb#5908 - def constant; end - - # def copy: (**params) -> HashPatternNode - # - # source://yarp//lib/yarp/node.rb#5957 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#5938 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#5972 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6009 - def human; end - - # source://yarp//lib/yarp/node.rb#5986 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader kwrest: Node? - # - # source://yarp//lib/yarp/node.rb#5914 - def kwrest; end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#5977 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#5917 - def opening_loc; 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://yarp//lib/yarp/node.rb#6021 -class YARP::IfNode < ::YARP::Node - # def initialize: (if_keyword_loc: Location?, predicate: Node, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [IfNode] a new instance of IfNode - # - # source://yarp//lib/yarp/node.rb#6038 - def initialize(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6048 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6057 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6071 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6062 - def compact_child_nodes; end - - # attr_reader consequent: Node? - # - # source://yarp//lib/yarp/node.rb#6032 - def consequent; end - - # def copy: (**params) -> IfNode - # - # source://yarp//lib/yarp/node.rb#6076 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6057 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6091 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String? - # - # source://yarp//lib/yarp/node.rb#6101 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://yarp//lib/yarp/node.rb#6035 - def end_keyword_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6129 - def human; end - - # def if_keyword: () -> String? - # - # source://yarp//lib/yarp/node.rb#6096 - def if_keyword; end - - # attr_reader if_keyword_loc: Location? - # - # source://yarp//lib/yarp/node.rb#6023 - def if_keyword_loc; end - - # source://yarp//lib/yarp/node.rb#6105 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader predicate: Node - # - # source://yarp//lib/yarp/node.rb#6026 - def predicate; end - - # source://yarp//lib/yarp/node.rb#6052 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#6029 - def statements; end -end - -# Represents an imaginary number literal. -# -# 1.0i -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#6138 -class YARP::ImaginaryNode < ::YARP::Node - # def initialize: (numeric: Node, location: Location) -> void - # - # @return [ImaginaryNode] a new instance of ImaginaryNode - # - # source://yarp//lib/yarp/node.rb#6143 - def initialize(numeric, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6149 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6154 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6164 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6159 - def compact_child_nodes; end - - # def copy: (**params) -> ImaginaryNode - # - # source://yarp//lib/yarp/node.rb#6169 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6154 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6180 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6194 - def human; end - - # source://yarp//lib/yarp/node.rb#6184 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader numeric: Node - # - # source://yarp//lib/yarp/node.rb#6140 - def numeric; end - - # Returns the value of the node as a Ruby Complex. - # - # source://yarp//lib/yarp.rb#576 - def value; end -end - -# Represents a node that is implicitly being added to the tree but doesn't -# correspond directly to a node in the source. -# -# { foo: } -# ^^^^ -# -# { Foo: } -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#6207 -class YARP::ImplicitNode < ::YARP::Node - # def initialize: (value: Node, location: Location) -> void - # - # @return [ImplicitNode] a new instance of ImplicitNode - # - # source://yarp//lib/yarp/node.rb#6212 - def initialize(value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6218 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6223 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6233 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6228 - def compact_child_nodes; end - - # def copy: (**params) -> ImplicitNode - # - # source://yarp//lib/yarp/node.rb#6238 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6223 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6249 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6263 - def human; end - - # source://yarp//lib/yarp/node.rb#6253 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#6209 - def value; end -end - -# Represents the use of the `in` keyword in a case statement. -# -# case a; in b then c end -# ^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#6272 -class YARP::InNode < ::YARP::Node - # def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void - # - # @return [InNode] a new instance of InNode - # - # source://yarp//lib/yarp/node.rb#6286 - def initialize(pattern, statements, in_loc, then_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6295 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6300 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6313 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6305 - def compact_child_nodes; end - - # def copy: (**params) -> InNode - # - # source://yarp//lib/yarp/node.rb#6318 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6300 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6332 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6364 - def human; end - - # def in: () -> String - # - # source://yarp//lib/yarp/node.rb#6337 - def in; end - - # attr_reader in_loc: Location - # - # source://yarp//lib/yarp/node.rb#6280 - def in_loc; end - - # source://yarp//lib/yarp/node.rb#6346 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader pattern: Node - # - # source://yarp//lib/yarp/node.rb#6274 - def pattern; end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#6277 - def statements; end - - # def then: () -> String? - # - # source://yarp//lib/yarp/node.rb#6342 - def then; end - - # attr_reader then_loc: Location? - # - # source://yarp//lib/yarp/node.rb#6283 - def then_loc; end -end - -# Represents the use of the `&&=` operator for assignment to an instance variable. -# -# @target &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#6373 -class YARP::InstanceVariableAndWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode - # - # source://yarp//lib/yarp/node.rb#6387 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6396 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6401 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6411 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6406 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableAndWriteNode - # - # source://yarp//lib/yarp/node.rb#6416 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6401 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6430 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6452 - def human; end - - # source://yarp//lib/yarp/node.rb#6439 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#6375 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#6378 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#6435 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#6381 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#6384 - def value; end -end - -# Represents assigning to an instance variable using an operator that isn't `=`. -# -# @target += value -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#6461 -class YARP::InstanceVariableOperatorWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#6478 - def initialize(name, name_loc, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6488 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6493 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6503 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6498 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#6508 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6493 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6523 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6541 - def human; end - - # source://yarp//lib/yarp/node.rb#6527 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#6463 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#6466 - def name_loc; end - - # attr_reader operator: Symbol - # - # source://yarp//lib/yarp/node.rb#6475 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#6469 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#6472 - def value; end -end - -# Represents the use of the `||=` operator for assignment to an instance variable. -# -# @target ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#6550 -class YARP::InstanceVariableOrWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode - # - # source://yarp//lib/yarp/node.rb#6564 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6573 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6578 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6588 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6583 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableOrWriteNode - # - # source://yarp//lib/yarp/node.rb#6593 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6578 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6607 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6629 - def human; end - - # source://yarp//lib/yarp/node.rb#6616 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#6552 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#6555 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#6612 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#6558 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#6561 - def value; end -end - -# Represents referencing an instance variable. -# -# @foo -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#6638 -class YARP::InstanceVariableReadNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode - # - # source://yarp//lib/yarp/node.rb#6643 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6649 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6654 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6664 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6659 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableReadNode - # - # source://yarp//lib/yarp/node.rb#6669 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6654 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6680 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6693 - def human; end - - # source://yarp//lib/yarp/node.rb#6684 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#6640 - def name; end -end - -# Represents writing to an instance variable in a context that doesn't have an explicit value. -# -# @foo, @bar = baz -# ^^^^ ^^^^ -# -# source://yarp//lib/yarp/node.rb#6702 -class YARP::InstanceVariableTargetNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode - # - # source://yarp//lib/yarp/node.rb#6707 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6713 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6718 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6728 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6723 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableTargetNode - # - # source://yarp//lib/yarp/node.rb#6733 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6718 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6744 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6757 - def human; end - - # source://yarp//lib/yarp/node.rb#6748 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#6704 - def name; end -end - -# Represents writing to an instance variable. -# -# @foo = 1 -# ^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#6766 -class YARP::InstanceVariableWriteNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - # - # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode - # - # source://yarp//lib/yarp/node.rb#6780 - def initialize(name, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6789 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6794 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6804 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6799 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableWriteNode - # - # source://yarp//lib/yarp/node.rb#6809 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6794 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6823 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6845 - def human; end - - # source://yarp//lib/yarp/node.rb#6832 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#6768 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#6771 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#6828 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#6777 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#6774 - def value; end -end - -# source://yarp//lib/yarp/node.rb#12903 -module YARP::IntegerBaseFlags; end - -# 0b prefix -# -# source://yarp//lib/yarp/node.rb#12905 -YARP::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) - -# 0d or no prefix -# -# source://yarp//lib/yarp/node.rb#12911 -YARP::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) - -# 0x prefix -# -# source://yarp//lib/yarp/node.rb#12914 -YARP::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) - -# 0o or 0 prefix -# -# source://yarp//lib/yarp/node.rb#12908 -YARP::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) - -# Represents an integer number literal. -# -# 1 -# ^ -# -# source://yarp//lib/yarp/node.rb#6854 -class YARP::IntegerNode < ::YARP::Node - # def initialize: (flags: Integer, location: Location) -> void - # - # @return [IntegerNode] a new instance of IntegerNode - # - # source://yarp//lib/yarp/node.rb#6859 - def initialize(flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6865 - def accept(visitor); end - - # def binary?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#6901 - def binary?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6870 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6880 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6875 - def compact_child_nodes; end - - # def copy: (**params) -> IntegerNode - # - # source://yarp//lib/yarp/node.rb#6885 - def copy(**params); end - - # def decimal?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#6911 - def decimal?; end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6870 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#6896 - def deconstruct_keys(keys); end - - # def hexadecimal?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#6916 - def hexadecimal?; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#6930 - def human; end - - # source://yarp//lib/yarp/node.rb#6920 - def inspect(inspector = T.unsafe(nil)); end - - # def octal?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#6906 - def octal?; end - - # Returns the value of the node as a Ruby Integer. - # - # source://yarp//lib/yarp.rb#583 - def value; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#6856 - def flags; 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://yarp//lib/yarp/node.rb#6941 -class YARP::InterpolatedMatchLastLineNode < ::YARP::Node - # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void - # - # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode - # - # source://yarp//lib/yarp/node.rb#6955 - def initialize(opening_loc, parts, closing_loc, flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#6964 - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7038 - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6974 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#7013 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#6949 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#6984 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#6979 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedMatchLastLineNode - # - # source://yarp//lib/yarp/node.rb#6989 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#6974 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7003 - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7033 - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7023 - def extended?; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7070 - def human; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7018 - def ignore_case?; end - - # source://yarp//lib/yarp/node.rb#7057 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7028 - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7053 - def once?; end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#7008 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#6943 - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://yarp//lib/yarp/node.rb#6946 - def parts; end - - # source://yarp//lib/yarp/node.rb#6968 - def set_newline_flag(newline_marked); end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7048 - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7043 - def windows_31j?; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#6952 - def flags; end -end - -# Represents a regular expression literal that contains interpolation. -# -# /foo #{bar} baz/ -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#7079 -class YARP::InterpolatedRegularExpressionNode < ::YARP::Node - # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void - # - # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode - # - # source://yarp//lib/yarp/node.rb#7093 - def initialize(opening_loc, parts, closing_loc, flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7102 - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7176 - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7112 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#7151 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#7087 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7122 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7117 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedRegularExpressionNode - # - # source://yarp//lib/yarp/node.rb#7127 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7112 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7141 - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7171 - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7161 - def extended?; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7208 - def human; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7156 - def ignore_case?; end - - # source://yarp//lib/yarp/node.rb#7195 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7166 - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7191 - def once?; end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#7146 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#7081 - def opening_loc; end - - # Returns a numeric value that represents the flags that were used to create - # the regular expression. - # - # source://yarp//lib/yarp.rb#591 - def options; end - - # attr_reader parts: Array[Node] - # - # source://yarp//lib/yarp/node.rb#7084 - def parts; end - - # source://yarp//lib/yarp/node.rb#7106 - def set_newline_flag(newline_marked); end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7186 - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#7181 - def windows_31j?; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#7090 - def flags; end -end - -# Represents a string literal that contains interpolation. -# -# "foo #{bar} baz" -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#7217 -class YARP::InterpolatedStringNode < ::YARP::Node - # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void - # - # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode - # - # source://yarp//lib/yarp/node.rb#7228 - def initialize(opening_loc, parts, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7236 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7246 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#7284 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#7225 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7256 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7251 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedStringNode - # - # source://yarp//lib/yarp/node.rb#7261 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7246 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7274 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7299 - def human; end - - # source://yarp//lib/yarp/node.rb#7288 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#7279 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#7219 - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://yarp//lib/yarp/node.rb#7222 - def parts; end - - # source://yarp//lib/yarp/node.rb#7240 - def set_newline_flag(newline_marked); end -end - -# Represents a symbol literal that contains interpolation. -# -# :"foo #{bar} baz" -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#7308 -class YARP::InterpolatedSymbolNode < ::YARP::Node - # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void - # - # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode - # - # source://yarp//lib/yarp/node.rb#7319 - def initialize(opening_loc, parts, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7327 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7337 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#7375 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#7316 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7347 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7342 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedSymbolNode - # - # source://yarp//lib/yarp/node.rb#7352 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7337 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7365 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7390 - def human; end - - # source://yarp//lib/yarp/node.rb#7379 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#7370 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#7310 - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://yarp//lib/yarp/node.rb#7313 - def parts; end - - # source://yarp//lib/yarp/node.rb#7331 - def set_newline_flag(newline_marked); end -end - -# Represents an xstring literal that contains interpolation. -# -# `foo #{bar} baz` -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#7399 -class YARP::InterpolatedXStringNode < ::YARP::Node - # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void - # - # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode - # - # source://yarp//lib/yarp/node.rb#7410 - def initialize(opening_loc, parts, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7418 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7428 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#7466 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#7407 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7438 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7433 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedXStringNode - # - # source://yarp//lib/yarp/node.rb#7443 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7428 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7456 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7481 - def human; end - - # source://yarp//lib/yarp/node.rb#7470 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#7461 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#7401 - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://yarp//lib/yarp/node.rb#7404 - def parts; end - - # source://yarp//lib/yarp/node.rb#7422 - def set_newline_flag(newline_marked); end -end - -# Represents a hash literal without opening and closing braces. -# -# foo(a: b) -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#7490 -class YARP::KeywordHashNode < ::YARP::Node - # def initialize: (elements: Array[Node], location: Location) -> void - # - # @return [KeywordHashNode] a new instance of KeywordHashNode - # - # source://yarp//lib/yarp/node.rb#7495 - def initialize(elements, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7501 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7506 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7516 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7511 - def compact_child_nodes; end - - # def copy: (**params) -> KeywordHashNode - # - # source://yarp//lib/yarp/node.rb#7521 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7506 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7532 - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://yarp//lib/yarp/node.rb#7492 - def elements; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7545 - def human; end - - # source://yarp//lib/yarp/node.rb#7536 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents a keyword parameter to a method, block, or lambda definition. -# -# def a(b:) -# ^^ -# end -# -# def a(b: 1) -# ^^^^ -# end -# -# source://yarp//lib/yarp/node.rb#7559 -class YARP::KeywordParameterNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node?, location: Location) -> void - # - # @return [KeywordParameterNode] a new instance of KeywordParameterNode - # - # source://yarp//lib/yarp/node.rb#7570 - def initialize(name, name_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7578 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7583 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7595 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7588 - def compact_child_nodes; end - - # def copy: (**params) -> KeywordParameterNode - # - # source://yarp//lib/yarp/node.rb#7600 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7583 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7613 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7633 - def human; end - - # source://yarp//lib/yarp/node.rb#7617 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#7561 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#7564 - def name_loc; end - - # attr_reader value: Node? - # - # source://yarp//lib/yarp/node.rb#7567 - def value; end -end - -# Represents a keyword rest parameter to a method, block, or lambda definition. -# -# def a(**b) -# ^^^ -# end -# -# source://yarp//lib/yarp/node.rb#7643 -class YARP::KeywordRestParameterNode < ::YARP::Node - # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - # - # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode - # - # source://yarp//lib/yarp/node.rb#7654 - def initialize(name, name_loc, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7662 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7667 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7677 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7672 - def compact_child_nodes; end - - # def copy: (**params) -> KeywordRestParameterNode - # - # source://yarp//lib/yarp/node.rb#7682 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7667 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7695 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7715 - def human; end - - # source://yarp//lib/yarp/node.rb#7704 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://yarp//lib/yarp/node.rb#7645 - def name; end - - # attr_reader name_loc: Location? - # - # source://yarp//lib/yarp/node.rb#7648 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#7700 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#7651 - def operator_loc; end -end - -# Represents using a lambda literal (not the lambda method call). -# -# ->(value) { value * 2 } -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#7724 -class YARP::LambdaNode < ::YARP::Node - # def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> void - # - # @return [LambdaNode] a new instance of LambdaNode - # - # source://yarp//lib/yarp/node.rb#7744 - def initialize(locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7755 - def accept(visitor); end - - # attr_reader body: Node? - # - # source://yarp//lib/yarp/node.rb#7741 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7760 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#7809 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#7735 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7773 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7765 - def compact_child_nodes; end - - # def copy: (**params) -> LambdaNode - # - # source://yarp//lib/yarp/node.rb#7778 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7760 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7794 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7837 - def human; end - - # source://yarp//lib/yarp/node.rb#7813 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://yarp//lib/yarp/node.rb#7726 - def locals; end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#7804 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#7732 - def opening_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#7799 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#7729 - def operator_loc; end - - # attr_reader parameters: BlockParametersNode? - # - # source://yarp//lib/yarp/node.rb#7738 - def parameters; end -end - -# This class is responsible for lexing the source using YARP 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://yarp//lib/yarp/lex_compat.rb#11 -class YARP::LexCompat - # @return [LexCompat] a new instance of LexCompat - # - # source://yarp//lib/yarp/lex_compat.rb#554 - def initialize(source, filepath = T.unsafe(nil)); end - - # Returns the value of attribute filepath. - # - # source://yarp//lib/yarp/lex_compat.rb#552 - def filepath; end - - # source://yarp//lib/yarp/lex_compat.rb#559 - def result; end - - # Returns the value of attribute source. - # - # source://yarp//lib/yarp/lex_compat.rb#552 - def source; end -end - -# Ripper doesn't include the rest of the token in the event, so we need to -# trim it down to just the content on the first line when comparing. -# -# source://yarp//lib/yarp/lex_compat.rb#205 -class YARP::LexCompat::EndContentToken < ::YARP::LexCompat::Token - # source://yarp//lib/yarp/lex_compat.rb#206 - 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://yarp//lib/yarp/lex_compat.rb#266 -module YARP::LexCompat::Heredoc - class << self - # Here we will split between the two types of heredocs and return the - # object that will store their tokens. - # - # source://yarp//lib/yarp/lex_compat.rb#540 - 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://yarp//lib/yarp/lex_compat.rb#290 -class YARP::LexCompat::Heredoc::DashHeredoc - # @return [DashHeredoc] a new instance of DashHeredoc - # - # source://yarp//lib/yarp/lex_compat.rb#293 - def initialize(split); end - - # source://yarp//lib/yarp/lex_compat.rb#298 - def <<(token); end - - # Returns the value of attribute split. - # - # source://yarp//lib/yarp/lex_compat.rb#291 - def split; end - - # source://yarp//lib/yarp/lex_compat.rb#302 - def to_a; end - - # Returns the value of attribute tokens. - # - # source://yarp//lib/yarp/lex_compat.rb#291 - 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. YARP only modifies the node itself and keeps -# the token the same. This simplifies YARP, 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://yarp//lib/yarp/lex_compat.rb#349 -class YARP::LexCompat::Heredoc::DedentingHeredoc - # @return [DedentingHeredoc] a new instance of DedentingHeredoc - # - # source://yarp//lib/yarp/lex_compat.rb#354 - def initialize; end - - # As tokens are coming in, we track the minimum amount of common leading - # whitespace on plain string content tokens. This allows us to later - # remove that amount of whitespace from the beginning of each line. - # - # source://yarp//lib/yarp/lex_compat.rb#364 - def <<(token); end - - # Returns the value of attribute dedent. - # - # source://yarp//lib/yarp/lex_compat.rb#352 - def dedent; end - - # Returns the value of attribute dedent_next. - # - # source://yarp//lib/yarp/lex_compat.rb#352 - def dedent_next; end - - # Returns the value of attribute embexpr_balance. - # - # source://yarp//lib/yarp/lex_compat.rb#352 - def embexpr_balance; end - - # source://yarp//lib/yarp/lex_compat.rb#396 - def to_a; end - - # Returns the value of attribute tokens. - # - # source://yarp//lib/yarp/lex_compat.rb#352 - def tokens; end -end - -# source://yarp//lib/yarp/lex_compat.rb#350 -YARP::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://yarp//lib/yarp/lex_compat.rb#271 -class YARP::LexCompat::Heredoc::PlainHeredoc - # @return [PlainHeredoc] a new instance of PlainHeredoc - # - # source://yarp//lib/yarp/lex_compat.rb#274 - def initialize; end - - # source://yarp//lib/yarp/lex_compat.rb#278 - def <<(token); end - - # source://yarp//lib/yarp/lex_compat.rb#282 - def to_a; end - - # Returns the value of attribute tokens. - # - # source://yarp//lib/yarp/lex_compat.rb#272 - 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://yarp//lib/yarp/lex_compat.rb#223 -class YARP::LexCompat::IdentToken < ::YARP::LexCompat::Token - # source://yarp//lib/yarp/lex_compat.rb#224 - def ==(other); end -end - -# Tokens where state should be ignored -# used for :on_comment, :on_heredoc_end, :on_embexpr_end -# -# source://yarp//lib/yarp/lex_compat.rb#213 -class YARP::LexCompat::IgnoreStateToken < ::YARP::LexCompat::Token - # source://yarp//lib/yarp/lex_compat.rb#214 - def ==(other); end -end - -# Ignored newlines can occasionally have a LABEL state attached to them, so -# we compare the state differently here. -# -# source://yarp//lib/yarp/lex_compat.rb#234 -class YARP::LexCompat::IgnoredNewlineToken < ::YARP::LexCompat::Token - # source://yarp//lib/yarp/lex_compat.rb#235 - 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://yarp//lib/yarp/lex_compat.rb#254 -class YARP::LexCompat::ParamToken < ::YARP::LexCompat::Token - # source://yarp//lib/yarp/lex_compat.rb#255 - def ==(other); end -end - -# This is a mapping of YARP 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://yarp//lib/yarp/lex_compat.rb#15 -YARP::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) - -# When we produce tokens, we produce the same arrays that Ripper does. -# However, we add a couple of convenience methods onto them to make them a -# little easier to work with. We delegate all other methods to the array. -# -# source://yarp//lib/yarp/lex_compat.rb#185 -class YARP::LexCompat::Token < ::SimpleDelegator - # source://yarp//lib/yarp/lex_compat.rb#190 - def event; end - - # source://yarp//lib/yarp/lex_compat.rb#186 - def location; end - - # source://yarp//lib/yarp/lex_compat.rb#198 - def state; end - - # source://yarp//lib/yarp/lex_compat.rb#194 - def value; end -end - -# Represents the use of the `&&=` operator for assignment to a local variable. -# -# target &&= value -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#7846 -class YARP::LocalVariableAndWriteNode < ::YARP::Node - # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode - # - # source://yarp//lib/yarp/node.rb#7863 - def initialize(name_loc, operator_loc, value, name, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7873 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7878 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7888 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7883 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableAndWriteNode - # - # source://yarp//lib/yarp/node.rb#7893 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7878 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#7908 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://yarp//lib/yarp/node.rb#7860 - def depth; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#7931 - def human; end - - # source://yarp//lib/yarp/node.rb#7917 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#7857 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#7848 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#7913 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#7851 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#7854 - def value; end -end - -# Represents assigning to a local variable using an operator that isn't `=`. -# -# target += value -# ^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#7940 -class YARP::LocalVariableOperatorWriteNode < ::YARP::Node - # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#7960 - def initialize(name_loc, operator_loc, value, name, operator, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#7971 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7976 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#7986 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#7981 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableOperatorWriteNode - # - # source://yarp//lib/yarp/node.rb#7991 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#7976 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8007 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://yarp//lib/yarp/node.rb#7957 - def depth; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8026 - def human; end - - # source://yarp//lib/yarp/node.rb#8011 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#7951 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#7942 - def name_loc; end - - # attr_reader operator: Symbol - # - # source://yarp//lib/yarp/node.rb#7954 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#7945 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#7948 - def value; end -end - -# Represents the use of the `||=` operator for assignment to a local variable. -# -# target ||= value -# ^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#8035 -class YARP::LocalVariableOrWriteNode < ::YARP::Node - # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode - # - # source://yarp//lib/yarp/node.rb#8052 - def initialize(name_loc, operator_loc, value, name, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8062 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8067 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8077 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8072 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableOrWriteNode - # - # source://yarp//lib/yarp/node.rb#8082 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8067 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8097 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://yarp//lib/yarp/node.rb#8049 - def depth; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8120 - def human; end - - # source://yarp//lib/yarp/node.rb#8106 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#8046 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#8037 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#8102 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#8040 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#8043 - def value; 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://yarp//lib/yarp/node.rb#8131 -class YARP::LocalVariableReadNode < ::YARP::Node - # def initialize: (name: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode - # - # source://yarp//lib/yarp/node.rb#8139 - def initialize(name, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8146 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8151 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8161 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8156 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableReadNode - # - # source://yarp//lib/yarp/node.rb#8166 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8151 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8178 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://yarp//lib/yarp/node.rb#8136 - def depth; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8192 - def human; end - - # source://yarp//lib/yarp/node.rb#8182 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#8133 - def name; end -end - -# Represents writing to a local variable in a context that doesn't have an explicit value. -# -# foo, bar = baz -# ^^^ ^^^ -# -# source://yarp//lib/yarp/node.rb#8201 -class YARP::LocalVariableTargetNode < ::YARP::Node - # def initialize: (name: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode - # - # source://yarp//lib/yarp/node.rb#8209 - def initialize(name, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8216 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8221 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8231 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8226 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableTargetNode - # - # source://yarp//lib/yarp/node.rb#8236 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8221 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8248 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://yarp//lib/yarp/node.rb#8206 - def depth; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8262 - def human; end - - # source://yarp//lib/yarp/node.rb#8252 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#8203 - def name; end -end - -# Represents writing to a local variable. -# -# foo = 1 -# ^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#8271 -class YARP::LocalVariableWriteNode < ::YARP::Node - # def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - # - # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode - # - # source://yarp//lib/yarp/node.rb#8288 - def initialize(name, depth, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8298 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8303 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8313 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8308 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableWriteNode - # - # source://yarp//lib/yarp/node.rb#8318 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8303 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8333 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://yarp//lib/yarp/node.rb#8276 - def depth; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8356 - def human; end - - # source://yarp//lib/yarp/node.rb#8342 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#8273 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#8279 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#8338 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#8285 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#8282 - def value; end -end - -# This represents a location in the source. -# -# source://yarp//lib/yarp.rb#41 -class YARP::Location - # @return [Location] a new instance of Location - # - # source://yarp//lib/yarp.rb#56 - def initialize(source, start_offset, length); end - - # source://yarp//lib/yarp.rb#123 - def ==(other); end - - # The list of comments attached to this location - # - # source://yarp//lib/yarp.rb#54 - def comments; end - - # Create a new location object with the given options. - # - # source://yarp//lib/yarp.rb#64 - def copy(**options); end - - # source://yarp//lib/yarp.rb#115 - def deconstruct_keys(keys); end - - # The column number in bytes where this location ends from the start of the - # line. - # - # source://yarp//lib/yarp.rb#111 - def end_column; end - - # The line number where this location ends. - # - # source://yarp//lib/yarp.rb#99 - def end_line; end - - # The byte offset from the beginning of the source where this location ends. - # - # source://yarp//lib/yarp.rb#83 - def end_offset; end - - # Returns a string representation of this location. - # - # source://yarp//lib/yarp.rb#73 - def inspect; end - - # Returns a new location that stretches from this location to the given - # other location. Raises an error if this location is not before the other - # location or if they don't share the same source. - # - # source://yarp//lib/yarp.rb#132 - def join(other); end - - # The length of this location in bytes. - # - # source://yarp//lib/yarp.rb#51 - def length; end - - # source://yarp//lib/yarp.rb#119 - def pretty_print(q); end - - # The source code that this location represents. - # - # source://yarp//lib/yarp.rb#78 - def slice; end - - # The column number in bytes where this location starts from the start of - # the line. - # - # source://yarp//lib/yarp.rb#105 - def start_column; end - - # The line number where this location starts. - # - # source://yarp//lib/yarp.rb#88 - def start_line; end - - # The content of the line where this location starts before this location. - # - # source://yarp//lib/yarp.rb#93 - def start_line_slice; end - - # The byte offset from the beginning of the source where this location - # starts. - # - # source://yarp//lib/yarp.rb#48 - def start_offset; end - - protected - - # Returns the value of attribute source. - # - # source://yarp//lib/yarp.rb#44 - def source; end - - class << self - # source://yarp//lib/yarp.rb#139 - def null; end - end -end - -# source://yarp//lib/yarp/node.rb#12917 -module YARP::LoopFlags; end - -# a loop after a begin statement, so the body is executed first before the condition -# -# source://yarp//lib/yarp/node.rb#12919 -YARP::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) - -# 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://yarp//lib/yarp/node.rb#8367 -class YARP::MatchLastLineNode < ::YARP::Node - # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void - # - # @return [MatchLastLineNode] a new instance of MatchLastLineNode - # - # source://yarp//lib/yarp/node.rb#8384 - def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8394 - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#8469 - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8399 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#8444 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#8375 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8409 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8404 - def compact_child_nodes; end - - # def content: () -> String - # - # source://yarp//lib/yarp/node.rb#8439 - def content; end - - # attr_reader content_loc: Location - # - # source://yarp//lib/yarp/node.rb#8372 - def content_loc; end - - # def copy: (**params) -> MatchLastLineNode - # - # source://yarp//lib/yarp/node.rb#8414 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8399 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8429 - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#8464 - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#8454 - def extended?; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8502 - def human; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#8449 - def ignore_case?; end - - # source://yarp//lib/yarp/node.rb#8488 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#8459 - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#8484 - def once?; end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#8434 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#8369 - def opening_loc; end - - # attr_reader unescaped: String - # - # source://yarp//lib/yarp/node.rb#8378 - def unescaped; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#8479 - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#8474 - def windows_31j?; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#8381 - def flags; end -end - -# Represents the use of the modifier `in` operator. -# -# foo in bar -# ^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#8511 -class YARP::MatchPredicateNode < ::YARP::Node - # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void - # - # @return [MatchPredicateNode] a new instance of MatchPredicateNode - # - # source://yarp//lib/yarp/node.rb#8522 - def initialize(value, pattern, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8530 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8535 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8545 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8540 - def compact_child_nodes; end - - # def copy: (**params) -> MatchPredicateNode - # - # source://yarp//lib/yarp/node.rb#8550 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8535 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8563 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8585 - def human; end - - # source://yarp//lib/yarp/node.rb#8572 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#8568 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#8519 - def operator_loc; end - - # attr_reader pattern: Node - # - # source://yarp//lib/yarp/node.rb#8516 - def pattern; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#8513 - def value; end -end - -# Represents the use of the `=>` operator. -# -# foo => bar -# ^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#8594 -class YARP::MatchRequiredNode < ::YARP::Node - # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void - # - # @return [MatchRequiredNode] a new instance of MatchRequiredNode - # - # source://yarp//lib/yarp/node.rb#8605 - def initialize(value, pattern, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8613 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8618 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8628 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8623 - def compact_child_nodes; end - - # def copy: (**params) -> MatchRequiredNode - # - # source://yarp//lib/yarp/node.rb#8633 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8618 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8646 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8668 - def human; end - - # source://yarp//lib/yarp/node.rb#8655 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#8651 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#8602 - def operator_loc; end - - # attr_reader pattern: Node - # - # source://yarp//lib/yarp/node.rb#8599 - def pattern; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#8596 - def value; end -end - -# Represents writing local variables using a regular expression match with -# named capture groups. -# -# /(?bar)/ =~ baz -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#8678 -class YARP::MatchWriteNode < ::YARP::Node - # def initialize: (call: CallNode, locals: Array[Symbol], location: Location) -> void - # - # @return [MatchWriteNode] a new instance of MatchWriteNode - # - # source://yarp//lib/yarp/node.rb#8686 - def initialize(call, locals, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8693 - def accept(visitor); end - - # attr_reader call: CallNode - # - # source://yarp//lib/yarp/node.rb#8680 - def call; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8698 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8708 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8703 - def compact_child_nodes; end - - # def copy: (**params) -> MatchWriteNode - # - # source://yarp//lib/yarp/node.rb#8713 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8698 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8725 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8740 - def human; end - - # source://yarp//lib/yarp/node.rb#8729 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://yarp//lib/yarp/node.rb#8683 - def locals; end -end - -# Represents a node that is missing from the source and results in a syntax -# error. -# -# source://yarp//lib/yarp/node.rb#8747 -class YARP::MissingNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [MissingNode] a new instance of MissingNode - # - # source://yarp//lib/yarp/node.rb#8749 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8754 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8759 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8769 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8764 - def compact_child_nodes; end - - # def copy: (**params) -> MissingNode - # - # source://yarp//lib/yarp/node.rb#8774 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8759 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8784 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8796 - def human; end - - # source://yarp//lib/yarp/node.rb#8788 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents a module declaration involving the `module` keyword. -# -# module Foo end -# ^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#8805 -class YARP::ModuleNode < ::YARP::Node - # def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void - # - # @return [ModuleNode] a new instance of ModuleNode - # - # source://yarp//lib/yarp/node.rb#8825 - def initialize(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8836 - def accept(visitor); end - - # attr_reader body: Node? - # - # source://yarp//lib/yarp/node.rb#8816 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8841 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8854 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8846 - def compact_child_nodes; end - - # attr_reader constant_path: Node - # - # source://yarp//lib/yarp/node.rb#8813 - def constant_path; end - - # def copy: (**params) -> ModuleNode - # - # source://yarp//lib/yarp/node.rb#8859 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8841 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8875 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#8885 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#8819 - def end_keyword_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8909 - def human; end - - # source://yarp//lib/yarp/node.rb#8889 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://yarp//lib/yarp/node.rb#8807 - def locals; end - - # def module_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#8880 - def module_keyword; end - - # attr_reader module_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#8810 - def module_keyword_loc; end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#8822 - def name; end -end - -# Represents a multi-target expression. -# -# a, b, c = 1, 2, 3 -# ^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#8918 -class YARP::MultiTargetNode < ::YARP::Node - # def initialize: (targets: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void - # - # @return [MultiTargetNode] a new instance of MultiTargetNode - # - # source://yarp//lib/yarp/node.rb#8929 - def initialize(targets, lparen_loc, rparen_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#8937 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8942 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#8952 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#8947 - def compact_child_nodes; end - - # def copy: (**params) -> MultiTargetNode - # - # source://yarp//lib/yarp/node.rb#8957 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#8942 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#8970 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#8995 - def human; end - - # source://yarp//lib/yarp/node.rb#8984 - def inspect(inspector = T.unsafe(nil)); end - - # def lparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#8975 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#8923 - def lparen_loc; end - - # def rparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#8980 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#8926 - def rparen_loc; end - - # attr_reader targets: Array[Node] - # - # source://yarp//lib/yarp/node.rb#8920 - def targets; end -end - -# Represents a write to a multi-target expression. -# -# a, b, c = 1, 2, 3 -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#9004 -class YARP::MultiWriteNode < ::YARP::Node - # def initialize: (targets: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [MultiWriteNode] a new instance of MultiWriteNode - # - # source://yarp//lib/yarp/node.rb#9021 - def initialize(targets, lparen_loc, rparen_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9031 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9036 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9046 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9041 - def compact_child_nodes; end - - # def copy: (**params) -> MultiWriteNode - # - # source://yarp//lib/yarp/node.rb#9051 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9036 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9066 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9099 - def human; end - - # source://yarp//lib/yarp/node.rb#9085 - def inspect(inspector = T.unsafe(nil)); end - - # def lparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#9071 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#9009 - def lparen_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#9081 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#9015 - def operator_loc; end - - # def rparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#9076 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#9012 - def rparen_loc; end - - # attr_reader targets: Array[Node] - # - # source://yarp//lib/yarp/node.rb#9006 - def targets; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#9018 - def value; end -end - -# This visitor walks through the tree and copies each node as it is being -# visited. This is useful for consumers that want to mutate the tree, as you -# can change subtrees in place without effecting the rest of the tree. -# -# source://yarp//lib/yarp/mutation_visitor.rb#12 -class YARP::MutationVisitor < ::YARP::BasicVisitor - # Copy a AliasGlobalVariableNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#14 - def visit_alias_global_variable_node(node); end - - # Copy a AliasMethodNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#19 - def visit_alias_method_node(node); end - - # Copy a AlternationPatternNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#24 - def visit_alternation_pattern_node(node); end - - # Copy a AndNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#29 - def visit_and_node(node); end - - # Copy a ArgumentsNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#34 - def visit_arguments_node(node); end - - # Copy a ArrayNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#39 - def visit_array_node(node); end - - # Copy a ArrayPatternNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#44 - def visit_array_pattern_node(node); end - - # Copy a AssocNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#49 - def visit_assoc_node(node); end - - # Copy a AssocSplatNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#54 - def visit_assoc_splat_node(node); end - - # Copy a BackReferenceReadNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#59 - def visit_back_reference_read_node(node); end - - # Copy a BeginNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#64 - def visit_begin_node(node); end - - # Copy a BlockArgumentNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#69 - def visit_block_argument_node(node); end - - # Copy a BlockLocalVariableNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#74 - def visit_block_local_variable_node(node); end - - # Copy a BlockNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#79 - def visit_block_node(node); end - - # Copy a BlockParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#84 - def visit_block_parameter_node(node); end - - # Copy a BlockParametersNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#89 - def visit_block_parameters_node(node); end - - # Copy a BreakNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#94 - def visit_break_node(node); end - - # Copy a CallAndWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#99 - def visit_call_and_write_node(node); end - - # Copy a CallNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#104 - def visit_call_node(node); end - - # Copy a CallOperatorWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#109 - def visit_call_operator_write_node(node); end - - # Copy a CallOrWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#114 - def visit_call_or_write_node(node); end - - # Copy a CapturePatternNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#119 - def visit_capture_pattern_node(node); end - - # Copy a CaseNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#124 - def visit_case_node(node); end - - # Copy a ClassNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#129 - def visit_class_node(node); end - - # Copy a ClassVariableAndWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#134 - def visit_class_variable_and_write_node(node); end - - # Copy a ClassVariableOperatorWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#139 - def visit_class_variable_operator_write_node(node); end - - # Copy a ClassVariableOrWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#144 - def visit_class_variable_or_write_node(node); end - - # Copy a ClassVariableReadNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#149 - def visit_class_variable_read_node(node); end - - # Copy a ClassVariableTargetNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#154 - def visit_class_variable_target_node(node); end - - # Copy a ClassVariableWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#159 - def visit_class_variable_write_node(node); end - - # Copy a ConstantAndWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#164 - def visit_constant_and_write_node(node); end - - # Copy a ConstantOperatorWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#169 - def visit_constant_operator_write_node(node); end - - # Copy a ConstantOrWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#174 - def visit_constant_or_write_node(node); end - - # Copy a ConstantPathAndWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#179 - def visit_constant_path_and_write_node(node); end - - # Copy a ConstantPathNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#184 - def visit_constant_path_node(node); end - - # Copy a ConstantPathOperatorWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#189 - def visit_constant_path_operator_write_node(node); end - - # Copy a ConstantPathOrWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#194 - def visit_constant_path_or_write_node(node); end - - # Copy a ConstantPathTargetNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#199 - def visit_constant_path_target_node(node); end - - # Copy a ConstantPathWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#204 - def visit_constant_path_write_node(node); end - - # Copy a ConstantReadNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#209 - def visit_constant_read_node(node); end - - # Copy a ConstantTargetNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#214 - def visit_constant_target_node(node); end - - # Copy a ConstantWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#219 - def visit_constant_write_node(node); end - - # Copy a DefNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#224 - def visit_def_node(node); end - - # Copy a DefinedNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#229 - def visit_defined_node(node); end - - # Copy a ElseNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#234 - def visit_else_node(node); end - - # Copy a EmbeddedStatementsNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#239 - def visit_embedded_statements_node(node); end - - # Copy a EmbeddedVariableNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#244 - def visit_embedded_variable_node(node); end - - # Copy a EnsureNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#249 - def visit_ensure_node(node); end - - # Copy a FalseNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#254 - def visit_false_node(node); end - - # Copy a FindPatternNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#259 - def visit_find_pattern_node(node); end - - # Copy a FlipFlopNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#264 - def visit_flip_flop_node(node); end - - # Copy a FloatNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#269 - def visit_float_node(node); end - - # Copy a ForNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#274 - def visit_for_node(node); end - - # Copy a ForwardingArgumentsNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#279 - def visit_forwarding_arguments_node(node); end - - # Copy a ForwardingParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#284 - def visit_forwarding_parameter_node(node); end - - # Copy a ForwardingSuperNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#289 - def visit_forwarding_super_node(node); end - - # Copy a GlobalVariableAndWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#294 - def visit_global_variable_and_write_node(node); end - - # Copy a GlobalVariableOperatorWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#299 - def visit_global_variable_operator_write_node(node); end - - # Copy a GlobalVariableOrWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#304 - def visit_global_variable_or_write_node(node); end - - # Copy a GlobalVariableReadNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#309 - def visit_global_variable_read_node(node); end - - # Copy a GlobalVariableTargetNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#314 - def visit_global_variable_target_node(node); end - - # Copy a GlobalVariableWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#319 - def visit_global_variable_write_node(node); end - - # Copy a HashNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#324 - def visit_hash_node(node); end - - # Copy a HashPatternNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#329 - def visit_hash_pattern_node(node); end - - # Copy a IfNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#334 - def visit_if_node(node); end - - # Copy a ImaginaryNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#339 - def visit_imaginary_node(node); end - - # Copy a ImplicitNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#344 - def visit_implicit_node(node); end - - # Copy a InNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#349 - def visit_in_node(node); end - - # Copy a InstanceVariableAndWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#354 - def visit_instance_variable_and_write_node(node); end - - # Copy a InstanceVariableOperatorWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#359 - def visit_instance_variable_operator_write_node(node); end - - # Copy a InstanceVariableOrWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#364 - def visit_instance_variable_or_write_node(node); end - - # Copy a InstanceVariableReadNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#369 - def visit_instance_variable_read_node(node); end - - # Copy a InstanceVariableTargetNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#374 - def visit_instance_variable_target_node(node); end - - # Copy a InstanceVariableWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#379 - def visit_instance_variable_write_node(node); end - - # Copy a IntegerNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#384 - def visit_integer_node(node); end - - # Copy a InterpolatedMatchLastLineNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#389 - def visit_interpolated_match_last_line_node(node); end - - # Copy a InterpolatedRegularExpressionNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#394 - def visit_interpolated_regular_expression_node(node); end - - # Copy a InterpolatedStringNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#399 - def visit_interpolated_string_node(node); end - - # Copy a InterpolatedSymbolNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#404 - def visit_interpolated_symbol_node(node); end - - # Copy a InterpolatedXStringNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#409 - def visit_interpolated_x_string_node(node); end - - # Copy a KeywordHashNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#414 - def visit_keyword_hash_node(node); end - - # Copy a KeywordParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#419 - def visit_keyword_parameter_node(node); end - - # Copy a KeywordRestParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#424 - def visit_keyword_rest_parameter_node(node); end - - # Copy a LambdaNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#429 - def visit_lambda_node(node); end - - # Copy a LocalVariableAndWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#434 - def visit_local_variable_and_write_node(node); end - - # Copy a LocalVariableOperatorWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#439 - def visit_local_variable_operator_write_node(node); end - - # Copy a LocalVariableOrWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#444 - def visit_local_variable_or_write_node(node); end - - # Copy a LocalVariableReadNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#449 - def visit_local_variable_read_node(node); end - - # Copy a LocalVariableTargetNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#454 - def visit_local_variable_target_node(node); end - - # Copy a LocalVariableWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#459 - def visit_local_variable_write_node(node); end - - # Copy a MatchLastLineNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#464 - def visit_match_last_line_node(node); end - - # Copy a MatchPredicateNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#469 - def visit_match_predicate_node(node); end - - # Copy a MatchRequiredNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#474 - def visit_match_required_node(node); end - - # Copy a MatchWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#479 - def visit_match_write_node(node); end - - # Copy a MissingNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#484 - def visit_missing_node(node); end - - # Copy a ModuleNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#489 - def visit_module_node(node); end - - # Copy a MultiTargetNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#494 - def visit_multi_target_node(node); end - - # Copy a MultiWriteNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#499 - def visit_multi_write_node(node); end - - # Copy a NextNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#504 - def visit_next_node(node); end - - # Copy a NilNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#509 - def visit_nil_node(node); end - - # Copy a NoKeywordsParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#514 - def visit_no_keywords_parameter_node(node); end - - # Copy a NumberedReferenceReadNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#519 - def visit_numbered_reference_read_node(node); end - - # Copy a OptionalParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#524 - def visit_optional_parameter_node(node); end - - # Copy a OrNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#529 - def visit_or_node(node); end - - # Copy a ParametersNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#534 - def visit_parameters_node(node); end - - # Copy a ParenthesesNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#539 - def visit_parentheses_node(node); end - - # Copy a PinnedExpressionNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#544 - def visit_pinned_expression_node(node); end - - # Copy a PinnedVariableNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#549 - def visit_pinned_variable_node(node); end - - # Copy a PostExecutionNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#554 - def visit_post_execution_node(node); end - - # Copy a PreExecutionNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#559 - def visit_pre_execution_node(node); end - - # Copy a ProgramNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#564 - def visit_program_node(node); end - - # Copy a RangeNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#569 - def visit_range_node(node); end - - # Copy a RationalNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#574 - def visit_rational_node(node); end - - # Copy a RedoNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#579 - def visit_redo_node(node); end - - # Copy a RegularExpressionNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#584 - def visit_regular_expression_node(node); end - - # Copy a RequiredDestructuredParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#589 - def visit_required_destructured_parameter_node(node); end - - # Copy a RequiredParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#594 - def visit_required_parameter_node(node); end - - # Copy a RescueModifierNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#599 - def visit_rescue_modifier_node(node); end - - # Copy a RescueNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#604 - def visit_rescue_node(node); end - - # Copy a RestParameterNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#609 - def visit_rest_parameter_node(node); end - - # Copy a RetryNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#614 - def visit_retry_node(node); end - - # Copy a ReturnNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#619 - def visit_return_node(node); end - - # Copy a SelfNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#624 - def visit_self_node(node); end - - # Copy a SingletonClassNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#629 - def visit_singleton_class_node(node); end - - # Copy a SourceEncodingNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#634 - def visit_source_encoding_node(node); end - - # Copy a SourceFileNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#639 - def visit_source_file_node(node); end - - # Copy a SourceLineNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#644 - def visit_source_line_node(node); end - - # Copy a SplatNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#649 - def visit_splat_node(node); end - - # Copy a StatementsNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#654 - def visit_statements_node(node); end - - # Copy a StringConcatNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#659 - def visit_string_concat_node(node); end - - # Copy a StringNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#664 - def visit_string_node(node); end - - # Copy a SuperNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#669 - def visit_super_node(node); end - - # Copy a SymbolNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#674 - def visit_symbol_node(node); end - - # Copy a TrueNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#679 - def visit_true_node(node); end - - # Copy a UndefNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#684 - def visit_undef_node(node); end - - # Copy a UnlessNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#689 - def visit_unless_node(node); end - - # Copy a UntilNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#694 - def visit_until_node(node); end - - # Copy a WhenNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#699 - def visit_when_node(node); end - - # Copy a WhileNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#704 - def visit_while_node(node); end - - # Copy a XStringNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#709 - def visit_x_string_node(node); end - - # Copy a YieldNode node - # - # source://yarp//lib/yarp/mutation_visitor.rb#714 - def visit_yield_node(node); end -end - -# Represents the use of the `next` keyword. -# -# next 1 -# ^^^^^^ -# -# source://yarp//lib/yarp/node.rb#9108 -class YARP::NextNode < ::YARP::Node - # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void - # - # @return [NextNode] a new instance of NextNode - # - # source://yarp//lib/yarp/node.rb#9116 - def initialize(arguments, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9123 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#9110 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9128 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9140 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9133 - def compact_child_nodes; end - - # def copy: (**params) -> NextNode - # - # source://yarp//lib/yarp/node.rb#9145 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9128 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9157 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9181 - def human; end - - # source://yarp//lib/yarp/node.rb#9166 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#9162 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#9113 - def keyword_loc; end -end - -# Represents the use of the `nil` keyword. -# -# nil -# ^^^ -# -# source://yarp//lib/yarp/node.rb#9190 -class YARP::NilNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [NilNode] a new instance of NilNode - # - # source://yarp//lib/yarp/node.rb#9192 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9197 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9202 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9212 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9207 - def compact_child_nodes; end - - # def copy: (**params) -> NilNode - # - # source://yarp//lib/yarp/node.rb#9217 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9202 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9227 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9239 - def human; end - - # source://yarp//lib/yarp/node.rb#9231 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of `**nil` inside method arguments. -# -# def a(**nil) -# ^^^^^ -# end -# -# source://yarp//lib/yarp/node.rb#9249 -class YARP::NoKeywordsParameterNode < ::YARP::Node - # def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void - # - # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode - # - # source://yarp//lib/yarp/node.rb#9257 - def initialize(operator_loc, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9264 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9269 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9279 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9274 - def compact_child_nodes; end - - # def copy: (**params) -> NoKeywordsParameterNode - # - # source://yarp//lib/yarp/node.rb#9284 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9269 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9296 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9320 - def human; end - - # source://yarp//lib/yarp/node.rb#9310 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#9306 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#9254 - def keyword_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#9301 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#9251 - def operator_loc; end -end - -# This represents a node in the tree. -# -# source://yarp//lib/yarp.rb#289 -class YARP::Node - # Returns the value of attribute location. - # - # source://yarp//lib/yarp.rb#290 - def location; end - - # @return [Boolean] - # - # source://yarp//lib/yarp.rb#292 - def newline?; end - - # source://yarp//lib/yarp.rb#309 - def pretty_print(q); end - - # source://yarp//lib/yarp.rb#296 - def set_newline_flag(newline_marked); end - - # Slice the location of the node from the source. - # - # source://yarp//lib/yarp.rb#305 - def slice; end -end - -# This object is responsible for generating the output for the inspect method -# implementations of child nodes. -# -# source://yarp//lib/yarp.rb#316 -class YARP::NodeInspector - # @return [NodeInspector] a new instance of NodeInspector - # - # source://yarp//lib/yarp.rb#319 - def initialize(prefix = T.unsafe(nil)); end - - # Appends a line to the output with the current prefix. - # - # source://yarp//lib/yarp.rb#325 - def <<(line); end - - # Returns a new inspector that can be used to inspect a child node. - # - # source://yarp//lib/yarp.rb#369 - def child_inspector(append); end - - # Generates a string that represents a child node. - # - # source://yarp//lib/yarp.rb#364 - def child_node(node, append); end - - # This generates a string that is used as the header of the inspect output - # for any given node. - # - # source://yarp//lib/yarp.rb#331 - def header(node); end - - # Generates a string that represents a list of nodes. It handles properly - # using the box drawing characters to make the output look nice. - # - # source://yarp//lib/yarp.rb#341 - def list(prefix, nodes); end - - # Generates a string that represents a location field on a node. - # - # source://yarp//lib/yarp.rb#355 - def location(value); end - - # Returns the value of attribute output. - # - # source://yarp//lib/yarp.rb#317 - def output; end - - # Returns the value of attribute prefix. - # - # source://yarp//lib/yarp.rb#317 - def prefix; end - - # Returns the output as a string. - # - # source://yarp//lib/yarp.rb#374 - def to_str; end -end - -# Represents reading a numbered reference to a capture in the previous match. -# -# $1 -# ^^ -# -# source://yarp//lib/yarp/node.rb#9329 -class YARP::NumberedReferenceReadNode < ::YARP::Node - # def initialize: (number: Integer, location: Location) -> void - # - # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode - # - # source://yarp//lib/yarp/node.rb#9334 - def initialize(number, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9340 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9345 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9355 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9350 - def compact_child_nodes; end - - # def copy: (**params) -> NumberedReferenceReadNode - # - # source://yarp//lib/yarp/node.rb#9360 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9345 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9371 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9384 - def human; end - - # source://yarp//lib/yarp/node.rb#9375 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader number: Integer - # - # source://yarp//lib/yarp/node.rb#9331 - def number; end -end - -# Represents an optional parameter to a method, block, or lambda definition. -# -# def a(b = 1) -# ^^^^^ -# end -# -# source://yarp//lib/yarp/node.rb#9394 -class YARP::OptionalParameterNode < ::YARP::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [OptionalParameterNode] a new instance of OptionalParameterNode - # - # source://yarp//lib/yarp/node.rb#9408 - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9417 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9422 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9432 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9427 - def compact_child_nodes; end - - # def copy: (**params) -> OptionalParameterNode - # - # source://yarp//lib/yarp/node.rb#9437 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9422 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9451 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9473 - def human; end - - # source://yarp//lib/yarp/node.rb#9460 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#9396 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/yarp/node.rb#9399 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#9456 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#9402 - def operator_loc; end - - # attr_reader value: Node - # - # source://yarp//lib/yarp/node.rb#9405 - def value; end -end - -# Represents the use of the `||` operator or the `or` keyword. -# -# left or right -# ^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#9482 -class YARP::OrNode < ::YARP::Node - # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - # - # @return [OrNode] a new instance of OrNode - # - # source://yarp//lib/yarp/node.rb#9493 - def initialize(left, right, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9501 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9506 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9516 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9511 - def compact_child_nodes; end - - # def copy: (**params) -> OrNode - # - # source://yarp//lib/yarp/node.rb#9521 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9506 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9534 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9556 - def human; end - - # source://yarp//lib/yarp/node.rb#9543 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://yarp//lib/yarp/node.rb#9484 - def left; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#9539 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#9490 - def operator_loc; end - - # attr_reader right: Node - # - # source://yarp//lib/yarp/node.rb#9487 - def right; end -end - -# source://yarp//lib/yarp/pack.rb#4 -module YARP::Pack - class << self - def parse(_arg0, _arg1, _arg2); end - end -end - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::BACK = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::BER = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#57 -class YARP::Pack::Directive - # @return [Directive] a new instance of Directive - # - # source://yarp//lib/yarp/pack.rb#60 - def initialize(version, variant, source, type, signed, endian, size, length_type, length); end - - # source://yarp//lib/yarp/pack.rb#98 - def describe; end - - # Returns the value of attribute endian. - # - # source://yarp//lib/yarp/pack.rb#58 - def endian; end - - # Returns the value of attribute length. - # - # source://yarp//lib/yarp/pack.rb#58 - def length; end - - # Returns the value of attribute length_type. - # - # source://yarp//lib/yarp/pack.rb#58 - def length_type; end - - # Returns the value of attribute signed. - # - # source://yarp//lib/yarp/pack.rb#58 - def signed; end - - # Returns the value of attribute size. - # - # source://yarp//lib/yarp/pack.rb#58 - def size; end - - # Returns the value of attribute source. - # - # source://yarp//lib/yarp/pack.rb#58 - def source; end - - # Returns the value of attribute type. - # - # source://yarp//lib/yarp/pack.rb#58 - def type; end - - # Returns the value of attribute variant. - # - # source://yarp//lib/yarp/pack.rb#58 - def variant; end - - # Returns the value of attribute version. - # - # source://yarp//lib/yarp/pack.rb#58 - def version; end -end - -# source://yarp//lib/yarp/pack.rb#72 -YARP::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# source://yarp//lib/yarp/pack.rb#80 -YARP::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# source://yarp//lib/yarp/pack.rb#86 -YARP::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#162 -class YARP::Pack::Format - # @return [Format] a new instance of Format - # - # source://yarp//lib/yarp/pack.rb#165 - def initialize(directives, encoding); end - - # source://yarp//lib/yarp/pack.rb#170 - def describe; end - - # Returns the value of attribute directives. - # - # source://yarp//lib/yarp/pack.rb#163 - def directives; end - - # Returns the value of attribute encoding. - # - # source://yarp//lib/yarp/pack.rb#163 - def encoding; end -end - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::MOVE = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::NULL = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::SPACE = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) - -# source://yarp//lib/yarp/pack.rb#54 -YARP::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://yarp//lib/yarp/node.rb#9566 -class YARP::ParametersNode < ::YARP::Node - # def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void - # - # @return [ParametersNode] a new instance of ParametersNode - # - # source://yarp//lib/yarp/node.rb#9589 - def initialize(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9601 - def accept(visitor); end - - # attr_reader block: BlockParameterNode? - # - # source://yarp//lib/yarp/node.rb#9586 - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9606 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9624 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9611 - def compact_child_nodes; end - - # def copy: (**params) -> ParametersNode - # - # source://yarp//lib/yarp/node.rb#9629 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9606 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9646 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9680 - def human; end - - # source://yarp//lib/yarp/node.rb#9650 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader keyword_rest: Node? - # - # source://yarp//lib/yarp/node.rb#9583 - def keyword_rest; end - - # attr_reader keywords: Array[Node] - # - # source://yarp//lib/yarp/node.rb#9580 - def keywords; end - - # attr_reader optionals: Array[Node] - # - # source://yarp//lib/yarp/node.rb#9571 - def optionals; end - - # attr_reader posts: Array[Node] - # - # source://yarp//lib/yarp/node.rb#9577 - def posts; end - - # attr_reader requireds: Array[Node] - # - # source://yarp//lib/yarp/node.rb#9568 - def requireds; end - - # attr_reader rest: RestParameterNode? - # - # source://yarp//lib/yarp/node.rb#9574 - def rest; end -end - -# Represents a parenthesized expression -# -# (10 + 34) -# ^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#9689 -class YARP::ParenthesesNode < ::YARP::Node - # def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [ParenthesesNode] a new instance of ParenthesesNode - # - # source://yarp//lib/yarp/node.rb#9700 - def initialize(body, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9708 - def accept(visitor); end - - # attr_reader body: Node? - # - # source://yarp//lib/yarp/node.rb#9691 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9717 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#9757 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#9697 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9729 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9722 - def compact_child_nodes; end - - # def copy: (**params) -> ParenthesesNode - # - # source://yarp//lib/yarp/node.rb#9734 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9717 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9747 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9777 - def human; end - - # source://yarp//lib/yarp/node.rb#9761 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#9752 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#9694 - def opening_loc; end - - # source://yarp//lib/yarp/node.rb#9712 - def set_newline_flag(newline_marked); end -end - -# This represents an error that was encountered during parsing. -# -# source://yarp//lib/yarp.rb#170 -class YARP::ParseError - # @return [ParseError] a new instance of ParseError - # - # source://yarp//lib/yarp.rb#173 - def initialize(message, location); end - - # source://yarp//lib/yarp.rb#178 - def deconstruct_keys(keys); end - - # source://yarp//lib/yarp.rb#182 - def inspect; end - - # Returns the value of attribute location. - # - # source://yarp//lib/yarp.rb#171 - def location; end - - # Returns the value of attribute message. - # - # source://yarp//lib/yarp.rb#171 - 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://yarp//lib/yarp.rb#229 -class YARP::ParseResult - # @return [ParseResult] a new instance of ParseResult - # - # source://yarp//lib/yarp.rb#232 - def initialize(value, comments, errors, warnings, source); end - - # Attach the list of comments to their respective locations in the tree. - # - # source://yarp//lib/yarp/parse_result/comments.rb#168 - def attach_comments!; end - - # Returns the value of attribute comments. - # - # source://yarp//lib/yarp.rb#230 - def comments; end - - # source://yarp//lib/yarp.rb#240 - def deconstruct_keys(keys); end - - # Returns the value of attribute errors. - # - # source://yarp//lib/yarp.rb#230 - def errors; end - - # @return [Boolean] - # - # source://yarp//lib/yarp.rb#248 - def failure?; end - - # Walk the tree and mark nodes that are on a new line. - # - # source://yarp//lib/yarp/parse_result/newlines.rb#56 - def mark_newlines!; end - - # Returns the value of attribute source. - # - # source://yarp//lib/yarp.rb#230 - def source; end - - # @return [Boolean] - # - # source://yarp//lib/yarp.rb#244 - def success?; end - - # Returns the value of attribute value. - # - # source://yarp//lib/yarp.rb#230 - def value; end - - # Returns the value of attribute warnings. - # - # source://yarp//lib/yarp.rb#230 - 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://yarp//lib/yarp/parse_result/comments.rb#19 -class YARP::ParseResult::Comments - # @return [Comments] a new instance of Comments - # - # source://yarp//lib/yarp/parse_result/comments.rb#75 - def initialize(parse_result); end - - # source://yarp//lib/yarp/parse_result/comments.rb#79 - def attach!; end - - # Returns the value of attribute parse_result. - # - # source://yarp//lib/yarp/parse_result/comments.rb#73 - def parse_result; end - - private - - # Responsible for finding the nearest targets to the given comment within - # the context of the given encapsulating node. - # - # source://yarp//lib/yarp/parse_result/comments.rb#98 - def nearest_targets(node, comment); end -end - -# A target for attaching comments that is based on a location field on a -# node. For example, the `end` token of a ClassNode. -# -# source://yarp//lib/yarp/parse_result/comments.rb#49 -class YARP::ParseResult::Comments::LocationTarget - # @return [LocationTarget] a new instance of LocationTarget - # - # source://yarp//lib/yarp/parse_result/comments.rb#52 - def initialize(location); end - - # source://yarp//lib/yarp/parse_result/comments.rb#68 - def <<(comment); end - - # @return [Boolean] - # - # source://yarp//lib/yarp/parse_result/comments.rb#64 - def encloses?(comment); end - - # source://yarp//lib/yarp/parse_result/comments.rb#60 - def end_offset; end - - # Returns the value of attribute location. - # - # source://yarp//lib/yarp/parse_result/comments.rb#50 - def location; end - - # source://yarp//lib/yarp/parse_result/comments.rb#56 - def start_offset; end -end - -# A target for attaching comments that is based on a specific node's -# location. -# -# source://yarp//lib/yarp/parse_result/comments.rb#22 -class YARP::ParseResult::Comments::NodeTarget - # @return [NodeTarget] a new instance of NodeTarget - # - # source://yarp//lib/yarp/parse_result/comments.rb#25 - def initialize(node); end - - # source://yarp//lib/yarp/parse_result/comments.rb#42 - def <<(comment); end - - # @return [Boolean] - # - # source://yarp//lib/yarp/parse_result/comments.rb#37 - def encloses?(comment); end - - # source://yarp//lib/yarp/parse_result/comments.rb#33 - def end_offset; end - - # Returns the value of attribute node. - # - # source://yarp//lib/yarp/parse_result/comments.rb#23 - def node; end - - # source://yarp//lib/yarp/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://yarp//lib/yarp/parse_result/newlines.rb#20 -class YARP::ParseResult::Newlines < ::YARP::Visitor - # @return [Newlines] a new instance of Newlines - # - # source://yarp//lib/yarp/parse_result/newlines.rb#21 - def initialize(newline_marked); end - - # source://yarp//lib/yarp/parse_result/newlines.rb#25 - def visit_block_node(node); end - - # source://yarp//lib/yarp/parse_result/newlines.rb#38 - def visit_if_node(node); end - - # source://yarp//lib/yarp/parse_result/newlines.rb#25 - def visit_lambda_node(node); end - - # source://yarp//lib/yarp/parse_result/newlines.rb#45 - def visit_statements_node(node); end - - # source://yarp//lib/yarp/parse_result/newlines.rb#38 - def visit_unless_node(node); end -end - -# This represents a warning that was encountered during parsing. -# -# source://yarp//lib/yarp.rb#188 -class YARP::ParseWarning - # @return [ParseWarning] a new instance of ParseWarning - # - # source://yarp//lib/yarp.rb#191 - def initialize(message, location); end - - # source://yarp//lib/yarp.rb#196 - def deconstruct_keys(keys); end - - # source://yarp//lib/yarp.rb#200 - def inspect; end - - # Returns the value of attribute location. - # - # source://yarp//lib/yarp.rb#189 - def location; end - - # Returns the value of attribute message. - # - # source://yarp//lib/yarp.rb#189 - 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: :YARP], 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 YARP 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 = YARP::Pattern.new("ConstantPathNode[ConstantReadNode[name: :YARP], 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 YARP::Pattern::CompilationError will be -# raised. -# -# source://yarp//lib/yarp/pattern.rb#37 -class YARP::Pattern - # @return [Pattern] a new instance of Pattern - # - # source://yarp//lib/yarp/pattern.rb#58 - def initialize(query); end - - # source://yarp//lib/yarp/pattern.rb#63 - def compile; end - - # Returns the value of attribute query. - # - # source://yarp//lib/yarp/pattern.rb#56 - def query; end - - # source://yarp//lib/yarp/pattern.rb#68 - def scan(root); end - - private - - # Shortcut for combining two procs into one that returns true if both return - # true. - # - # source://yarp//lib/yarp/pattern.rb#84 - def combine_and(left, right); end - - # Shortcut for combining two procs into one that returns true if either - # returns true. - # - # source://yarp//lib/yarp/pattern.rb#90 - def combine_or(left, right); end - - # in foo | bar - # - # source://yarp//lib/yarp/pattern.rb#125 - def compile_alternation_pattern_node(node); end - - # in [foo, bar, baz] - # - # source://yarp//lib/yarp/pattern.rb#100 - def compile_array_pattern_node(node); end - - # in YARP::ConstantReadNode - # - # source://yarp//lib/yarp/pattern.rb#130 - def compile_constant_path_node(node); end - - # in ConstantReadNode - # in String - # - # source://yarp//lib/yarp/pattern.rb#142 - def compile_constant_read_node(node); end - - # Raise an error because the given node is not supported. - # - # @raise [CompilationError] - # - # source://yarp//lib/yarp/pattern.rb#95 - def compile_error(node); end - - # in InstanceVariableReadNode[name: Symbol] - # in { name: Symbol } - # - # source://yarp//lib/yarp/pattern.rb#160 - def compile_hash_pattern_node(node); end - - # in nil - # - # source://yarp//lib/yarp/pattern.rb#185 - def compile_nil_node(node); end - - # Compile any kind of node. Dispatch out to the individual compilation - # methods based on the type of node. - # - # source://yarp//lib/yarp/pattern.rb#214 - def compile_node(node); end - - # in /foo/ - # - # source://yarp//lib/yarp/pattern.rb#190 - def compile_regular_expression_node(node); end - - # in "" - # in "foo" - # - # source://yarp//lib/yarp/pattern.rb#198 - def compile_string_node(node); end - - # in :+ - # in :foo - # - # source://yarp//lib/yarp/pattern.rb#206 - def compile_symbol_node(node); end -end - -# Raised when the query given to a pattern is either invalid Ruby syntax or -# is using syntax that we don't yet support. -# -# source://yarp//lib/yarp/pattern.rb#40 -class YARP::Pattern::CompilationError < ::StandardError - # @return [CompilationError] a new instance of CompilationError - # - # source://yarp//lib/yarp/pattern.rb#41 - def initialize(repr); end -end - -# Represents the use of the `^` operator for pinning an expression in a -# pattern matching expression. -# -# foo in ^(bar) -# ^^^^^^ -# -# source://yarp//lib/yarp/node.rb#9787 -class YARP::PinnedExpressionNode < ::YARP::Node - # def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void - # - # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode - # - # source://yarp//lib/yarp/node.rb#9801 - def initialize(expression, operator_loc, lparen_loc, rparen_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9810 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9815 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9825 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9820 - def compact_child_nodes; end - - # def copy: (**params) -> PinnedExpressionNode - # - # source://yarp//lib/yarp/node.rb#9830 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9815 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9844 - def deconstruct_keys(keys); end - - # attr_reader expression: Node - # - # source://yarp//lib/yarp/node.rb#9789 - def expression; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9876 - def human; end - - # source://yarp//lib/yarp/node.rb#9863 - def inspect(inspector = T.unsafe(nil)); end - - # def lparen: () -> String - # - # source://yarp//lib/yarp/node.rb#9854 - def lparen; end - - # attr_reader lparen_loc: Location - # - # source://yarp//lib/yarp/node.rb#9795 - def lparen_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#9849 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#9792 - def operator_loc; end - - # def rparen: () -> String - # - # source://yarp//lib/yarp/node.rb#9859 - def rparen; end - - # attr_reader rparen_loc: Location - # - # source://yarp//lib/yarp/node.rb#9798 - def rparen_loc; end -end - -# Represents the use of the `^` operator for pinning a variable in a pattern -# matching expression. -# -# foo in ^bar -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#9886 -class YARP::PinnedVariableNode < ::YARP::Node - # def initialize: (variable: Node, operator_loc: Location, location: Location) -> void - # - # @return [PinnedVariableNode] a new instance of PinnedVariableNode - # - # source://yarp//lib/yarp/node.rb#9894 - def initialize(variable, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9901 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9906 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#9916 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9911 - def compact_child_nodes; end - - # def copy: (**params) -> PinnedVariableNode - # - # source://yarp//lib/yarp/node.rb#9921 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9906 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#9933 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#9953 - def human; end - - # source://yarp//lib/yarp/node.rb#9942 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#9938 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#9891 - def operator_loc; end - - # attr_reader variable: Node - # - # source://yarp//lib/yarp/node.rb#9888 - def variable; end -end - -# Represents the use of the `END` keyword. -# -# END { foo } -# ^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#9962 -class YARP::PostExecutionNode < ::YARP::Node - # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [PostExecutionNode] a new instance of PostExecutionNode - # - # source://yarp//lib/yarp/node.rb#9976 - def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#9985 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9990 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#10036 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#9973 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10002 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#9995 - def compact_child_nodes; end - - # def copy: (**params) -> PostExecutionNode - # - # source://yarp//lib/yarp/node.rb#10007 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#9990 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10021 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10057 - def human; end - - # source://yarp//lib/yarp/node.rb#10040 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#10026 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#9967 - def keyword_loc; end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#10031 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#9970 - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#9964 - def statements; end -end - -# Represents the use of the `BEGIN` keyword. -# -# BEGIN { foo } -# ^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#10066 -class YARP::PreExecutionNode < ::YARP::Node - # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [PreExecutionNode] a new instance of PreExecutionNode - # - # source://yarp//lib/yarp/node.rb#10080 - def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10089 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10094 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#10140 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#10077 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10106 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10099 - def compact_child_nodes; end - - # def copy: (**params) -> PreExecutionNode - # - # source://yarp//lib/yarp/node.rb#10111 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10094 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10125 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10161 - def human; end - - # source://yarp//lib/yarp/node.rb#10144 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#10130 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#10071 - def keyword_loc; end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#10135 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#10074 - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#10068 - def statements; end -end - -# The top level node of any parse tree. -# -# source://yarp//lib/yarp/node.rb#10167 -class YARP::ProgramNode < ::YARP::Node - # def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void - # - # @return [ProgramNode] a new instance of ProgramNode - # - # source://yarp//lib/yarp/node.rb#10175 - def initialize(locals, statements, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10182 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10187 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10197 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10192 - def compact_child_nodes; end - - # def copy: (**params) -> ProgramNode - # - # source://yarp//lib/yarp/node.rb#10202 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10187 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10214 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10229 - def human; end - - # source://yarp//lib/yarp/node.rb#10218 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://yarp//lib/yarp/node.rb#10169 - def locals; end - - # attr_reader statements: StatementsNode - # - # source://yarp//lib/yarp/node.rb#10172 - def statements; end -end - -# source://yarp//lib/yarp/node.rb#12922 -module YARP::RangeFlags; end - -# ... operator -# -# source://yarp//lib/yarp/node.rb#12924 -YARP::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://yarp//lib/yarp/node.rb#10241 -class YARP::RangeNode < ::YARP::Node - # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void - # - # @return [RangeNode] a new instance of RangeNode - # - # source://yarp//lib/yarp/node.rb#10255 - def initialize(left, right, operator_loc, flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10264 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10269 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10282 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10274 - def compact_child_nodes; end - - # def copy: (**params) -> RangeNode - # - # source://yarp//lib/yarp/node.rb#10287 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10269 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10301 - def deconstruct_keys(keys); end - - # def exclude_end?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10311 - def exclude_end?; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10338 - def human; end - - # source://yarp//lib/yarp/node.rb#10315 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node? - # - # source://yarp//lib/yarp/node.rb#10243 - def left; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#10306 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#10249 - def operator_loc; end - - # attr_reader right: Node? - # - # source://yarp//lib/yarp/node.rb#10246 - def right; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#10252 - def flags; end -end - -# Represents a rational number literal. -# -# 1.0r -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#10347 -class YARP::RationalNode < ::YARP::Node - # def initialize: (numeric: Node, location: Location) -> void - # - # @return [RationalNode] a new instance of RationalNode - # - # source://yarp//lib/yarp/node.rb#10352 - def initialize(numeric, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10358 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10363 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10373 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10368 - def compact_child_nodes; end - - # def copy: (**params) -> RationalNode - # - # source://yarp//lib/yarp/node.rb#10378 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10363 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10389 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10403 - def human; end - - # source://yarp//lib/yarp/node.rb#10393 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader numeric: Node - # - # source://yarp//lib/yarp/node.rb#10349 - def numeric; end - - # Returns the value of the node as a Ruby Rational. - # - # source://yarp//lib/yarp.rb#601 - def value; end -end - -# Represents the use of the `redo` keyword. -# -# redo -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#10412 -class YARP::RedoNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [RedoNode] a new instance of RedoNode - # - # source://yarp//lib/yarp/node.rb#10414 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10419 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10424 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10434 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10429 - def compact_child_nodes; end - - # def copy: (**params) -> RedoNode - # - # source://yarp//lib/yarp/node.rb#10439 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10424 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10449 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10461 - def human; end - - # source://yarp//lib/yarp/node.rb#10453 - def inspect(inspector = T.unsafe(nil)); end -end - -# source://yarp//lib/yarp/node.rb#12927 -module YARP::RegularExpressionFlags; end - -# n - forces the ASCII-8BIT encoding -# -# source://yarp//lib/yarp/node.rb#12941 -YARP::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) - -# e - forces the EUC-JP encoding -# -# source://yarp//lib/yarp/node.rb#12938 -YARP::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) - -# x - ignores whitespace and allows comments in regular expressions -# -# source://yarp//lib/yarp/node.rb#12932 -YARP::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) - -# i - ignores the case of characters when matching -# -# source://yarp//lib/yarp/node.rb#12929 -YARP::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) - -# m - allows $ to match the end of lines within strings -# -# source://yarp//lib/yarp/node.rb#12935 -YARP::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) - -# o - only interpolates values into the regular expression once -# -# source://yarp//lib/yarp/node.rb#12950 -YARP::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) - -# u - forces the UTF-8 encoding -# -# source://yarp//lib/yarp/node.rb#12947 -YARP::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) - -# s - forces the Windows-31J encoding -# -# source://yarp//lib/yarp/node.rb#12944 -YARP::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) - -# Represents a regular expression literal with no interpolation. -# -# /foo/i -# ^^^^^^ -# -# source://yarp//lib/yarp/node.rb#10470 -class YARP::RegularExpressionNode < ::YARP::Node - # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void - # - # @return [RegularExpressionNode] a new instance of RegularExpressionNode - # - # source://yarp//lib/yarp/node.rb#10487 - def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10497 - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10572 - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10502 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#10547 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#10478 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10512 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10507 - def compact_child_nodes; end - - # def content: () -> String - # - # source://yarp//lib/yarp/node.rb#10542 - def content; end - - # attr_reader content_loc: Location - # - # source://yarp//lib/yarp/node.rb#10475 - def content_loc; end - - # def copy: (**params) -> RegularExpressionNode - # - # source://yarp//lib/yarp/node.rb#10517 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10502 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10532 - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10567 - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10557 - def extended?; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10605 - def human; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10552 - def ignore_case?; end - - # source://yarp//lib/yarp/node.rb#10591 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10562 - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10587 - def once?; end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#10537 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#10472 - def opening_loc; end - - # Returns a numeric value that represents the flags that were used to create - # the regular expression. - # - # source://yarp//lib/yarp.rb#609 - def options; end - - # attr_reader unescaped: String - # - # source://yarp//lib/yarp/node.rb#10481 - def unescaped; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10582 - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#10577 - def windows_31j?; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#10484 - def flags; end -end - -# Represents a destructured required parameter node. -# -# def foo((bar, baz)) -# ^^^^^^^^^^ -# end -# -# source://yarp//lib/yarp/node.rb#10615 -class YARP::RequiredDestructuredParameterNode < ::YARP::Node - # def initialize: (parameters: Array[Node], opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [RequiredDestructuredParameterNode] a new instance of RequiredDestructuredParameterNode - # - # source://yarp//lib/yarp/node.rb#10626 - def initialize(parameters, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10634 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10639 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#10677 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#10623 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10649 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10644 - def compact_child_nodes; end - - # def copy: (**params) -> RequiredDestructuredParameterNode - # - # source://yarp//lib/yarp/node.rb#10654 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10639 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10667 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10692 - def human; end - - # source://yarp//lib/yarp/node.rb#10681 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#10672 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#10620 - def opening_loc; end - - # attr_reader parameters: Array[Node] - # - # source://yarp//lib/yarp/node.rb#10617 - def parameters; end -end - -# Represents a required parameter to a method, block, or lambda definition. -# -# def a(b) -# ^ -# end -# -# source://yarp//lib/yarp/node.rb#10702 -class YARP::RequiredParameterNode < ::YARP::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [RequiredParameterNode] a new instance of RequiredParameterNode - # - # source://yarp//lib/yarp/node.rb#10707 - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10713 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10718 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10728 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10723 - def compact_child_nodes; end - - # def copy: (**params) -> RequiredParameterNode - # - # source://yarp//lib/yarp/node.rb#10733 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10718 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10744 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10757 - def human; end - - # source://yarp//lib/yarp/node.rb#10748 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://yarp//lib/yarp/node.rb#10704 - def name; end -end - -# Represents an expression modified with a rescue. -# -# foo rescue nil -# ^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#10766 -class YARP::RescueModifierNode < ::YARP::Node - # def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void - # - # @return [RescueModifierNode] a new instance of RescueModifierNode - # - # source://yarp//lib/yarp/node.rb#10777 - def initialize(expression, keyword_loc, rescue_expression, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10785 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10794 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10804 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10799 - def compact_child_nodes; end - - # def copy: (**params) -> RescueModifierNode - # - # source://yarp//lib/yarp/node.rb#10809 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10794 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10822 - def deconstruct_keys(keys); end - - # attr_reader expression: Node - # - # source://yarp//lib/yarp/node.rb#10768 - def expression; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10844 - def human; end - - # source://yarp//lib/yarp/node.rb#10831 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#10827 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#10771 - def keyword_loc; end - - # attr_reader rescue_expression: Node - # - # source://yarp//lib/yarp/node.rb#10774 - def rescue_expression; end - - # source://yarp//lib/yarp/node.rb#10789 - def set_newline_flag(newline_marked); end -end - -# Represents a rescue statement. -# -# begin -# rescue Foo, *splat, Bar => ex -# ^^^^^^ -# foo -# end -# -# `Foo, *splat, Bar` are in the `exceptions` field. -# `ex` is in the `exception` field. -# -# source://yarp//lib/yarp/node.rb#10859 -class YARP::RescueNode < ::YARP::Node - # def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void - # - # @return [RescueNode] a new instance of RescueNode - # - # source://yarp//lib/yarp/node.rb#10879 - def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#10890 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10895 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#10910 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#10900 - def compact_child_nodes; end - - # attr_reader consequent: RescueNode? - # - # source://yarp//lib/yarp/node.rb#10876 - def consequent; end - - # def copy: (**params) -> RescueNode - # - # source://yarp//lib/yarp/node.rb#10915 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#10895 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#10931 - def deconstruct_keys(keys); end - - # attr_reader exceptions: Array[Node] - # - # source://yarp//lib/yarp/node.rb#10864 - def exceptions; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#10974 - def human; end - - # source://yarp//lib/yarp/node.rb#10945 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#10936 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#10861 - def keyword_loc; end - - # def operator: () -> String? - # - # source://yarp//lib/yarp/node.rb#10941 - def operator; end - - # attr_reader operator_loc: Location? - # - # source://yarp//lib/yarp/node.rb#10867 - def operator_loc; end - - # attr_reader reference: Node? - # - # source://yarp//lib/yarp/node.rb#10870 - def reference; end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#10873 - def statements; end -end - -# Represents a rest parameter to a method, block, or lambda definition. -# -# def a(*b) -# ^^ -# end -# -# source://yarp//lib/yarp/node.rb#10984 -class YARP::RestParameterNode < ::YARP::Node - # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - # - # @return [RestParameterNode] a new instance of RestParameterNode - # - # source://yarp//lib/yarp/node.rb#10995 - def initialize(name, name_loc, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11003 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11008 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11018 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11013 - def compact_child_nodes; end - - # def copy: (**params) -> RestParameterNode - # - # source://yarp//lib/yarp/node.rb#11023 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11008 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11036 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11056 - def human; end - - # source://yarp//lib/yarp/node.rb#11045 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://yarp//lib/yarp/node.rb#10986 - def name; end - - # attr_reader name_loc: Location? - # - # source://yarp//lib/yarp/node.rb#10989 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#11041 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#10992 - def operator_loc; end -end - -# Represents the use of the `retry` keyword. -# -# retry -# ^^^^^ -# -# source://yarp//lib/yarp/node.rb#11065 -class YARP::RetryNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [RetryNode] a new instance of RetryNode - # - # source://yarp//lib/yarp/node.rb#11067 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11072 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11077 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11087 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11082 - def compact_child_nodes; end - - # def copy: (**params) -> RetryNode - # - # source://yarp//lib/yarp/node.rb#11092 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11077 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11102 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11114 - def human; end - - # source://yarp//lib/yarp/node.rb#11106 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of the `return` keyword. -# -# return 1 -# ^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#11123 -class YARP::ReturnNode < ::YARP::Node - # def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void - # - # @return [ReturnNode] a new instance of ReturnNode - # - # source://yarp//lib/yarp/node.rb#11131 - def initialize(keyword_loc, arguments, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11138 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#11128 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11143 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11155 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11148 - def compact_child_nodes; end - - # def copy: (**params) -> ReturnNode - # - # source://yarp//lib/yarp/node.rb#11160 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11143 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11172 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11196 - def human; end - - # source://yarp//lib/yarp/node.rb#11181 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#11177 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#11125 - def keyword_loc; end -end - -# This class is meant to provide a compatibility layer between YARP 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 YARP. It is also -# meant as a test harness for the YARP parser. -# -# source://yarp//lib/yarp/ripper_compat.rb#13 -class YARP::RipperCompat - # @return [RipperCompat] a new instance of RipperCompat - # - # source://yarp//lib/yarp/ripper_compat.rb#59 - def initialize(source); end - - # Returns the value of attribute column. - # - # source://yarp//lib/yarp/ripper_compat.rb#57 - def column; end - - # Public interface - # - # @return [Boolean] - # - # source://yarp//lib/yarp/ripper_compat.rb#70 - def error?; end - - # Returns the value of attribute lineno. - # - # source://yarp//lib/yarp/ripper_compat.rb#57 - def lineno; end - - # source://yarp//lib/yarp/ripper_compat.rb#74 - def parse; end - - # Returns the value of attribute source. - # - # source://yarp//lib/yarp/ripper_compat.rb#57 - def source; end - - # Visitor methods - # - # source://yarp//lib/yarp/ripper_compat.rb#82 - def visit(node); end - - # source://yarp//lib/yarp/ripper_compat.rb#86 - def visit_call_node(node); end - - # source://yarp//lib/yarp/ripper_compat.rb#100 - def visit_integer_node(node); end - - # source://yarp//lib/yarp/ripper_compat.rb#125 - def visit_program_node(node); end - - # source://yarp//lib/yarp/ripper_compat.rb#105 - def visit_statements_node(node); end - - # source://yarp//lib/yarp/ripper_compat.rb#112 - def visit_token(node); end - - private - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def _dispatch0; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def _dispatch1(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def _dispatch2(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def _dispatch3(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#166 - def _dispatch4(_, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#167 - def _dispatch5(_, _, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#168 - 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://yarp//lib/yarp/ripper_compat.rb#151 - def bounds(location); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_BEGIN(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_CHAR(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_END(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on___end__(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_alias(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_alias_error(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_aref(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_aref_field(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_arg_ambiguous(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_arg_paren(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_args_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_args_add_block(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_args_add_star(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_args_forward; end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_args_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_array(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#166 - def on_aryptn(_, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_assign(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_assign_error(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_assoc_new(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_assoc_splat(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_assoclist_from_args(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_backref(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_backtick(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_bare_assoc_hash(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_begin(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_binary(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_block_var(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_blockarg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#166 - def on_bodystmt(_, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_brace_block(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_break(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_call(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_case(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_class(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_class_name_error(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_comma(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_command(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#166 - def on_command_call(_, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_comment(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_const(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_const_path_field(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_const_path_ref(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_const_ref(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_cvar(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_def(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_defined(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#167 - def on_defs(_, _, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_do_block(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_dot2(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_dot3(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_dyna_symbol(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_else(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_elsif(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_embdoc(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_embdoc_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_embdoc_end(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_embexpr_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_embexpr_end(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_embvar(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_ensure(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_excessed_comma; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_fcall(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_field(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_float(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#166 - def on_fndptn(_, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_for(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_gvar(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_hash(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_heredoc_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_heredoc_dedent(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_heredoc_end(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_hshptn(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_ident(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_if(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_if_mod(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_ifop(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_ignored_nl(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_ignored_sp(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_imaginary(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_in(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_int(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_ivar(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_kw(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_kwrest_param(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_label(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_label_end(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_lambda(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_lbrace(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_lbracket(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_lparen(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_magic_comment(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_massign(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_method_add_arg(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_method_add_block(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_mlhs_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_mlhs_add_post(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_mlhs_add_star(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_mlhs_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_mlhs_paren(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_module(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_mrhs_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_mrhs_add_star(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_mrhs_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_mrhs_new_from_args(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_next(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_nl(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_nokw_param(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_op(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_opassign(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_operator_ambiguous(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_param_error(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#168 - def on_params(_, _, _, _, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_paren(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_parse_error(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_period(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_program(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_qsymbols_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_qsymbols_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_qsymbols_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_qwords_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_qwords_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_qwords_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_rational(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_rbrace(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_rbracket(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_redo; end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_regexp_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_regexp_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_regexp_end(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_regexp_literal(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_regexp_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#166 - def on_rescue(_, _, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_rescue_mod(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_rest_param(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_retry; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_return(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_return0; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_rparen(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_sclass(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_semicolon(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_sp(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_stmts_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_stmts_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_string_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_string_concat(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_string_content; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_string_dvar(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_string_embexpr(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_string_literal(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_super(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_symbeg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_symbol(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_symbol_literal(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_symbols_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_symbols_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_symbols_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_tlambda(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_tlambeg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_top_const_field(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_top_const_ref(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_tstring_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_tstring_content(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_tstring_end(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_unary(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_undef(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_unless(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_unless_mod(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_until(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_until_mod(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_var_alias(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_var_field(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_var_ref(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_vcall(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_void_stmt; end - - # source://yarp//lib/yarp/ripper_compat.rb#165 - def on_when(_, _, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_while(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_while_mod(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_word_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_word_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_words_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_words_beg(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_words_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_words_sep(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#164 - def on_xstring_add(_, _); end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_xstring_literal(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_xstring_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#163 - def on_yield(_); end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_yield0; end - - # source://yarp//lib/yarp/ripper_compat.rb#162 - def on_zsuper; end - - # source://yarp//lib/yarp/ripper_compat.rb#158 - def result; end - - class << self - # This is a convenience method that runs the SexpBuilderPP subclass parser. - # - # source://yarp//lib/yarp/ripper_compat.rb#140 - def sexp(source); end - - # This is a convenience method that runs the SexpBuilder subclass parser. - # - # source://yarp//lib/yarp/ripper_compat.rb#135 - def sexp_raw(source); end - end -end - -# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that -# returns the arrays of [type, *children]. -# -# source://yarp//lib/yarp/ripper_compat.rb#16 -class YARP::RipperCompat::SexpBuilder < ::YARP::RipperCompat - private - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_BEGIN(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_CHAR(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_END(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on___end__(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_alias(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_alias_error(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_aref(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_aref_field(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_arg_ambiguous(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_arg_paren(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_args_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_args_add_block(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_args_add_star(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_args_forward(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_args_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_array(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_aryptn(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_assign(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_assign_error(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_assoc_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_assoc_splat(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_assoclist_from_args(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_backref(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_backtick(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_bare_assoc_hash(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_begin(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_binary(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_block_var(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_blockarg(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_bodystmt(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_brace_block(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_break(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_call(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_case(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_class(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_class_name_error(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_comma(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_command(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_command_call(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_comment(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_const(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_const_path_field(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_const_path_ref(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_const_ref(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_cvar(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_def(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_defined(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_defs(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_do_block(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_dot2(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_dot3(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_dyna_symbol(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_else(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_elsif(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_embdoc(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_embdoc_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_embdoc_end(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_embexpr_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_embexpr_end(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_embvar(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_ensure(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_excessed_comma(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_fcall(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_field(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_float(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_fndptn(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_for(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_gvar(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_hash(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_heredoc_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_heredoc_dedent(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_heredoc_end(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_hshptn(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_ident(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_if(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_if_mod(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_ifop(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_ignored_nl(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_ignored_sp(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_imaginary(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_in(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_int(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_ivar(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_kw(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_kwrest_param(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_label(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_label_end(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_lambda(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_lbrace(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_lbracket(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_lparen(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_magic_comment(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_massign(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_method_add_arg(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_method_add_block(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mlhs_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mlhs_add_post(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mlhs_add_star(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mlhs_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mlhs_paren(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_module(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mrhs_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mrhs_add_star(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mrhs_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_mrhs_new_from_args(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_next(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_nl(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_nokw_param(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_op(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_opassign(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_operator_ambiguous(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_param_error(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_params(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_paren(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_parse_error(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_period(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_program(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_qsymbols_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_qsymbols_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_qsymbols_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_qwords_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_qwords_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_qwords_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_rational(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_rbrace(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_rbracket(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_redo(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_regexp_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_regexp_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_regexp_end(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_regexp_literal(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_regexp_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_rescue(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_rescue_mod(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_rest_param(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_retry(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_return(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_return0(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_rparen(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_sclass(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_semicolon(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_sp(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_stmts_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_stmts_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_string_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_string_concat(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_string_content(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_string_dvar(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_string_embexpr(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_string_literal(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_super(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_symbeg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_symbol(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_symbol_literal(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_symbols_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_symbols_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_symbols_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_tlambda(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_tlambeg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_top_const_field(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_top_const_ref(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_tstring_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_tstring_content(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_tstring_end(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_unary(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_undef(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_unless(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_unless_mod(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_until(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_until_mod(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_var_alias(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_var_field(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_var_ref(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_vcall(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_void_stmt(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_when(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_while(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_while_mod(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_word_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_word_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_words_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_words_beg(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_words_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#26 - def on_words_sep(value); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_xstring_add(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_xstring_literal(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_xstring_new(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_yield(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - def on_yield0(*args); end - - # source://yarp//lib/yarp/ripper_compat.rb#20 - 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://yarp//lib/yarp/ripper_compat.rb#35 -class YARP::RipperCompat::SexpBuilderPP < ::YARP::RipperCompat::SexpBuilder - private - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def _dispatch_event_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def _dispatch_event_push(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_args_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_args_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_mlhs_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_mlhs_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_mrhs_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_mrhs_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_qsymbols_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_qsymbols_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_qwords_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_qwords_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_regexp_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_regexp_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_stmts_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_stmts_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_string_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_symbols_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_symbols_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_word_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_word_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_words_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_words_new; end - - # source://yarp//lib/yarp/ripper_compat.rb#42 - def on_xstring_add(list, item); end - - # source://yarp//lib/yarp/ripper_compat.rb#38 - def on_xstring_new; end -end - -# Represents the `self` keyword. -# -# self -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#11205 -class YARP::SelfNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [SelfNode] a new instance of SelfNode - # - # source://yarp//lib/yarp/node.rb#11207 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11212 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11217 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11227 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11222 - def compact_child_nodes; end - - # def copy: (**params) -> SelfNode - # - # source://yarp//lib/yarp/node.rb#11232 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11217 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11242 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11254 - def human; end - - # source://yarp//lib/yarp/node.rb#11246 - def inspect(inspector = T.unsafe(nil)); end -end - -# source://yarp//lib/yarp/serialize.rb#22 -module YARP::Serialize - class << self - # source://yarp//lib/yarp/serialize.rb#27 - def load(input, serialized); end - - # source://yarp//lib/yarp/serialize.rb#37 - def load_tokens(source, serialized); end - end -end - -# source://yarp//lib/yarp/serialize.rb#41 -class YARP::Serialize::Loader - # @return [Loader] a new instance of Loader - # - # source://yarp//lib/yarp/serialize.rb#45 - def initialize(source, serialized); end - - # Returns the value of attribute constant_pool. - # - # source://yarp//lib/yarp/serialize.rb#43 - def constant_pool; end - - # Returns the value of attribute constant_pool_offset. - # - # source://yarp//lib/yarp/serialize.rb#43 - def constant_pool_offset; end - - # Returns the value of attribute encoding. - # - # source://yarp//lib/yarp/serialize.rb#42 - def encoding; end - - # Returns the value of attribute input. - # - # source://yarp//lib/yarp/serialize.rb#42 - def input; end - - # Returns the value of attribute io. - # - # source://yarp//lib/yarp/serialize.rb#42 - def io; end - - # source://yarp//lib/yarp/serialize.rb#59 - def load_encoding; end - - # source://yarp//lib/yarp/serialize.rb#63 - def load_metadata; end - - # source://yarp//lib/yarp/serialize.rb#96 - def load_nodes; end - - # source://yarp//lib/yarp/serialize.rb#111 - def load_result; end - - # source://yarp//lib/yarp/serialize.rb#70 - def load_tokens; end - - # source://yarp//lib/yarp/serialize.rb#83 - def load_tokens_result; end - - # Returns the value of attribute serialized. - # - # source://yarp//lib/yarp/serialize.rb#42 - def serialized; end - - # Returns the value of attribute source. - # - # source://yarp//lib/yarp/serialize.rb#43 - def source; end - - private - - # source://yarp//lib/yarp/serialize.rb#168 - def load_constant(index); end - - # source://yarp//lib/yarp/serialize.rb#145 - def load_embedded_string; end - - # source://yarp//lib/yarp/serialize.rb#160 - def load_location; end - - # source://yarp//lib/yarp/serialize.rb#198 - def load_node; end - - # source://yarp//lib/yarp/serialize.rb#193 - def load_optional_constant; end - - # source://yarp//lib/yarp/serialize.rb#164 - def load_optional_location; end - - # source://yarp//lib/yarp/serialize.rb#138 - def load_optional_node; end - - # source://yarp//lib/yarp/serialize.rb#189 - def load_required_constant; end - - # source://yarp//lib/yarp/serialize.rb#134 - def load_serialized_length; end - - # source://yarp//lib/yarp/serialize.rb#149 - def load_string; end - - # variable-length integer using https://en.wikipedia.org/wiki/LEB128 - # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints - # - # source://yarp//lib/yarp/serialize.rb#120 - def load_varint; end -end - -# source://yarp//lib/yarp/serialize.rb#23 -YARP::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) - -# source://yarp//lib/yarp/serialize.rb#24 -YARP::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) - -# source://yarp//lib/yarp/serialize.rb#25 -YARP::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) - -# source://yarp//lib/yarp/serialize.rb#490 -YARP::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# Represents a singleton class declaration involving the `class` keyword. -# -# class << self end -# ^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#11263 -class YARP::SingletonClassNode < ::YARP::Node - # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void - # - # @return [SingletonClassNode] a new instance of SingletonClassNode - # - # source://yarp//lib/yarp/node.rb#11283 - def initialize(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11294 - def accept(visitor); end - - # attr_reader body: Node? - # - # source://yarp//lib/yarp/node.rb#11277 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11299 - def child_nodes; end - - # def class_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#11338 - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#11268 - def class_keyword_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11312 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11304 - def compact_child_nodes; end - - # def copy: (**params) -> SingletonClassNode - # - # source://yarp//lib/yarp/node.rb#11317 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11299 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11333 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#11348 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#11280 - def end_keyword_loc; end - - # attr_reader expression: Node - # - # source://yarp//lib/yarp/node.rb#11274 - def expression; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11372 - def human; end - - # source://yarp//lib/yarp/node.rb#11352 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://yarp//lib/yarp/node.rb#11265 - def locals; end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#11343 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#11271 - def operator_loc; end -end - -# This represents a source of Ruby code that has been parsed. It is used in -# conjunction with locations to allow them to resolve line numbers and source -# ranges. -# -# source://yarp//lib/yarp.rb#7 -class YARP::Source - # @return [Source] a new instance of Source - # - # source://yarp//lib/yarp.rb#10 - def initialize(source, offsets = T.unsafe(nil)); end - - # source://yarp//lib/yarp.rb#27 - def column(value); end - - # source://yarp//lib/yarp.rb#19 - def line(value); end - - # source://yarp//lib/yarp.rb#23 - def line_offset(value); end - - # Returns the value of attribute offsets. - # - # source://yarp//lib/yarp.rb#8 - def offsets; end - - # source://yarp//lib/yarp.rb#15 - def slice(offset, length); end - - # Returns the value of attribute source. - # - # source://yarp//lib/yarp.rb#8 - def source; end - - private - - # source://yarp//lib/yarp.rb#33 - def compute_offsets(code); end -end - -# Represents the use of the `__ENCODING__` keyword. -# -# __ENCODING__ -# ^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#11381 -class YARP::SourceEncodingNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [SourceEncodingNode] a new instance of SourceEncodingNode - # - # source://yarp//lib/yarp/node.rb#11383 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11388 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11393 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11403 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11398 - def compact_child_nodes; end - - # def copy: (**params) -> SourceEncodingNode - # - # source://yarp//lib/yarp/node.rb#11408 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11393 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11418 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11430 - def human; end - - # source://yarp//lib/yarp/node.rb#11422 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of the `__FILE__` keyword. -# -# __FILE__ -# ^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#11439 -class YARP::SourceFileNode < ::YARP::Node - # def initialize: (filepath: String, location: Location) -> void - # - # @return [SourceFileNode] a new instance of SourceFileNode - # - # source://yarp//lib/yarp/node.rb#11444 - def initialize(filepath, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11450 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11455 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11465 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11460 - def compact_child_nodes; end - - # def copy: (**params) -> SourceFileNode - # - # source://yarp//lib/yarp/node.rb#11470 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11455 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11481 - def deconstruct_keys(keys); end - - # attr_reader filepath: String - # - # source://yarp//lib/yarp/node.rb#11441 - def filepath; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11494 - def human; end - - # source://yarp//lib/yarp/node.rb#11485 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of the `__LINE__` keyword. -# -# __LINE__ -# ^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#11503 -class YARP::SourceLineNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [SourceLineNode] a new instance of SourceLineNode - # - # source://yarp//lib/yarp/node.rb#11505 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11510 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11515 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11525 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11520 - def compact_child_nodes; end - - # def copy: (**params) -> SourceLineNode - # - # source://yarp//lib/yarp/node.rb#11530 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11515 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11540 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11552 - def human; end - - # source://yarp//lib/yarp/node.rb#11544 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of the splat operator. -# -# [*a] -# ^^ -# -# source://yarp//lib/yarp/node.rb#11561 -class YARP::SplatNode < ::YARP::Node - # def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void - # - # @return [SplatNode] a new instance of SplatNode - # - # source://yarp//lib/yarp/node.rb#11569 - def initialize(operator_loc, expression, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11576 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11581 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11593 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11586 - def compact_child_nodes; end - - # def copy: (**params) -> SplatNode - # - # source://yarp//lib/yarp/node.rb#11598 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11581 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11610 - def deconstruct_keys(keys); end - - # attr_reader expression: Node? - # - # source://yarp//lib/yarp/node.rb#11566 - def expression; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11634 - def human; end - - # source://yarp//lib/yarp/node.rb#11619 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://yarp//lib/yarp/node.rb#11615 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/yarp/node.rb#11563 - def operator_loc; end -end - -# Represents a set of statements contained within some scope. -# -# foo; bar; baz -# ^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#11643 -class YARP::StatementsNode < ::YARP::Node - # def initialize: (body: Array[Node], location: Location) -> void - # - # @return [StatementsNode] a new instance of StatementsNode - # - # source://yarp//lib/yarp/node.rb#11648 - def initialize(body, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11654 - def accept(visitor); end - - # attr_reader body: Array[Node] - # - # source://yarp//lib/yarp/node.rb#11645 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11659 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11669 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11664 - def compact_child_nodes; end - - # def copy: (**params) -> StatementsNode - # - # source://yarp//lib/yarp/node.rb#11674 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11659 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11685 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11698 - def human; end - - # source://yarp//lib/yarp/node.rb#11689 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of compile-time string concatenation. -# -# "foo" "bar" -# ^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#11707 -class YARP::StringConcatNode < ::YARP::Node - # def initialize: (left: Node, right: Node, location: Location) -> void - # - # @return [StringConcatNode] a new instance of StringConcatNode - # - # source://yarp//lib/yarp/node.rb#11715 - def initialize(left, right, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11722 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11727 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11737 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11732 - def compact_child_nodes; end - - # def copy: (**params) -> StringConcatNode - # - # source://yarp//lib/yarp/node.rb#11742 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11727 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11754 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11770 - def human; end - - # source://yarp//lib/yarp/node.rb#11758 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://yarp//lib/yarp/node.rb#11709 - def left; end - - # attr_reader right: Node - # - # source://yarp//lib/yarp/node.rb#11712 - def right; end -end - -# source://yarp//lib/yarp/node.rb#12953 -module YARP::StringFlags; end - -# frozen by virtue of a frozen_string_literal comment -# -# source://yarp//lib/yarp/node.rb#12955 -YARP::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://yarp//lib/yarp/node.rb#11786 -class YARP::StringNode < ::YARP::Node - # def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void - # - # @return [StringNode] a new instance of StringNode - # - # source://yarp//lib/yarp/node.rb#11803 - def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11813 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11818 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#11868 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#11797 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11828 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11823 - def compact_child_nodes; end - - # def content: () -> String - # - # source://yarp//lib/yarp/node.rb#11863 - def content; end - - # attr_reader content_loc: Location - # - # source://yarp//lib/yarp/node.rb#11794 - def content_loc; end - - # def copy: (**params) -> StringNode - # - # source://yarp//lib/yarp/node.rb#11833 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11818 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11848 - def deconstruct_keys(keys); end - - # def frozen?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#11853 - def frozen?; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#11886 - def human; end - - # source://yarp//lib/yarp/node.rb#11872 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#11858 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#11791 - def opening_loc; end - - # attr_reader unescaped: String - # - # source://yarp//lib/yarp/node.rb#11800 - def unescaped; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#11788 - def flags; end -end - -# Represents the use of the `super` keyword with parentheses or arguments. -# -# super() -# ^^^^^^^ -# -# super foo, bar -# ^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#11898 -class YARP::SuperNode < ::YARP::Node - # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode?, location: Location) -> void - # - # @return [SuperNode] a new instance of SuperNode - # - # source://yarp//lib/yarp/node.rb#11915 - def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#11925 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#11906 - def arguments; end - - # attr_reader block: BlockNode? - # - # source://yarp//lib/yarp/node.rb#11912 - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11930 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#11943 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#11935 - def compact_child_nodes; end - - # def copy: (**params) -> SuperNode - # - # source://yarp//lib/yarp/node.rb#11948 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#11930 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#11963 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12005 - def human; end - - # source://yarp//lib/yarp/node.rb#11982 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#11968 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#11900 - def keyword_loc; end - - # def lparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#11973 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#11903 - def lparen_loc; end - - # def rparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#11978 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#11909 - def rparen_loc; end -end - -# Represents a symbol literal or a symbol contained within a `%i` list. -# -# :foo -# ^^^^ -# -# %i[foo] -# ^^^ -# -# source://yarp//lib/yarp/node.rb#12017 -class YARP::SymbolNode < ::YARP::Node - # def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void - # - # @return [SymbolNode] a new instance of SymbolNode - # - # source://yarp//lib/yarp/node.rb#12031 - def initialize(opening_loc, value_loc, closing_loc, unescaped, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12040 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12045 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#12089 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#12025 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12055 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12050 - def compact_child_nodes; end - - # def copy: (**params) -> SymbolNode - # - # source://yarp//lib/yarp/node.rb#12060 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12045 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12074 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12105 - def human; end - - # source://yarp//lib/yarp/node.rb#12093 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://yarp//lib/yarp/node.rb#12079 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/yarp/node.rb#12019 - def opening_loc; end - - # attr_reader unescaped: String - # - # source://yarp//lib/yarp/node.rb#12028 - def unescaped; end - - # def value: () -> String? - # - # source://yarp//lib/yarp/node.rb#12084 - def value; end - - # attr_reader value_loc: Location? - # - # source://yarp//lib/yarp/node.rb#12022 - def value_loc; end -end - -# This represents a token from the Ruby source. -# -# source://yarp//lib/yarp.rb#254 -class YARP::Token - # @return [Token] a new instance of Token - # - # source://yarp//lib/yarp.rb#257 - def initialize(type, value, location); end - - # source://yarp//lib/yarp.rb#281 - def ==(other); end - - # source://yarp//lib/yarp.rb#263 - def deconstruct_keys(keys); end - - # Returns the value of attribute location. - # - # source://yarp//lib/yarp.rb#255 - def location; end - - # source://yarp//lib/yarp.rb#267 - def pretty_print(q); end - - # Returns the value of attribute type. - # - # source://yarp//lib/yarp.rb#255 - def type; end - - # Returns the value of attribute value. - # - # source://yarp//lib/yarp.rb#255 - def value; end -end - -# Represents the use of the literal `true` keyword. -# -# true -# ^^^^ -# -# source://yarp//lib/yarp/node.rb#12114 -class YARP::TrueNode < ::YARP::Node - # def initialize: (location: Location) -> void - # - # @return [TrueNode] a new instance of TrueNode - # - # source://yarp//lib/yarp/node.rb#12116 - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12121 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12126 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12136 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12131 - def compact_child_nodes; end - - # def copy: (**params) -> TrueNode - # - # source://yarp//lib/yarp/node.rb#12141 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12126 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12151 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12163 - def human; end - - # source://yarp//lib/yarp/node.rb#12155 - def inspect(inspector = T.unsafe(nil)); end -end - -# Represents the use of the `undef` keyword. -# -# undef :foo, :bar, :baz -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#12172 -class YARP::UndefNode < ::YARP::Node - # def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void - # - # @return [UndefNode] a new instance of UndefNode - # - # source://yarp//lib/yarp/node.rb#12180 - def initialize(names, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12187 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12192 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12202 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12197 - def compact_child_nodes; end - - # def copy: (**params) -> UndefNode - # - # source://yarp//lib/yarp/node.rb#12207 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12192 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12219 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12238 - def human; end - - # source://yarp//lib/yarp/node.rb#12228 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#12224 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#12177 - def keyword_loc; end - - # attr_reader names: Array[Node] - # - # source://yarp//lib/yarp/node.rb#12174 - def names; 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://yarp//lib/yarp/node.rb#12250 -class YARP::UnlessNode < ::YARP::Node - # def initialize: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [UnlessNode] a new instance of UnlessNode - # - # source://yarp//lib/yarp/node.rb#12267 - def initialize(keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12277 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12286 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12300 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12291 - def compact_child_nodes; end - - # attr_reader consequent: ElseNode? - # - # source://yarp//lib/yarp/node.rb#12261 - def consequent; end - - # def copy: (**params) -> UnlessNode - # - # source://yarp//lib/yarp/node.rb#12305 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12286 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12320 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String? - # - # source://yarp//lib/yarp/node.rb#12330 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://yarp//lib/yarp/node.rb#12264 - def end_keyword_loc; end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12358 - def human; end - - # source://yarp//lib/yarp/node.rb#12334 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#12325 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#12252 - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://yarp//lib/yarp/node.rb#12255 - def predicate; end - - # source://yarp//lib/yarp/node.rb#12281 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#12258 - def statements; 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://yarp//lib/yarp/node.rb#12370 -class YARP::UntilNode < ::YARP::Node - # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void - # - # @return [UntilNode] a new instance of UntilNode - # - # source://yarp//lib/yarp/node.rb#12387 - def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12397 - def accept(visitor); end - - # def begin_modifier?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#12454 - def begin_modifier?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12406 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#12449 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#12375 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12419 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12411 - def compact_child_nodes; end - - # def copy: (**params) -> UntilNode - # - # source://yarp//lib/yarp/node.rb#12424 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12406 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12439 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12478 - def human; end - - # source://yarp//lib/yarp/node.rb#12458 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#12444 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#12372 - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://yarp//lib/yarp/node.rb#12378 - def predicate; end - - # source://yarp//lib/yarp/node.rb#12401 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#12381 - def statements; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#12384 - def flags; end -end - -# The version constant is set by reading the result of calling yp_version. -YARP::VERSION = T.let(T.unsafe(nil), String) - -# source://yarp//lib/yarp.rb#223 -class YARP::Visitor < ::YARP::BasicVisitor - # Visit a AliasGlobalVariableNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_alias_global_variable_node(node); end - - # Visit a AliasMethodNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_alias_method_node(node); end - - # Visit a AlternationPatternNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_alternation_pattern_node(node); end - - # Visit a AndNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_and_node(node); end - - # Visit a ArgumentsNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_arguments_node(node); end - - # Visit a ArrayNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_array_node(node); end - - # Visit a ArrayPatternNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_array_pattern_node(node); end - - # Visit a AssocNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_assoc_node(node); end - - # Visit a AssocSplatNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_assoc_splat_node(node); end - - # Visit a BackReferenceReadNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_back_reference_read_node(node); end - - # Visit a BeginNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_begin_node(node); end - - # Visit a BlockArgumentNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_block_argument_node(node); end - - # Visit a BlockLocalVariableNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_block_local_variable_node(node); end - - # Visit a BlockNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_block_node(node); end - - # Visit a BlockParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_block_parameter_node(node); end - - # Visit a BlockParametersNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_block_parameters_node(node); end - - # Visit a BreakNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_break_node(node); end - - # Visit a CallAndWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_call_and_write_node(node); end - - # Visit a CallNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_call_node(node); end - - # Visit a CallOperatorWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_call_operator_write_node(node); end - - # Visit a CallOrWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_call_or_write_node(node); end - - # Visit a CapturePatternNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_capture_pattern_node(node); end - - # Visit a CaseNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_case_node(node); end - - # Visit a ClassNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_class_node(node); end - - # Visit a ClassVariableAndWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_class_variable_and_write_node(node); end - - # Visit a ClassVariableOperatorWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_class_variable_operator_write_node(node); end - - # Visit a ClassVariableOrWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_class_variable_or_write_node(node); end - - # Visit a ClassVariableReadNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_class_variable_read_node(node); end - - # Visit a ClassVariableTargetNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_class_variable_target_node(node); end - - # Visit a ClassVariableWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_class_variable_write_node(node); end - - # Visit a ConstantAndWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_and_write_node(node); end - - # Visit a ConstantOperatorWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_operator_write_node(node); end - - # Visit a ConstantOrWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_or_write_node(node); end - - # Visit a ConstantPathAndWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_path_and_write_node(node); end - - # Visit a ConstantPathNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_path_node(node); end - - # Visit a ConstantPathOperatorWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_path_operator_write_node(node); end - - # Visit a ConstantPathOrWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_path_or_write_node(node); end - - # Visit a ConstantPathTargetNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_path_target_node(node); end - - # Visit a ConstantPathWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_path_write_node(node); end - - # Visit a ConstantReadNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_read_node(node); end - - # Visit a ConstantTargetNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_target_node(node); end - - # Visit a ConstantWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_constant_write_node(node); end - - # Visit a DefNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_def_node(node); end - - # Visit a DefinedNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_defined_node(node); end - - # Visit a ElseNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_else_node(node); end - - # Visit a EmbeddedStatementsNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_embedded_statements_node(node); end - - # Visit a EmbeddedVariableNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_embedded_variable_node(node); end - - # Visit a EnsureNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_ensure_node(node); end - - # Visit a FalseNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_false_node(node); end - - # Visit a FindPatternNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_find_pattern_node(node); end - - # Visit a FlipFlopNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_flip_flop_node(node); end - - # Visit a FloatNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_float_node(node); end - - # Visit a ForNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_for_node(node); end - - # Visit a ForwardingArgumentsNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_forwarding_arguments_node(node); end - - # Visit a ForwardingParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_forwarding_parameter_node(node); end - - # Visit a ForwardingSuperNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_forwarding_super_node(node); end - - # Visit a GlobalVariableAndWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_global_variable_and_write_node(node); end - - # Visit a GlobalVariableOperatorWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_global_variable_operator_write_node(node); end - - # Visit a GlobalVariableOrWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_global_variable_or_write_node(node); end - - # Visit a GlobalVariableReadNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_global_variable_read_node(node); end - - # Visit a GlobalVariableTargetNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_global_variable_target_node(node); end - - # Visit a GlobalVariableWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_global_variable_write_node(node); end - - # Visit a HashNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_hash_node(node); end - - # Visit a HashPatternNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_hash_pattern_node(node); end - - # Visit a IfNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_if_node(node); end - - # Visit a ImaginaryNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_imaginary_node(node); end - - # Visit a ImplicitNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_implicit_node(node); end - - # Visit a InNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_in_node(node); end - - # Visit a InstanceVariableAndWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_instance_variable_and_write_node(node); end - - # Visit a InstanceVariableOperatorWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_instance_variable_operator_write_node(node); end - - # Visit a InstanceVariableOrWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_instance_variable_or_write_node(node); end - - # Visit a InstanceVariableReadNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_instance_variable_read_node(node); end - - # Visit a InstanceVariableTargetNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_instance_variable_target_node(node); end - - # Visit a InstanceVariableWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_instance_variable_write_node(node); end - - # Visit a IntegerNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_integer_node(node); end - - # Visit a InterpolatedMatchLastLineNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_interpolated_match_last_line_node(node); end - - # Visit a InterpolatedRegularExpressionNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_interpolated_regular_expression_node(node); end - - # Visit a InterpolatedStringNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_interpolated_string_node(node); end - - # Visit a InterpolatedSymbolNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_interpolated_symbol_node(node); end - - # Visit a InterpolatedXStringNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_interpolated_x_string_node(node); end - - # Visit a KeywordHashNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_keyword_hash_node(node); end - - # Visit a KeywordParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_keyword_parameter_node(node); end - - # Visit a KeywordRestParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_keyword_rest_parameter_node(node); end - - # Visit a LambdaNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_lambda_node(node); end - - # Visit a LocalVariableAndWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_local_variable_and_write_node(node); end - - # Visit a LocalVariableOperatorWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_local_variable_operator_write_node(node); end - - # Visit a LocalVariableOrWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_local_variable_or_write_node(node); end - - # Visit a LocalVariableReadNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_local_variable_read_node(node); end - - # Visit a LocalVariableTargetNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_local_variable_target_node(node); end - - # Visit a LocalVariableWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_local_variable_write_node(node); end - - # Visit a MatchLastLineNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_match_last_line_node(node); end - - # Visit a MatchPredicateNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_match_predicate_node(node); end - - # Visit a MatchRequiredNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_match_required_node(node); end - - # Visit a MatchWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_match_write_node(node); end - - # Visit a MissingNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_missing_node(node); end - - # Visit a ModuleNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_module_node(node); end - - # Visit a MultiTargetNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_multi_target_node(node); end - - # Visit a MultiWriteNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_multi_write_node(node); end - - # Visit a NextNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_next_node(node); end - - # Visit a NilNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_nil_node(node); end - - # Visit a NoKeywordsParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_no_keywords_parameter_node(node); end - - # Visit a NumberedReferenceReadNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_numbered_reference_read_node(node); end - - # Visit a OptionalParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_optional_parameter_node(node); end - - # Visit a OrNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_or_node(node); end - - # Visit a ParametersNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_parameters_node(node); end - - # Visit a ParenthesesNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_parentheses_node(node); end - - # Visit a PinnedExpressionNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_pinned_expression_node(node); end - - # Visit a PinnedVariableNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_pinned_variable_node(node); end - - # Visit a PostExecutionNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_post_execution_node(node); end - - # Visit a PreExecutionNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_pre_execution_node(node); end - - # Visit a ProgramNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_program_node(node); end - - # Visit a RangeNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_range_node(node); end - - # Visit a RationalNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_rational_node(node); end - - # Visit a RedoNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_redo_node(node); end - - # Visit a RegularExpressionNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_regular_expression_node(node); end - - # Visit a RequiredDestructuredParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_required_destructured_parameter_node(node); end - - # Visit a RequiredParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_required_parameter_node(node); end - - # Visit a RescueModifierNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_rescue_modifier_node(node); end - - # Visit a RescueNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_rescue_node(node); end - - # Visit a RestParameterNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_rest_parameter_node(node); end - - # Visit a RetryNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_retry_node(node); end - - # Visit a ReturnNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_return_node(node); end - - # Visit a SelfNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_self_node(node); end - - # Visit a SingletonClassNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_singleton_class_node(node); end - - # Visit a SourceEncodingNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_source_encoding_node(node); end - - # Visit a SourceFileNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_source_file_node(node); end - - # Visit a SourceLineNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_source_line_node(node); end - - # Visit a SplatNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_splat_node(node); end - - # Visit a StatementsNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_statements_node(node); end - - # Visit a StringConcatNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_string_concat_node(node); end - - # Visit a StringNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_string_node(node); end - - # Visit a SuperNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_super_node(node); end - - # Visit a SymbolNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_symbol_node(node); end - - # Visit a TrueNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_true_node(node); end - - # Visit a UndefNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_undef_node(node); end - - # Visit a UnlessNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_unless_node(node); end - - # Visit a UntilNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_until_node(node); end - - # Visit a WhenNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_when_node(node); end - - # Visit a WhileNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_while_node(node); end - - # Visit a XStringNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_x_string_node(node); end - - # Visit a YieldNode node - # - # source://yarp//lib/yarp.rb#218 - def visit_yield_node(node); end -end - -# Represents the use of the `when` keyword within a case statement. -# -# case true -# when true -# ^^^^^^^^^ -# end -# -# source://yarp//lib/yarp/node.rb#12489 -class YARP::WhenNode < ::YARP::Node - # def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void - # - # @return [WhenNode] a new instance of WhenNode - # - # source://yarp//lib/yarp/node.rb#12500 - def initialize(keyword_loc, conditions, statements, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12508 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12513 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12526 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12518 - def compact_child_nodes; end - - # attr_reader conditions: Array[Node] - # - # source://yarp//lib/yarp/node.rb#12494 - def conditions; end - - # def copy: (**params) -> WhenNode - # - # source://yarp//lib/yarp/node.rb#12531 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12513 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12544 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12569 - def human; end - - # source://yarp//lib/yarp/node.rb#12553 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#12549 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#12491 - def keyword_loc; end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#12497 - def statements; 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://yarp//lib/yarp/node.rb#12581 -class YARP::WhileNode < ::YARP::Node - # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void - # - # @return [WhileNode] a new instance of WhileNode - # - # source://yarp//lib/yarp/node.rb#12598 - def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12608 - def accept(visitor); end - - # def begin_modifier?: () -> bool - # - # @return [Boolean] - # - # source://yarp//lib/yarp/node.rb#12665 - def begin_modifier?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12617 - def child_nodes; end - - # def closing: () -> String? - # - # source://yarp//lib/yarp/node.rb#12660 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/yarp/node.rb#12586 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12630 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12622 - def compact_child_nodes; end - - # def copy: (**params) -> WhileNode - # - # source://yarp//lib/yarp/node.rb#12635 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12617 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12650 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12689 - def human; end - - # source://yarp//lib/yarp/node.rb#12669 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#12655 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#12583 - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://yarp//lib/yarp/node.rb#12589 - def predicate; end - - # source://yarp//lib/yarp/node.rb#12612 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://yarp//lib/yarp/node.rb#12592 - def statements; end - - private - - # Returns the value of attribute flags. - # - # source://yarp//lib/yarp/node.rb#12595 - def flags; end -end - -# Represents an xstring literal with no interpolation. -# -# `foo` -# ^^^^^ -# -# source://yarp//lib/yarp/node.rb#12698 -class YARP::XStringNode < ::YARP::Node - # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void - # - # @return [XStringNode] a new instance of XStringNode - # - # source://yarp//lib/yarp/node.rb#12712 - def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12721 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12726 - def child_nodes; end - - # def closing: () -> String - # - # source://yarp//lib/yarp/node.rb#12770 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/yarp/node.rb#12706 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12736 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12731 - def compact_child_nodes; end - - # def content: () -> String - # - # source://yarp//lib/yarp/node.rb#12765 - def content; end - - # attr_reader content_loc: Location - # - # source://yarp//lib/yarp/node.rb#12703 - def content_loc; end - - # def copy: (**params) -> XStringNode - # - # source://yarp//lib/yarp/node.rb#12741 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12726 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12755 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12786 - def human; end - - # source://yarp//lib/yarp/node.rb#12774 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://yarp//lib/yarp/node.rb#12760 - def opening; end - - # attr_reader opening_loc: Location - # - # source://yarp//lib/yarp/node.rb#12700 - def opening_loc; end - - # attr_reader unescaped: String - # - # source://yarp//lib/yarp/node.rb#12709 - def unescaped; end -end - -# Represents the use of the `yield` keyword. -# -# yield 1 -# ^^^^^^^ -# -# source://yarp//lib/yarp/node.rb#12795 -class YARP::YieldNode < ::YARP::Node - # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void - # - # @return [YieldNode] a new instance of YieldNode - # - # source://yarp//lib/yarp/node.rb#12809 - def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/yarp/node.rb#12818 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/yarp/node.rb#12803 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12823 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/yarp/node.rb#12835 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/yarp/node.rb#12828 - def compact_child_nodes; end - - # def copy: (**params) -> YieldNode - # - # source://yarp//lib/yarp/node.rb#12840 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/yarp/node.rb#12823 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://yarp//lib/yarp/node.rb#12854 - def deconstruct_keys(keys); end - - # Returns a symbol representation of the type of node. - # - # def human: () -> Symbol - # - # source://yarp//lib/yarp/node.rb#12890 - def human; end - - # source://yarp//lib/yarp/node.rb#12873 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://yarp//lib/yarp/node.rb#12859 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://yarp//lib/yarp/node.rb#12797 - def keyword_loc; end - - # def lparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#12864 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#12800 - def lparen_loc; end - - # def rparen: () -> String? - # - # source://yarp//lib/yarp/node.rb#12869 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://yarp//lib/yarp/node.rb#12806 - def rparen_loc; end -end diff --git a/sorbet/rbi/gems/yarp@0.13.0.rbi b/sorbet/rbi/gems/yarp@0.13.0.rbi new file mode 100644 index 000000000..f67066db1 --- /dev/null +++ b/sorbet/rbi/gems/yarp@0.13.0.rbi @@ -0,0 +1,21646 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `yarp` gem. +# Please instead update this file by running `bin/tapioca gem yarp`. + +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/visitor.rb.erb +# if you are looking to modify the template +# +# source://yarp//lib/prism.rb#3 +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 + + # Returns an array of tokens that closely resembles that of the Ripper lexer. + # The only difference is that since we don't keep track of lexer state in the + # same way, it's going to always return the NONE state. + # + # source://yarp//lib/prism.rb#33 + def lex_compat(source, filepath = T.unsafe(nil)); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(_arg0); end + + # This lexes with the Ripper lex. It drops any space events but otherwise + # returns the same tokens. Raises SyntaxError if the syntax in source is + # invalid. + # + # source://yarp//lib/prism.rb#40 + def lex_ripper(source); end + + # Load the serialized AST using the source as a reference into a tree. + # + # source://yarp//lib/prism.rb#45 + def load(source, serialized); end + + # Mirror the Prism.parse API by using the serialization API. + def parse(*_arg0); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap when + # it is available. + def parse_file(_arg0); end + + # Mirror the Prism.parse_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 + end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#45 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://yarp//lib/prism/node.rb#56 + def initialize(new_name, old_name, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#64 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#69 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#79 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#74 + def compact_child_nodes; end + + # def copy: (**params) -> AliasGlobalVariableNode + # + # source://yarp//lib/prism/node.rb#84 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#69 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#97 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#106 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#102 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#53 + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://yarp//lib/prism/node.rb#47 + def new_name; end + + # attr_reader old_name: Node + # + # source://yarp//lib/prism/node.rb#50 + 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://yarp//lib/prism/node.rb#130 + def type; end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#139 +class Prism::AliasMethodNode < ::Prism::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://yarp//lib/prism/node.rb#150 + def initialize(new_name, old_name, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#158 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#163 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#173 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#168 + def compact_child_nodes; end + + # def copy: (**params) -> AliasMethodNode + # + # source://yarp//lib/prism/node.rb#178 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#163 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#191 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#200 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#196 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#147 + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://yarp//lib/prism/node.rb#141 + def new_name; end + + # attr_reader old_name: Node + # + # source://yarp//lib/prism/node.rb#144 + 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://yarp//lib/prism/node.rb#224 + def type; end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#233 +class Prism::AlternationPatternNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://yarp//lib/prism/node.rb#244 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#252 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#257 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#267 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#262 + def compact_child_nodes; end + + # def copy: (**params) -> AlternationPatternNode + # + # source://yarp//lib/prism/node.rb#272 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#257 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#285 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#294 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#235 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#290 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#241 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#238 + 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://yarp//lib/prism/node.rb#318 + def type; end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#327 +class Prism::AndNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [AndNode] a new instance of AndNode + # + # source://yarp//lib/prism/node.rb#338 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#346 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#351 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#361 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#356 + def compact_child_nodes; end + + # def copy: (**params) -> AndNode + # + # source://yarp//lib/prism/node.rb#366 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#351 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#379 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#388 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#329 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#384 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#335 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#332 + 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://yarp//lib/prism/node.rb#412 + def type; end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#421 +class Prism::ArgumentsNode < ::Prism::Node + # def initialize: (arguments: Array[Node], location: Location) -> void + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://yarp//lib/prism/node.rb#426 + def initialize(arguments, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#432 + def accept(visitor); end + + # attr_reader arguments: Array[Node] + # + # source://yarp//lib/prism/node.rb#423 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#437 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#447 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#442 + def compact_child_nodes; end + + # def copy: (**params) -> ArgumentsNode + # + # source://yarp//lib/prism/node.rb#452 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#437 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#463 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#467 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#487 + def type; end +end + +# Represents an array literal. This can be a regular array using brackets or +# a special array using % like %w or %i. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#497 +class Prism::ArrayNode < ::Prism::Node + # def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://yarp//lib/prism/node.rb#508 + def initialize(elements, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#516 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#521 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#559 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#505 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#531 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#526 + def compact_child_nodes; end + + # def copy: (**params) -> ArrayNode + # + # source://yarp//lib/prism/node.rb#536 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#521 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#549 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/prism/node.rb#499 + def elements; end + + # source://yarp//lib/prism/node.rb#563 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#554 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#502 + 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://yarp//lib/prism/node.rb#585 + def type; end +end + +# 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://yarp//lib/prism/node.rb#606 +class Prism::ArrayPatternNode < ::Prism::Node + # def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://yarp//lib/prism/node.rb#626 + def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#637 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#642 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#688 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#623 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#657 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#647 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://yarp//lib/prism/node.rb#608 + def constant; end + + # def copy: (**params) -> ArrayPatternNode + # + # source://yarp//lib/prism/node.rb#662 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#642 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#678 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#692 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#683 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#620 + def opening_loc; end + + # attr_reader posts: Array[Node] + # + # source://yarp//lib/prism/node.rb#617 + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/prism/node.rb#611 + def requireds; end + + # attr_reader rest: Node? + # + # source://yarp//lib/prism/node.rb#614 + 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://yarp//lib/prism/node.rb#727 + def type; end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#736 +class Prism::AssocNode < ::Prism::Node + # def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void + # + # @return [AssocNode] a new instance of AssocNode + # + # source://yarp//lib/prism/node.rb#747 + def initialize(key, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#755 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#760 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#773 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#765 + def compact_child_nodes; end + + # def copy: (**params) -> AssocNode + # + # source://yarp//lib/prism/node.rb#778 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#760 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#791 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#800 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader key: Node + # + # source://yarp//lib/prism/node.rb#738 + def key; end + + # def operator: () -> String? + # + # source://yarp//lib/prism/node.rb#796 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#744 + 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://yarp//lib/prism/node.rb#828 + def type; end + + # attr_reader value: Node? + # + # source://yarp//lib/prism/node.rb#741 + def value; end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#837 +class Prism::AssocSplatNode < ::Prism::Node + # def initialize: (value: Node?, operator_loc: Location, location: Location) -> void + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://yarp//lib/prism/node.rb#845 + def initialize(value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#852 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#857 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#869 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#862 + def compact_child_nodes; end + + # def copy: (**params) -> AssocSplatNode + # + # source://yarp//lib/prism/node.rb#874 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#857 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#886 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#895 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#891 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#842 + 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://yarp//lib/prism/node.rb#921 + def type; end + + # attr_reader value: Node? + # + # source://yarp//lib/prism/node.rb#839 + def value; end +end + +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://yarp//lib/prism/node.rb#930 +class Prism::BackReferenceReadNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://yarp//lib/prism/node.rb#932 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#937 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#942 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#952 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#947 + def compact_child_nodes; end + + # def copy: (**params) -> BackReferenceReadNode + # + # source://yarp//lib/prism/node.rb#957 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#942 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#967 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#971 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#990 + def type; 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://yarp//lib/prism/visitor.rb#13 +class Prism::BasicVisitor + # source://yarp//lib/prism/visitor.rb#14 + def visit(node); end + + # source://yarp//lib/prism/visitor.rb#18 + def visit_all(nodes); end + + # source://yarp//lib/prism/visitor.rb#22 + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#1001 +class Prism::BeginNode < ::Prism::Node + # def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [BeginNode] a new instance of BeginNode + # + # source://yarp//lib/prism/node.rb#1021 + def initialize(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1032 + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#1082 + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#1003 + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1041 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1056 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1046 + def compact_child_nodes; end + + # def copy: (**params) -> BeginNode + # + # source://yarp//lib/prism/node.rb#1061 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1041 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1077 + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://yarp//lib/prism/node.rb#1012 + def else_clause; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#1087 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#1018 + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://yarp//lib/prism/node.rb#1015 + def ensure_clause; end + + # source://yarp//lib/prism/node.rb#1091 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader rescue_clause: RescueNode? + # + # source://yarp//lib/prism/node.rb#1009 + def rescue_clause; end + + # source://yarp//lib/prism/node.rb#1036 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#1006 + 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://yarp//lib/prism/node.rb#1136 + def type; end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1145 +class Prism::BlockArgumentNode < ::Prism::Node + # def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://yarp//lib/prism/node.rb#1153 + def initialize(expression, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1160 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1165 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1177 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1170 + def compact_child_nodes; end + + # def copy: (**params) -> BlockArgumentNode + # + # source://yarp//lib/prism/node.rb#1182 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1165 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1194 + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://yarp//lib/prism/node.rb#1147 + def expression; end + + # source://yarp//lib/prism/node.rb#1203 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#1199 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#1150 + 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://yarp//lib/prism/node.rb#1229 + def type; end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://yarp//lib/prism/node.rb#1238 +class Prism::BlockLocalVariableNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://yarp//lib/prism/node.rb#1243 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1249 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1254 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1264 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1259 + def compact_child_nodes; end + + # def copy: (**params) -> BlockLocalVariableNode + # + # source://yarp//lib/prism/node.rb#1269 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1254 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1280 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1284 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#1240 + 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://yarp//lib/prism/node.rb#1304 + def type; end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1313 +class Prism::BlockNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [BlockNode] a new instance of BlockNode + # + # source://yarp//lib/prism/node.rb#1330 + def initialize(locals, parameters, body, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1340 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#1321 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1345 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#1388 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#1327 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1358 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1350 + def compact_child_nodes; end + + # def copy: (**params) -> BlockNode + # + # source://yarp//lib/prism/node.rb#1363 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1345 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1378 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1392 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#1315 + def locals; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#1383 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#1324 + def opening_loc; end + + # attr_reader parameters: BlockParametersNode? + # + # source://yarp//lib/prism/node.rb#1318 + 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://yarp//lib/prism/node.rb#1426 + def type; end +end + +# Represents a block parameter to a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://yarp//lib/prism/node.rb#1436 +class Prism::BlockParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://yarp//lib/prism/node.rb#1447 + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1455 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1460 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1470 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1465 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParameterNode + # + # source://yarp//lib/prism/node.rb#1475 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1460 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1488 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1497 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://yarp//lib/prism/node.rb#1438 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/prism/node.rb#1441 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#1493 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#1444 + 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://yarp//lib/prism/node.rb#1519 + def type; end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#1532 +class Prism::BlockParametersNode < ::Prism::Node + # def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://yarp//lib/prism/node.rb#1546 + def initialize(parameters, locals, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1555 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1560 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#1602 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#1543 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1573 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1565 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParametersNode + # + # source://yarp//lib/prism/node.rb#1578 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1560 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1592 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1606 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Node] + # + # source://yarp//lib/prism/node.rb#1537 + def locals; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#1597 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#1540 + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://yarp//lib/prism/node.rb#1534 + 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://yarp//lib/prism/node.rb#1634 + def type; end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1643 +class Prism::BreakNode < ::Prism::Node + # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void + # + # @return [BreakNode] a new instance of BreakNode + # + # source://yarp//lib/prism/node.rb#1651 + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1658 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#1645 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1663 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1675 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1668 + def compact_child_nodes; end + + # def copy: (**params) -> BreakNode + # + # source://yarp//lib/prism/node.rb#1680 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1663 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1692 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1701 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#1697 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#1648 + 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://yarp//lib/prism/node.rb#1727 + def type; end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1736 +class Prism::CallAndWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://yarp//lib/prism/node.rb#1771 + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1787 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#1750 + def arguments; end + + # def call_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#1837 + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#1741 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1792 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#1852 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#1753 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1806 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1797 + def compact_child_nodes; end + + # def copy: (**params) -> CallAndWriteNode + # + # source://yarp//lib/prism/node.rb#1811 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1792 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1832 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1871 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://yarp//lib/prism/node.rb#1842 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/prism/node.rb#1744 + def message_loc; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#1847 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#1747 + def opening_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#1867 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#1765 + def operator_loc; end + + # attr_reader read_name: String + # + # source://yarp//lib/prism/node.rb#1759 + def read_name; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#1738 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#1857 + 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://yarp//lib/prism/node.rb#1913 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#1768 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#1862 + def variable_call?; end + + # attr_reader write_name: String + # + # source://yarp//lib/prism/node.rb#1762 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#1756 + def flags; 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://yarp//lib/prism/node.rb#1937 +class Prism::CallNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: String, location: Location) -> void + # + # @return [CallNode] a new instance of CallNode + # + # source://yarp//lib/prism/node.rb#1966 + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1980 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#1951 + def arguments; end + + # attr_reader block: Node? + # + # source://yarp//lib/prism/node.rb#1957 + def block; end + + # def call_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#2028 + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#1942 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1985 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#2043 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#1954 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1999 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1990 + def compact_child_nodes; end + + # def copy: (**params) -> CallNode + # + # source://yarp//lib/prism/node.rb#2004 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1985 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2023 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2057 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://yarp//lib/prism/node.rb#2033 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/prism/node.rb#1945 + def message_loc; end + + # attr_reader name: String + # + # source://yarp//lib/prism/node.rb#1963 + def name; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#2038 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#1948 + def opening_loc; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#1939 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2048 + 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://yarp//lib/prism/node.rb#2101 + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2053 + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#1960 + def flags; end +end + +# source://yarp//lib/prism/node.rb#14478 +module Prism::CallNodeFlags; end + +# &. operator +# +# source://yarp//lib/prism/node.rb#14480 +Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) + +# a call that could have been a local variable +# +# source://yarp//lib/prism/node.rb#14483 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2110 +class Prism::CallOperatorWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#2148 + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2165 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#2124 + def arguments; end + + # def call_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#2216 + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#2115 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2170 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#2231 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#2127 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2184 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2175 + def compact_child_nodes; end + + # def copy: (**params) -> CallOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#2189 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2170 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2211 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2245 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://yarp//lib/prism/node.rb#2221 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/prism/node.rb#2118 + def message_loc; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#2226 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#2121 + def opening_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#2139 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2142 + def operator_loc; end + + # attr_reader read_name: String + # + # source://yarp//lib/prism/node.rb#2133 + def read_name; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#2112 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2236 + 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://yarp//lib/prism/node.rb#2288 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2145 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2241 + def variable_call?; end + + # attr_reader write_name: String + # + # source://yarp//lib/prism/node.rb#2136 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#2130 + def flags; end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2297 +class Prism::CallOrWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://yarp//lib/prism/node.rb#2332 + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2348 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#2311 + def arguments; end + + # def call_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#2398 + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#2302 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2353 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#2413 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#2314 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2367 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2358 + def compact_child_nodes; end + + # def copy: (**params) -> CallOrWriteNode + # + # source://yarp//lib/prism/node.rb#2372 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2353 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2393 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2432 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://yarp//lib/prism/node.rb#2403 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/prism/node.rb#2305 + def message_loc; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#2408 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#2308 + def opening_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#2428 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2326 + def operator_loc; end + + # attr_reader read_name: String + # + # source://yarp//lib/prism/node.rb#2320 + def read_name; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#2299 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2418 + 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://yarp//lib/prism/node.rb#2474 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2329 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2423 + def variable_call?; end + + # attr_reader write_name: String + # + # source://yarp//lib/prism/node.rb#2323 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#2317 + def flags; end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2483 +class Prism::CapturePatternNode < ::Prism::Node + # def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://yarp//lib/prism/node.rb#2494 + def initialize(value, target, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2502 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2507 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2517 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2512 + def compact_child_nodes; end + + # def copy: (**params) -> CapturePatternNode + # + # source://yarp//lib/prism/node.rb#2522 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2507 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2535 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2544 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#2540 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2491 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/prism/node.rb#2488 + 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://yarp//lib/prism/node.rb#2568 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2485 + def value; end +end + +# Represents the use of a case statement. +# +# case true +# ^^^^^^^^^ +# when false +# end +# +# source://yarp//lib/prism/node.rb#2579 +class Prism::CaseNode < ::Prism::Node + # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void + # + # @return [CaseNode] a new instance of CaseNode + # + # source://yarp//lib/prism/node.rb#2596 + def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2606 + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#2650 + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#2590 + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2611 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2625 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2616 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://yarp//lib/prism/node.rb#2584 + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://yarp//lib/prism/node.rb#2587 + def consequent; end + + # def copy: (**params) -> CaseNode + # + # source://yarp//lib/prism/node.rb#2630 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2611 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2645 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#2655 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#2593 + def end_keyword_loc; end + + # source://yarp//lib/prism/node.rb#2659 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node? + # + # source://yarp//lib/prism/node.rb#2581 + 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://yarp//lib/prism/node.rb#2693 + def type; end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2702 +class Prism::ClassNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void + # + # @return [ClassNode] a new instance of ClassNode + # + # source://yarp//lib/prism/node.rb#2728 + def initialize(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2741 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#2719 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2746 + def child_nodes; end + + # def class_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#2788 + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#2707 + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2760 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2751 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://yarp//lib/prism/node.rb#2710 + def constant_path; end + + # def copy: (**params) -> ClassNode + # + # source://yarp//lib/prism/node.rb#2765 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2746 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2783 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#2798 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#2722 + def end_keyword_loc; end + + # def inheritance_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#2793 + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#2713 + def inheritance_operator_loc; end + + # source://yarp//lib/prism/node.rb#2802 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#2704 + def locals; end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#2725 + def name; end + + # attr_reader superclass: Node? + # + # source://yarp//lib/prism/node.rb#2716 + 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://yarp//lib/prism/node.rb#2840 + def type; end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2849 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#2863 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2872 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2877 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2887 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2882 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#2892 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2877 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2906 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2915 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#2851 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#2854 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#2911 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2857 + 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://yarp//lib/prism/node.rb#2939 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2860 + def value; end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2948 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#2965 + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2975 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2980 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2990 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2985 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#2995 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2980 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3010 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3014 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#2950 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#2953 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#2962 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2956 + 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://yarp//lib/prism/node.rb#3039 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2959 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3048 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#3062 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3071 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3076 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3086 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3081 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#3091 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3076 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3105 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3114 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3050 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3053 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#3110 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3056 + 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://yarp//lib/prism/node.rb#3138 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3059 + def value; end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#3147 +class Prism::ClassVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://yarp//lib/prism/node.rb#3152 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3158 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3163 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3173 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3168 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableReadNode + # + # source://yarp//lib/prism/node.rb#3178 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3163 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3189 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3193 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3149 + 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://yarp//lib/prism/node.rb#3213 + def type; end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://yarp//lib/prism/node.rb#3222 +class Prism::ClassVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://yarp//lib/prism/node.rb#3227 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3233 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3238 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3248 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3243 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableTargetNode + # + # source://yarp//lib/prism/node.rb#3253 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3238 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3264 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3268 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3224 + 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://yarp//lib/prism/node.rb#3288 + def type; end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3297 +class Prism::ClassVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://yarp//lib/prism/node.rb#3311 + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3320 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3325 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3335 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3330 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableWriteNode + # + # source://yarp//lib/prism/node.rb#3340 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3325 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3354 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3363 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3299 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3302 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/prism/node.rb#3359 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#3308 + 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://yarp//lib/prism/node.rb#3387 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3305 + def value; end +end + +# This represents a comment that was encountered during parsing. +# +# source://yarp//lib/prism/parse_result.rb#145 +class Prism::Comment + # @return [Comment] a new instance of Comment + # + # source://yarp//lib/prism/parse_result.rb#150 + def initialize(type, location); end + + # source://yarp//lib/prism/parse_result.rb#155 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/parse_result.rb#164 + def inspect; end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result.rb#148 + def location; end + + # Returns true if the comment happens on the same line as other code and false if the comment is by itself + # + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result.rb#160 + def trailing?; end + + # Returns the value of attribute type. + # + # source://yarp//lib/prism/parse_result.rb#148 + def type; end +end + +# source://yarp//lib/prism/parse_result.rb#146 +Prism::Comment::TYPES = T.let(T.unsafe(nil), Array) + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# 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://yarp//lib/prism/compiler.rb#26 +class Prism::Compiler + # Visit an individual node. + # + # source://yarp//lib/prism/compiler.rb#28 + def visit(node); end + + # Visit the child nodes of the given node. + # Compile a AliasGlobalVariableNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_alias_global_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a AliasMethodNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://yarp//lib/prism/compiler.rb#33 + def visit_all(nodes); end + + # Visit the child nodes of the given node. + # Compile a AlternationPatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_alternation_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AndNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_and_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArgumentsNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_array_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayPatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_array_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_assoc_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocSplatNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_assoc_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a BackReferenceReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_back_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a BeginNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_begin_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockArgumentNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_argument_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockLocalVariableNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_local_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParametersNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a BreakNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_break_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_call_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_call_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_call_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_call_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CapturePatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_capture_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_child_nodes(node); end + + # Visit the child nodes of the given node. + # Compile a ClassNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_def_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefinedNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_defined_node(node); end + + # Visit the child nodes of the given node. + # Compile a ElseNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_else_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedStatementsNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_embedded_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedVariableNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_embedded_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a EnsureNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_ensure_node(node); end + + # Visit the child nodes of the given node. + # Compile a FalseNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_false_node(node); end + + # Visit the child nodes of the given node. + # Compile a FindPatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_find_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a FlipFlopNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_flip_flop_node(node); end + + # Visit the child nodes of the given node. + # Compile a FloatNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_float_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_for_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingArgumentsNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_forwarding_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_forwarding_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingSuperNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_forwarding_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashPatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_hash_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a IfNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_if_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImaginaryNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_imaginary_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_implicit_node(node); end + + # Visit the child nodes of the given node. + # Compile a InNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_in_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IntegerNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_integer_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedMatchLastLineNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedRegularExpressionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedStringNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedSymbolNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedXStringNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordHashNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_keyword_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordRestParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_keyword_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a LambdaNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_lambda_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchLastLineNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchPredicateNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_match_predicate_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchRequiredNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_match_required_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_match_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MissingNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_missing_node(node); end + + # Visit the child nodes of the given node. + # Compile a ModuleNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_module_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_multi_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_multi_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a NextNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_next_node(node); end + + # Visit the child nodes of the given node. + # Compile a NilNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_nil_node(node); end + + # Visit the child nodes of the given node. + # Compile a NoKeywordsParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_no_keywords_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedReferenceReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_numbered_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_optional_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OrNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_or_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParametersNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParenthesesNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_parentheses_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedExpressionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_pinned_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedVariableNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_pinned_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a PostExecutionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_post_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a PreExecutionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_pre_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a ProgramNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_program_node(node); end + + # Visit the child nodes of the given node. + # Compile a RangeNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_range_node(node); end + + # Visit the child nodes of the given node. + # Compile a RationalNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_rational_node(node); end + + # Visit the child nodes of the given node. + # Compile a RedoNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_redo_node(node); end + + # Visit the child nodes of the given node. + # Compile a RegularExpressionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredDestructuredParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_required_destructured_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_required_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueModifierNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_rescue_modifier_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_rescue_node(node); end + + # Visit the child nodes of the given node. + # Compile a RestParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RetryNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_retry_node(node); end + + # Visit the child nodes of the given node. + # Compile a ReturnNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_return_node(node); end + + # Visit the child nodes of the given node. + # Compile a SelfNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_self_node(node); end + + # Visit the child nodes of the given node. + # Compile a SingletonClassNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_singleton_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceEncodingNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_source_encoding_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceFileNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_source_file_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceLineNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_source_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a SplatNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StatementsNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringConcatNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_string_concat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a SuperNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a SymbolNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a TrueNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_true_node(node); end + + # Visit the child nodes of the given node. + # Compile a UndefNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_undef_node(node); end + + # Visit the child nodes of the given node. + # Compile a UnlessNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_unless_node(node); end + + # Visit the child nodes of the given node. + # Compile a UntilNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_until_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhenNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_when_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhileNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_while_node(node); end + + # Visit the child nodes of the given node. + # Compile a XStringNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a YieldNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3396 +class Prism::ConstantAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://yarp//lib/prism/node.rb#3410 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3419 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3424 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3434 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3429 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantAndWriteNode + # + # source://yarp//lib/prism/node.rb#3439 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3424 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3453 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3462 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3398 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3401 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#3458 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3404 + 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://yarp//lib/prism/node.rb#3486 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3407 + def value; end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3495 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#3512 + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3522 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3527 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3537 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3532 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#3542 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3527 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3557 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3561 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3497 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3500 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#3509 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3503 + 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://yarp//lib/prism/node.rb#3586 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3506 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3595 +class Prism::ConstantOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://yarp//lib/prism/node.rb#3609 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3618 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3623 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3633 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3628 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOrWriteNode + # + # source://yarp//lib/prism/node.rb#3638 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3623 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3652 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3661 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3597 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3600 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#3657 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3603 + 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://yarp//lib/prism/node.rb#3685 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3606 + def value; end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3694 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://yarp//lib/prism/node.rb#3705 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3713 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3718 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3728 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3723 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathAndWriteNode + # + # source://yarp//lib/prism/node.rb#3733 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3718 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3746 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3755 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#3751 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3699 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3696 + 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://yarp//lib/prism/node.rb#3779 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3702 + def value; end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3788 +class Prism::ConstantPathNode < ::Prism::Node + # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3799 + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3807 + def accept(visitor); end + + # attr_reader child: Node + # + # source://yarp//lib/prism/node.rb#3793 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3812 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3825 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3817 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3830 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3812 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3843 + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://yarp//lib/prism/node.rb#3848 + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://yarp//lib/prism/node.rb#3796 + def delimiter_loc; end + + # source://yarp//lib/prism/node.rb#3852 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://yarp//lib/prism/node.rb#3790 + 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://yarp//lib/prism/node.rb#3880 + def type; end +end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3889 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#3903 + def initialize(target, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3912 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3917 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3927 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3922 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#3932 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3917 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3946 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3950 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#3900 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3894 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3891 + 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://yarp//lib/prism/node.rb#3975 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3897 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3984 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://yarp//lib/prism/node.rb#3995 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4003 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4008 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4018 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4013 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOrWriteNode + # + # source://yarp//lib/prism/node.rb#4023 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4008 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4036 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4045 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#4041 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3989 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3986 + 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://yarp//lib/prism/node.rb#4069 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3992 + def value; end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4078 +class Prism::ConstantPathTargetNode < ::Prism::Node + # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://yarp//lib/prism/node.rb#4089 + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4097 + def accept(visitor); end + + # attr_reader child: Node + # + # source://yarp//lib/prism/node.rb#4083 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4102 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4115 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4107 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathTargetNode + # + # source://yarp//lib/prism/node.rb#4120 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4102 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4133 + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://yarp//lib/prism/node.rb#4138 + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://yarp//lib/prism/node.rb#4086 + def delimiter_loc; end + + # source://yarp//lib/prism/node.rb#4142 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://yarp//lib/prism/node.rb#4080 + 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://yarp//lib/prism/node.rb#4170 + def type; end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4185 +class Prism::ConstantPathWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://yarp//lib/prism/node.rb#4196 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4204 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4209 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4219 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4214 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathWriteNode + # + # source://yarp//lib/prism/node.rb#4224 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4209 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4237 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4246 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#4242 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#4190 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://yarp//lib/prism/node.rb#4187 + 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://yarp//lib/prism/node.rb#4270 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#4193 + def value; end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://yarp//lib/prism/node.rb#4279 +class Prism::ConstantReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://yarp//lib/prism/node.rb#4284 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4290 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4295 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4305 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4300 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantReadNode + # + # source://yarp//lib/prism/node.rb#4310 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4295 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4321 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4325 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#4281 + 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://yarp//lib/prism/node.rb#4345 + def type; end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://yarp//lib/prism/node.rb#4354 +class Prism::ConstantTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://yarp//lib/prism/node.rb#4359 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4365 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4370 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4380 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4375 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantTargetNode + # + # source://yarp//lib/prism/node.rb#4385 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4370 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4396 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4400 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#4356 + 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://yarp//lib/prism/node.rb#4420 + def type; end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4429 +class Prism::ConstantWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://yarp//lib/prism/node.rb#4443 + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4452 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4457 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4467 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4462 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantWriteNode + # + # source://yarp//lib/prism/node.rb#4472 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4457 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4486 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4495 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#4431 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#4434 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#4491 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#4440 + 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://yarp//lib/prism/node.rb#4519 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#4437 + def value; end +end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.new("[1]") +# +# Prism::ArrayNode.new( +# [ +# Prism::IntegerNode.new( +# Prism::IntegerBaseFlags::DECIMAL, +# 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://yarp//lib/prism/dsl.rb#37 +module Prism::DSL + private + + # Create a new AliasGlobalVariableNode node + # + # source://yarp//lib/prism/dsl.rb#46 + def AliasGlobalVariableNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AliasMethodNode node + # + # source://yarp//lib/prism/dsl.rb#51 + def AliasMethodNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AlternationPatternNode node + # + # source://yarp//lib/prism/dsl.rb#56 + def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new AndNode node + # + # source://yarp//lib/prism/dsl.rb#61 + def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ArgumentsNode node + # + # source://yarp//lib/prism/dsl.rb#66 + def ArgumentsNode(arguments, location = T.unsafe(nil)); end + + # Create a new ArrayNode node + # + # source://yarp//lib/prism/dsl.rb#71 + def ArrayNode(elements, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ArrayPatternNode node + # + # source://yarp//lib/prism/dsl.rb#76 + def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new AssocNode node + # + # source://yarp//lib/prism/dsl.rb#81 + def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new AssocSplatNode node + # + # source://yarp//lib/prism/dsl.rb#86 + def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node + # + # source://yarp//lib/prism/dsl.rb#91 + def BackReferenceReadNode(location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # source://yarp//lib/prism/dsl.rb#96 + def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new BlockArgumentNode node + # + # source://yarp//lib/prism/dsl.rb#101 + def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node + # + # source://yarp//lib/prism/dsl.rb#106 + def BlockLocalVariableNode(name, location = T.unsafe(nil)); end + + # Create a new BlockNode node + # + # source://yarp//lib/prism/dsl.rb#111 + def BlockNode(locals, parameters, body, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BlockParameterNode node + # + # source://yarp//lib/prism/dsl.rb#116 + def BlockParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockParametersNode node + # + # source://yarp//lib/prism/dsl.rb#121 + def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BreakNode node + # + # source://yarp//lib/prism/dsl.rb#126 + def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new CallAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#131 + def CallAndWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallNode node + # + # source://yarp//lib/prism/dsl.rb#136 + def CallNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location = T.unsafe(nil)); end + + # Create a new CallOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#141 + def CallOperatorWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#146 + def CallOrWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CapturePatternNode node + # + # source://yarp//lib/prism/dsl.rb#151 + def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end + + # Create a new CaseNode node + # + # source://yarp//lib/prism/dsl.rb#156 + def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ClassNode node + # + # source://yarp//lib/prism/dsl.rb#161 + def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location = T.unsafe(nil)); end + + # Create a new ClassVariableAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#166 + def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#171 + def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#176 + def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node + # + # source://yarp//lib/prism/dsl.rb#181 + def ClassVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node + # + # source://yarp//lib/prism/dsl.rb#186 + def ClassVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node + # + # source://yarp//lib/prism/dsl.rb#191 + def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#196 + def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#201 + def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#206 + def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#211 + def ConstantPathAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathNode node + # + # source://yarp//lib/prism/dsl.rb#216 + def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#221 + def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#226 + def ConstantPathOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node + # + # source://yarp//lib/prism/dsl.rb#231 + def ConstantPathTargetNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node + # + # source://yarp//lib/prism/dsl.rb#236 + def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantReadNode node + # + # source://yarp//lib/prism/dsl.rb#241 + def ConstantReadNode(name, location = T.unsafe(nil)); end + + # Create a new ConstantTargetNode node + # + # source://yarp//lib/prism/dsl.rb#246 + def ConstantTargetNode(name, location = T.unsafe(nil)); end + + # Create a new ConstantWriteNode node + # + # source://yarp//lib/prism/dsl.rb#251 + def ConstantWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new DefNode node + # + # source://yarp//lib/prism/dsl.rb#256 + def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new DefinedNode node + # + # source://yarp//lib/prism/dsl.rb#261 + def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new ElseNode node + # + # source://yarp//lib/prism/dsl.rb#266 + def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node + # + # source://yarp//lib/prism/dsl.rb#271 + def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node + # + # source://yarp//lib/prism/dsl.rb#276 + def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end + + # Create a new EnsureNode node + # + # source://yarp//lib/prism/dsl.rb#281 + def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new FalseNode node + # + # source://yarp//lib/prism/dsl.rb#286 + def FalseNode(location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # source://yarp//lib/prism/dsl.rb#291 + def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new FlipFlopNode node + # + # source://yarp//lib/prism/dsl.rb#296 + def FlipFlopNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new FloatNode node + # + # source://yarp//lib/prism/dsl.rb#301 + def FloatNode(location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # source://yarp//lib/prism/dsl.rb#306 + def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ForwardingArgumentsNode node + # + # source://yarp//lib/prism/dsl.rb#311 + def ForwardingArgumentsNode(location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # source://yarp//lib/prism/dsl.rb#316 + def ForwardingParameterNode(location = T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node + # + # source://yarp//lib/prism/dsl.rb#321 + def ForwardingSuperNode(block, location = T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#326 + def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#331 + def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#336 + def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node + # + # source://yarp//lib/prism/dsl.rb#341 + def GlobalVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node + # + # source://yarp//lib/prism/dsl.rb#346 + def GlobalVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node + # + # source://yarp//lib/prism/dsl.rb#351 + def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new HashNode node + # + # source://yarp//lib/prism/dsl.rb#356 + def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end + + # Create a new HashPatternNode node + # + # source://yarp//lib/prism/dsl.rb#361 + def HashPatternNode(constant, assocs, kwrest, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new IfNode node + # + # source://yarp//lib/prism/dsl.rb#366 + def IfNode(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ImaginaryNode node + # + # source://yarp//lib/prism/dsl.rb#371 + def ImaginaryNode(numeric, location = T.unsafe(nil)); end + + # Create a new ImplicitNode node + # + # source://yarp//lib/prism/dsl.rb#376 + def ImplicitNode(value, location = T.unsafe(nil)); end + + # Create a new InNode node + # + # source://yarp//lib/prism/dsl.rb#381 + def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#386 + def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#391 + def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#396 + def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node + # + # source://yarp//lib/prism/dsl.rb#401 + def InstanceVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node + # + # source://yarp//lib/prism/dsl.rb#406 + def InstanceVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node + # + # source://yarp//lib/prism/dsl.rb#411 + def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new IntegerNode node + # + # source://yarp//lib/prism/dsl.rb#416 + def IntegerNode(flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node + # + # source://yarp//lib/prism/dsl.rb#421 + def InterpolatedMatchLastLineNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node + # + # source://yarp//lib/prism/dsl.rb#426 + def InterpolatedRegularExpressionNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node + # + # source://yarp//lib/prism/dsl.rb#431 + def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedSymbolNode node + # + # source://yarp//lib/prism/dsl.rb#436 + def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node + # + # source://yarp//lib/prism/dsl.rb#441 + def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new KeywordHashNode node + # + # source://yarp//lib/prism/dsl.rb#446 + def KeywordHashNode(elements, location = T.unsafe(nil)); end + + # Create a new KeywordParameterNode node + # + # source://yarp//lib/prism/dsl.rb#451 + def KeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end + + # Create a new KeywordRestParameterNode node + # + # source://yarp//lib/prism/dsl.rb#456 + def KeywordRestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new LambdaNode node + # + # source://yarp//lib/prism/dsl.rb#461 + def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, location = T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#466 + def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#471 + def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#476 + def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node + # + # source://yarp//lib/prism/dsl.rb#481 + def LocalVariableReadNode(name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node + # + # source://yarp//lib/prism/dsl.rb#486 + def LocalVariableTargetNode(name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node + # + # source://yarp//lib/prism/dsl.rb#491 + def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new Location object + # + # source://yarp//lib/prism/dsl.rb#41 + def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + + # Create a new MatchLastLineNode node + # + # source://yarp//lib/prism/dsl.rb#496 + def MatchLastLineNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end + + # Create a new MatchPredicateNode node + # + # source://yarp//lib/prism/dsl.rb#501 + def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchRequiredNode node + # + # source://yarp//lib/prism/dsl.rb#506 + def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchWriteNode node + # + # source://yarp//lib/prism/dsl.rb#511 + def MatchWriteNode(call, locals, location = T.unsafe(nil)); end + + # Create a new MissingNode node + # + # source://yarp//lib/prism/dsl.rb#516 + def MissingNode(location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # source://yarp//lib/prism/dsl.rb#521 + def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = T.unsafe(nil)); end + + # Create a new MultiTargetNode node + # + # source://yarp//lib/prism/dsl.rb#526 + def MultiTargetNode(targets, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new MultiWriteNode node + # + # source://yarp//lib/prism/dsl.rb#531 + def MultiWriteNode(targets, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new NextNode node + # + # source://yarp//lib/prism/dsl.rb#536 + def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NilNode node + # + # source://yarp//lib/prism/dsl.rb#541 + def NilNode(location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # source://yarp//lib/prism/dsl.rb#546 + def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # source://yarp//lib/prism/dsl.rb#551 + def NumberedReferenceReadNode(number, location = T.unsafe(nil)); end + + # Create a new OptionalParameterNode node + # + # source://yarp//lib/prism/dsl.rb#556 + def OptionalParameterNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new OrNode node + # + # source://yarp//lib/prism/dsl.rb#561 + def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ParametersNode node + # + # source://yarp//lib/prism/dsl.rb#566 + def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = T.unsafe(nil)); end + + # Create a new ParenthesesNode node + # + # source://yarp//lib/prism/dsl.rb#571 + def ParenthesesNode(body, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node + # + # source://yarp//lib/prism/dsl.rb#576 + def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new PinnedVariableNode node + # + # source://yarp//lib/prism/dsl.rb#581 + def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end + + # Create a new PostExecutionNode node + # + # source://yarp//lib/prism/dsl.rb#586 + def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PreExecutionNode node + # + # source://yarp//lib/prism/dsl.rb#591 + def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ProgramNode node + # + # source://yarp//lib/prism/dsl.rb#596 + def ProgramNode(locals, statements, location = T.unsafe(nil)); end + + # Create a new RangeNode node + # + # source://yarp//lib/prism/dsl.rb#601 + def RangeNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new RationalNode node + # + # source://yarp//lib/prism/dsl.rb#606 + def RationalNode(numeric, location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # source://yarp//lib/prism/dsl.rb#611 + def RedoNode(location = T.unsafe(nil)); end + + # Create a new RegularExpressionNode node + # + # source://yarp//lib/prism/dsl.rb#616 + def RegularExpressionNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end + + # Create a new RequiredDestructuredParameterNode node + # + # source://yarp//lib/prism/dsl.rb#621 + def RequiredDestructuredParameterNode(parameters, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new RequiredParameterNode node + # + # source://yarp//lib/prism/dsl.rb#626 + def RequiredParameterNode(name, location = T.unsafe(nil)); end + + # Create a new RescueModifierNode node + # + # source://yarp//lib/prism/dsl.rb#631 + def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end + + # Create a new RescueNode node + # + # source://yarp//lib/prism/dsl.rb#636 + def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = T.unsafe(nil)); end + + # Create a new RestParameterNode node + # + # source://yarp//lib/prism/dsl.rb#641 + def RestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new RetryNode node + # + # source://yarp//lib/prism/dsl.rb#646 + def RetryNode(location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # source://yarp//lib/prism/dsl.rb#651 + def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end + + # Create a new SelfNode node + # + # source://yarp//lib/prism/dsl.rb#656 + def SelfNode(location = T.unsafe(nil)); end + + # Create a new SingletonClassNode node + # + # source://yarp//lib/prism/dsl.rb#661 + def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new SourceEncodingNode node + # + # source://yarp//lib/prism/dsl.rb#666 + def SourceEncodingNode(location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # source://yarp//lib/prism/dsl.rb#671 + def SourceFileNode(filepath, location = T.unsafe(nil)); end + + # Create a new SourceLineNode node + # + # source://yarp//lib/prism/dsl.rb#676 + def SourceLineNode(location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # source://yarp//lib/prism/dsl.rb#681 + def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end + + # Create a new StatementsNode node + # + # source://yarp//lib/prism/dsl.rb#686 + def StatementsNode(body, location = T.unsafe(nil)); end + + # Create a new StringConcatNode node + # + # source://yarp//lib/prism/dsl.rb#691 + def StringConcatNode(left, right, location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # source://yarp//lib/prism/dsl.rb#696 + def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new SuperNode node + # + # source://yarp//lib/prism/dsl.rb#701 + def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = T.unsafe(nil)); end + + # Create a new SymbolNode node + # + # source://yarp//lib/prism/dsl.rb#706 + def SymbolNode(opening_loc, value_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new TrueNode node + # + # source://yarp//lib/prism/dsl.rb#711 + def TrueNode(location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # source://yarp//lib/prism/dsl.rb#716 + def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end + + # Create a new UnlessNode node + # + # source://yarp//lib/prism/dsl.rb#721 + def UnlessNode(keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new UntilNode node + # + # source://yarp//lib/prism/dsl.rb#726 + def UntilNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new WhenNode node + # + # source://yarp//lib/prism/dsl.rb#731 + def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end + + # Create a new WhileNode node + # + # source://yarp//lib/prism/dsl.rb#736 + def WhileNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new XStringNode node + # + # source://yarp//lib/prism/dsl.rb#741 + def XStringNode(opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new YieldNode node + # + # source://yarp//lib/prism/dsl.rb#746 + def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, location = T.unsafe(nil)); end +end + +# This module is used for testing and debugging and is not meant to be used by +# consumers of this library. +# +# source://yarp//lib/prism/debug.rb#6 +module Prism::Debug + class << self + # For the given source, compiles with CRuby and returns a list of all of the + # sets of local variables that were encountered. + # + # source://yarp//lib/prism/debug.rb#47 + def cruby_locals(source); end + + def memsize(_arg0); end + def named_captures(_arg0); end + + # source://yarp//lib/prism/debug.rb#149 + def newlines(source); end + + # source://yarp//lib/prism/debug.rb#153 + def parse_serialize_file(filepath); end + + def parse_serialize_file_metadata(_arg0, _arg1); end + + # For the given source, parses with prism and returns a list of all of the + # sets of local variables that were encountered. + # + # source://yarp//lib/prism/debug.rb#82 + def prism_locals(source); end + + def profile_file(_arg0); end + def unescape_all(_arg0); end + def unescape_minimal(_arg0); end + def unescape_none(_arg0); end + def unescape_whitespace(_arg0); end + end +end + +# source://yarp//lib/prism/debug.rb#7 +class Prism::Debug::ISeq + # @return [ISeq] a new instance of ISeq + # + # source://yarp//lib/prism/debug.rb#10 + def initialize(parts); end + + # source://yarp//lib/prism/debug.rb#26 + def each_child; end + + # source://yarp//lib/prism/debug.rb#22 + def instructions; end + + # source://yarp//lib/prism/debug.rb#18 + def local_table; end + + # Returns the value of attribute parts. + # + # source://yarp//lib/prism/debug.rb#8 + def parts; end + + # source://yarp//lib/prism/debug.rb#14 + def type; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4529 +class Prism::DefNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [DefNode] a new instance of DefNode + # + # source://yarp//lib/prism/node.rb#4567 + def initialize(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4584 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#4543 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4589 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4603 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4594 + def compact_child_nodes; end + + # def copy: (**params) -> DefNode + # + # source://yarp//lib/prism/node.rb#4608 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4589 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4630 + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#4635 + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#4549 + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#4660 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#4564 + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://yarp//lib/prism/node.rb#4655 + def equal; end + + # attr_reader equal_loc: Location? + # + # source://yarp//lib/prism/node.rb#4561 + def equal_loc; end + + # source://yarp//lib/prism/node.rb#4664 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#4546 + def locals; end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#4645 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#4555 + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#4531 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#4534 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/prism/node.rb#4640 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#4552 + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://yarp//lib/prism/node.rb#4540 + def parameters; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#4537 + def receiver; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#4650 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#4558 + 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://yarp//lib/prism/node.rb#4710 + def type; end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4719 +class Prism::DefinedNode < ::Prism::Node + # def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://yarp//lib/prism/node.rb#4733 + def initialize(lparen_loc, value, rparen_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4742 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4747 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4757 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4752 + def compact_child_nodes; end + + # def copy: (**params) -> DefinedNode + # + # source://yarp//lib/prism/node.rb#4762 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4747 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4776 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4795 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#4791 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#4730 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#4781 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#4721 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#4786 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#4727 + 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://yarp//lib/prism/node.rb#4819 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#4724 + def value; end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# source://yarp//lib/prism/desugar_compiler.rb#6 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#12 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://yarp//lib/prism/desugar_compiler.rb#30 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#21 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#39 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://yarp//lib/prism/desugar_compiler.rb#57 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#48 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#66 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://yarp//lib/prism/desugar_compiler.rb#84 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#75 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://yarp//lib/prism/desugar_compiler.rb#93 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://yarp//lib/prism/desugar_compiler.rb#111 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://yarp//lib/prism/desugar_compiler.rb#102 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#120 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://yarp//lib/prism/desugar_compiler.rb#138 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#129 + def visit_local_variable_or_write_node(node); end + + private + + # Desugar `x &&= y` to `x && x = y` + # + # source://yarp//lib/prism/desugar_compiler.rb#145 + def desugar_and_write_node(node, read_class, write_class, *arguments); end + + # Desugar `x += y` to `x = x + y` + # + # source://yarp//lib/prism/desugar_compiler.rb#155 + def desugar_operator_write_node(node, read_class, write_class, *arguments); end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://yarp//lib/prism/desugar_compiler.rb#187 + def desugar_or_write_defined_node(node, read_class, write_class, *arguments); end + + # Desugar `x ||= y` to `x || x = y` + # + # source://yarp//lib/prism/desugar_compiler.rb#177 + 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://yarp//lib/prism/dispatcher.rb#40 +class Prism::Dispatcher < ::Prism::Visitor + # @return [Dispatcher] a new instance of Dispatcher + # + # source://yarp//lib/prism/dispatcher.rb#44 + def initialize; end + + # Walks `root` dispatching events to all registered listeners + # + # def dispatch: (Node) -> void + # + # source://yarp//lib/prism/visitor.rb#14 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners + # + # def dispatch_once: (Node) -> void + # + # source://yarp//lib/prism/dispatcher.rb#63 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # source://yarp//lib/prism/dispatcher.rb#42 + def listeners; end + + # Register a listener for one or more events + # + # def register: (Listener, *Symbol) -> void + # + # source://yarp//lib/prism/dispatcher.rb#51 + def register(listener, *events); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#69 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#77 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#85 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#93 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#101 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#109 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#117 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#125 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#133 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#141 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#149 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#157 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#165 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#173 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#181 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#189 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#197 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#205 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#213 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#221 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#229 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#237 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#245 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#253 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#261 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#269 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#277 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#285 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#293 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#301 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#309 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#317 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#325 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#333 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#341 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#349 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#357 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#365 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#373 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#381 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#389 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#397 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#405 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#413 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#421 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#429 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#437 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#445 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#453 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#461 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#469 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#477 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#485 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#493 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#501 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#509 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#517 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#525 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#533 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#541 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#549 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#557 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#565 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#573 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#581 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#589 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#597 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#605 + def visit_in_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#613 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#621 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#629 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#637 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#645 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#653 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#661 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#669 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#677 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#685 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#693 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#701 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#709 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#717 + def visit_keyword_parameter_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#725 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#733 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#741 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#749 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#757 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#765 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#773 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#781 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#789 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#797 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#805 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#813 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#821 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#829 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#837 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#845 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#853 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#861 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#869 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#877 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#885 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#893 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#901 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#909 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#917 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#925 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#933 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#941 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#949 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#957 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#965 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#973 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#981 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredDestructuredParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#989 + def visit_required_destructured_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#997 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1005 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1013 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1021 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1029 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1037 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1045 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1053 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1061 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1069 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1077 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1085 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1093 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringConcatNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1101 + def visit_string_concat_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1109 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1117 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1125 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1133 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1141 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1149 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1157 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1165 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1173 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1181 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1189 + def visit_yield_node(node); end +end + +# source://yarp//lib/prism/dispatcher.rb#1195 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://yarp//lib/prism/dispatcher.rb#1198 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://yarp//lib/prism/dispatcher.rb#1196 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1203 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1209 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1215 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1221 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1227 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1233 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1239 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1245 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1251 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1257 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1263 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1269 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1275 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1281 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1287 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1293 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1299 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1305 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1311 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1317 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1323 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1329 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1335 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1341 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1347 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1353 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1359 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1365 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1371 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1377 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1383 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1389 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1395 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1401 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1407 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1413 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1419 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1425 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1431 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1437 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1443 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1449 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1455 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1461 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1467 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1473 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1479 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1485 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1491 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1497 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1503 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1509 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1515 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1521 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1527 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1533 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1539 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1545 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1551 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1557 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1563 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1569 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1575 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1581 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1587 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1593 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1599 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1605 + def visit_in_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1611 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1617 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1623 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1629 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1635 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1641 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1647 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1653 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1659 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1665 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1671 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1677 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1683 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1689 + def visit_keyword_parameter_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1695 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1701 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1707 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1713 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1719 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1725 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1731 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1737 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1743 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1749 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1755 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1761 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1767 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1773 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1779 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1785 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1791 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1797 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1803 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1809 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1815 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1821 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1827 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1833 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1839 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1845 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1851 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1857 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1863 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1869 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1875 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1881 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1887 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredDestructuredParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1893 + def visit_required_destructured_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1899 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1905 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1911 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1917 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1923 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1929 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1935 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1941 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1947 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1953 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1959 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1965 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1971 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringConcatNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1977 + def visit_string_concat_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1983 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1989 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1995 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2001 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2007 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2013 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2019 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2025 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2031 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2037 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2043 + def visit_yield_node(node); end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4828 +class Prism::ElseNode < ::Prism::Node + # def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [ElseNode] a new instance of ElseNode + # + # source://yarp//lib/prism/node.rb#4839 + def initialize(else_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4847 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4852 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4864 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4857 + def compact_child_nodes; end + + # def copy: (**params) -> ElseNode + # + # source://yarp//lib/prism/node.rb#4869 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4852 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4882 + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#4887 + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#4830 + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#4892 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#4836 + def end_keyword_loc; end + + # source://yarp//lib/prism/node.rb#4896 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#4833 + 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://yarp//lib/prism/node.rb#4923 + def type; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#4932 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://yarp//lib/prism/node.rb#4943 + def initialize(opening_loc, statements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4951 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4956 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#4996 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#4940 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4968 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4961 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedStatementsNode + # + # source://yarp//lib/prism/node.rb#4973 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4956 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4986 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5000 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#4991 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#4934 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#4937 + 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://yarp//lib/prism/node.rb#5027 + def type; end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#5036 +class Prism::EmbeddedVariableNode < ::Prism::Node + # def initialize: (operator_loc: Location, variable: Node, location: Location) -> void + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://yarp//lib/prism/node.rb#5044 + def initialize(operator_loc, variable, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5051 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5056 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5066 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5061 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedVariableNode + # + # source://yarp//lib/prism/node.rb#5071 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5056 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5083 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5092 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#5088 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#5038 + 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://yarp//lib/prism/node.rb#5114 + def type; end + + # attr_reader variable: Node + # + # source://yarp//lib/prism/node.rb#5041 + def variable; end +end + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://yarp//lib/prism/node.rb#5127 +class Prism::EnsureNode < ::Prism::Node + # def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://yarp//lib/prism/node.rb#5138 + def initialize(ensure_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5146 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5151 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5163 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5156 + def compact_child_nodes; end + + # def copy: (**params) -> EnsureNode + # + # source://yarp//lib/prism/node.rb#5168 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5151 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5181 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5191 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5135 + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5186 + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5129 + def ensure_keyword_loc; end + + # source://yarp//lib/prism/node.rb#5195 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#5132 + 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://yarp//lib/prism/node.rb#5222 + def type; end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#5231 +class Prism::FalseNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [FalseNode] a new instance of FalseNode + # + # source://yarp//lib/prism/node.rb#5233 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5238 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5243 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5253 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5248 + def compact_child_nodes; end + + # def copy: (**params) -> FalseNode + # + # source://yarp//lib/prism/node.rb#5258 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5243 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5268 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5272 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5291 + def type; end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#5306 +class Prism::FindPatternNode < ::Prism::Node + # def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://yarp//lib/prism/node.rb#5326 + def initialize(constant, left, requireds, right, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5337 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5342 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#5388 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#5323 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5357 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5347 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://yarp//lib/prism/node.rb#5308 + def constant; end + + # def copy: (**params) -> FindPatternNode + # + # source://yarp//lib/prism/node.rb#5362 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5342 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5378 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5392 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#5311 + def left; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#5383 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#5320 + def opening_loc; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/prism/node.rb#5314 + def requireds; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#5317 + 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://yarp//lib/prism/node.rb#5424 + def type; end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#5433 +class Prism::FlipFlopNode < ::Prism::Node + # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://yarp//lib/prism/node.rb#5447 + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5456 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5461 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5474 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5466 + def compact_child_nodes; end + + # def copy: (**params) -> FlipFlopNode + # + # source://yarp//lib/prism/node.rb#5479 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5461 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5493 + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#5503 + def exclude_end?; end + + # source://yarp//lib/prism/node.rb#5507 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://yarp//lib/prism/node.rb#5435 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#5498 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#5441 + def operator_loc; end + + # attr_reader right: Node? + # + # source://yarp//lib/prism/node.rb#5438 + 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://yarp//lib/prism/node.rb#5541 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#5444 + def flags; end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://yarp//lib/prism/node.rb#5550 +class Prism::FloatNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # source://yarp//lib/prism/node.rb#5552 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5557 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5562 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5572 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5567 + def compact_child_nodes; end + + # def copy: (**params) -> FloatNode + # + # source://yarp//lib/prism/node.rb#5577 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5562 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5587 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5591 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5610 + def type; end + + # Returns the value of the node as a Ruby Float. + # + # source://yarp//lib/prism/node_ext.rb#8 + def value; end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#5619 +class Prism::ForNode < ::Prism::Node + # def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void + # + # @return [ForNode] a new instance of ForNode + # + # source://yarp//lib/prism/node.rb#5642 + def initialize(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5654 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5659 + def child_nodes; end + + # attr_reader collection: Node + # + # source://yarp//lib/prism/node.rb#5624 + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5673 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5664 + def compact_child_nodes; end + + # def copy: (**params) -> ForNode + # + # source://yarp//lib/prism/node.rb#5678 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5659 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5695 + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#5710 + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#5636 + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5715 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5639 + def end_keyword_loc; end + + # def for_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5700 + def for_keyword; end + + # attr_reader for_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5630 + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5705 + def in_keyword; end + + # attr_reader in_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5633 + def in_keyword_loc; end + + # attr_reader index: Node + # + # source://yarp//lib/prism/node.rb#5621 + def index; end + + # source://yarp//lib/prism/node.rb#5719 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#5627 + 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://yarp//lib/prism/node.rb#5752 + def type; end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#5763 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://yarp//lib/prism/node.rb#5765 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5770 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5775 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5785 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5780 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingArgumentsNode + # + # source://yarp//lib/prism/node.rb#5790 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5775 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5800 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5804 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5823 + def type; end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://yarp//lib/prism/node.rb#5833 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://yarp//lib/prism/node.rb#5835 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5840 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5845 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5855 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5850 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingParameterNode + # + # source://yarp//lib/prism/node.rb#5860 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5845 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5870 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5874 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5893 + def type; end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#5902 +class Prism::ForwardingSuperNode < ::Prism::Node + # def initialize: (block: BlockNode?, location: Location) -> void + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://yarp//lib/prism/node.rb#5907 + def initialize(block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5913 + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://yarp//lib/prism/node.rb#5904 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5918 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5930 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5923 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingSuperNode + # + # source://yarp//lib/prism/node.rb#5935 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5918 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5946 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5950 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5975 + def type; end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#5984 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#5998 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6007 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6012 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6022 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6017 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#6027 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6012 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6041 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6050 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#5986 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#5989 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#6046 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#5992 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6074 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#5995 + def value; end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6083 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#6100 + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6110 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6115 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6125 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6120 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#6130 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6115 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6145 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6149 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6085 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#6088 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#6097 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#6091 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6174 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#6094 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6183 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#6197 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6206 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6211 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6221 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6216 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#6226 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6211 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6240 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6249 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6185 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#6188 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#6245 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#6191 + 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://yarp//lib/prism/node.rb#6273 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#6194 + def value; end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://yarp//lib/prism/node.rb#6282 +class Prism::GlobalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://yarp//lib/prism/node.rb#6287 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6293 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6298 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6308 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6303 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableReadNode + # + # source://yarp//lib/prism/node.rb#6313 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6298 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6324 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6328 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6284 + 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://yarp//lib/prism/node.rb#6348 + def type; end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://yarp//lib/prism/node.rb#6357 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://yarp//lib/prism/node.rb#6362 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6368 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6373 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6383 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6378 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableTargetNode + # + # source://yarp//lib/prism/node.rb#6388 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6373 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6399 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6403 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6359 + 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://yarp//lib/prism/node.rb#6423 + def type; end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6432 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://yarp//lib/prism/node.rb#6446 + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6455 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6460 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6470 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6465 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableWriteNode + # + # source://yarp//lib/prism/node.rb#6475 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6460 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6489 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6498 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6434 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#6437 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#6494 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#6443 + 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://yarp//lib/prism/node.rb#6522 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#6440 + def value; end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6531 +class Prism::HashNode < ::Prism::Node + # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void + # + # @return [HashNode] a new instance of HashNode + # + # source://yarp//lib/prism/node.rb#6542 + def initialize(opening_loc, elements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6550 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6555 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#6593 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#6539 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6565 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6560 + def compact_child_nodes; end + + # def copy: (**params) -> HashNode + # + # source://yarp//lib/prism/node.rb#6570 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6555 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6583 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/prism/node.rb#6536 + def elements; end + + # source://yarp//lib/prism/node.rb#6597 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#6588 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#6533 + 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://yarp//lib/prism/node.rb#6619 + def type; end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6631 +class Prism::HashPatternNode < ::Prism::Node + # def initialize: (constant: Node?, assocs: Array[Node], kwrest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://yarp//lib/prism/node.rb#6648 + def initialize(constant, assocs, kwrest, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6658 + def accept(visitor); end + + # attr_reader assocs: Array[Node] + # + # source://yarp//lib/prism/node.rb#6636 + def assocs; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6663 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#6707 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#6645 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6677 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6668 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://yarp//lib/prism/node.rb#6633 + def constant; end + + # def copy: (**params) -> HashPatternNode + # + # source://yarp//lib/prism/node.rb#6682 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6663 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6697 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6711 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader kwrest: Node? + # + # source://yarp//lib/prism/node.rb#6639 + def kwrest; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#6702 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#6642 + 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://yarp//lib/prism/node.rb#6745 + def type; 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://yarp//lib/prism/node.rb#6757 +class Prism::IfNode < ::Prism::Node + # def initialize: (if_keyword_loc: Location?, predicate: Node, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [IfNode] a new instance of IfNode + # + # source://yarp//lib/prism/node.rb#6774 + def initialize(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6784 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6793 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6807 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6798 + def compact_child_nodes; end + + # attr_reader consequent: Node? + # + # source://yarp//lib/prism/node.rb#6768 + def consequent; end + + # def copy: (**params) -> IfNode + # + # source://yarp//lib/prism/node.rb#6812 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6793 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6827 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#6837 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#6771 + def end_keyword_loc; end + + # def if_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#6832 + def if_keyword; end + + # attr_reader if_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#6759 + def if_keyword_loc; end + + # source://yarp//lib/prism/node.rb#6841 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node + # + # source://yarp//lib/prism/node.rb#6762 + def predicate; end + + # source://yarp//lib/prism/node.rb#6788 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#6765 + 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://yarp//lib/prism/node.rb#6876 + def type; end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://yarp//lib/prism/node.rb#6885 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://yarp//lib/prism/node.rb#6890 + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6896 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6901 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6911 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6906 + def compact_child_nodes; end + + # def copy: (**params) -> ImaginaryNode + # + # source://yarp//lib/prism/node.rb#6916 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6901 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6927 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6931 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://yarp//lib/prism/node.rb#6887 + 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://yarp//lib/prism/node.rb#6952 + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://yarp//lib/prism/node_ext.rb#15 + def value; end +end + +# Represents a node that is implicitly being added to the tree but doesn't +# correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# source://yarp//lib/prism/node.rb#6965 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (value: Node, location: Location) -> void + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://yarp//lib/prism/node.rb#6970 + def initialize(value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6976 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6981 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6991 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6986 + def compact_child_nodes; end + + # def copy: (**params) -> ImplicitNode + # + # source://yarp//lib/prism/node.rb#6996 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6981 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7007 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7011 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7032 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#6967 + def value; end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7041 +class Prism::InNode < ::Prism::Node + # def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void + # + # @return [InNode] a new instance of InNode + # + # source://yarp//lib/prism/node.rb#7055 + def initialize(pattern, statements, in_loc, then_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7064 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7069 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7082 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7074 + def compact_child_nodes; end + + # def copy: (**params) -> InNode + # + # source://yarp//lib/prism/node.rb#7087 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7069 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7101 + def deconstruct_keys(keys); end + + # def in: () -> String + # + # source://yarp//lib/prism/node.rb#7106 + def in; end + + # attr_reader in_loc: Location + # + # source://yarp//lib/prism/node.rb#7049 + def in_loc; end + + # source://yarp//lib/prism/node.rb#7115 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader pattern: Node + # + # source://yarp//lib/prism/node.rb#7043 + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#7046 + def statements; end + + # def then: () -> String? + # + # source://yarp//lib/prism/node.rb#7111 + def then; end + + # attr_reader then_loc: Location? + # + # source://yarp//lib/prism/node.rb#7052 + 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://yarp//lib/prism/node.rb#7144 + def type; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7153 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#7167 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7176 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7181 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7191 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7186 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#7196 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7181 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7210 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7219 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7155 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#7158 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#7215 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#7161 + 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://yarp//lib/prism/node.rb#7243 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#7164 + def value; end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7252 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#7269 + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7279 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7284 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7294 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7289 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#7299 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7284 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7314 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7318 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7254 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#7257 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#7266 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#7260 + 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://yarp//lib/prism/node.rb#7343 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#7263 + def value; end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7352 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#7366 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7375 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7380 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7390 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7385 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#7395 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7380 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7409 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7418 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7354 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#7357 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#7414 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#7360 + 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://yarp//lib/prism/node.rb#7442 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#7363 + def value; end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://yarp//lib/prism/node.rb#7451 +class Prism::InstanceVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://yarp//lib/prism/node.rb#7456 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7462 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7467 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7477 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7472 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableReadNode + # + # source://yarp//lib/prism/node.rb#7482 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7467 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7493 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7497 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7453 + 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://yarp//lib/prism/node.rb#7517 + def type; end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://yarp//lib/prism/node.rb#7526 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://yarp//lib/prism/node.rb#7531 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7537 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7542 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7552 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7547 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableTargetNode + # + # source://yarp//lib/prism/node.rb#7557 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7542 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7568 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7572 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7528 + 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://yarp//lib/prism/node.rb#7592 + def type; end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7601 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://yarp//lib/prism/node.rb#7615 + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7624 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7629 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7639 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7634 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableWriteNode + # + # source://yarp//lib/prism/node.rb#7644 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7629 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7658 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7667 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7603 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#7606 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#7663 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#7612 + 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://yarp//lib/prism/node.rb#7691 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#7609 + def value; end +end + +# source://yarp//lib/prism/node.rb#14486 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://yarp//lib/prism/node.rb#14488 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://yarp//lib/prism/node.rb#14494 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://yarp//lib/prism/node.rb#14497 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://yarp//lib/prism/node.rb#14491 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://yarp//lib/prism/node.rb#7700 +class Prism::IntegerNode < ::Prism::Node + # def initialize: (flags: Integer, location: Location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://yarp//lib/prism/node.rb#7705 + def initialize(flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7711 + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7747 + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7716 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7726 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7721 + def compact_child_nodes; end + + # def copy: (**params) -> IntegerNode + # + # source://yarp//lib/prism/node.rb#7731 + def copy(**params); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7757 + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7716 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7742 + def deconstruct_keys(keys); end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7762 + def hexadecimal?; end + + # source://yarp//lib/prism/node.rb#7766 + def inspect(inspector = T.unsafe(nil)); end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7752 + 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://yarp//lib/prism/node.rb#7787 + def type; end + + # Returns the value of the node as a Ruby Integer. + # + # source://yarp//lib/prism/node_ext.rb#22 + def value; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#7702 + def flags; 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://yarp//lib/prism/node.rb#7798 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://yarp//lib/prism/node.rb#7812 + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7821 + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7895 + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7831 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#7870 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#7806 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7841 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7836 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedMatchLastLineNode + # + # source://yarp//lib/prism/node.rb#7846 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7831 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7860 + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7890 + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7880 + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7875 + def ignore_case?; end + + # source://yarp//lib/prism/node.rb#7914 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7885 + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7910 + def once?; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#7865 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#7800 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#7803 + def parts; end + + # source://yarp//lib/prism/node.rb#7825 + 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://yarp//lib/prism/node.rb#7938 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7905 + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7900 + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#7809 + def flags; end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7947 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://yarp//lib/prism/node.rb#7961 + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7970 + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8044 + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7980 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#8019 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#7955 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7990 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7985 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedRegularExpressionNode + # + # source://yarp//lib/prism/node.rb#7995 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7980 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8009 + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8039 + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8029 + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8024 + def ignore_case?; end + + # source://yarp//lib/prism/node.rb#8063 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8034 + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8059 + def once?; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#8014 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#7949 + def opening_loc; end + + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://yarp//lib/prism/node_ext.rb#30 + def options; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#7952 + def parts; end + + # source://yarp//lib/prism/node.rb#7974 + 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://yarp//lib/prism/node.rb#8087 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8054 + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8049 + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#7958 + def flags; end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8096 +class Prism::InterpolatedStringNode < ::Prism::Node + # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://yarp//lib/prism/node.rb#8107 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8115 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8125 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#8163 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#8104 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8135 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8130 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedStringNode + # + # source://yarp//lib/prism/node.rb#8140 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8125 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8153 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8167 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#8158 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#8098 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#8101 + def parts; end + + # source://yarp//lib/prism/node.rb#8119 + 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://yarp//lib/prism/node.rb#8189 + def type; end +end + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8198 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://yarp//lib/prism/node.rb#8209 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8217 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8227 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#8265 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#8206 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8237 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8232 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedSymbolNode + # + # source://yarp//lib/prism/node.rb#8242 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8227 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8255 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8269 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#8260 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#8200 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#8203 + def parts; end + + # source://yarp//lib/prism/node.rb#8221 + 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://yarp//lib/prism/node.rb#8291 + def type; end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8300 +class Prism::InterpolatedXStringNode < ::Prism::Node + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://yarp//lib/prism/node.rb#8311 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8319 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8329 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#8367 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#8308 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8339 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8334 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedXStringNode + # + # source://yarp//lib/prism/node.rb#8344 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8329 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8357 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8371 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#8362 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#8302 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#8305 + def parts; end + + # source://yarp//lib/prism/node.rb#8323 + 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://yarp//lib/prism/node.rb#8393 + def type; end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://yarp//lib/prism/node.rb#8402 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (elements: Array[Node], location: Location) -> void + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://yarp//lib/prism/node.rb#8407 + def initialize(elements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8413 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8418 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8428 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8423 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordHashNode + # + # source://yarp//lib/prism/node.rb#8433 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8418 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8444 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/prism/node.rb#8404 + def elements; end + + # source://yarp//lib/prism/node.rb#8448 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8468 + def type; end +end + +# Represents a keyword parameter to a method, block, or lambda definition. +# +# def a(b:) +# ^^ +# end +# +# def a(b: 1) +# ^^^^ +# end +# +# source://yarp//lib/prism/node.rb#8482 +class Prism::KeywordParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node?, location: Location) -> void + # + # @return [KeywordParameterNode] a new instance of KeywordParameterNode + # + # source://yarp//lib/prism/node.rb#8493 + def initialize(name, name_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8501 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8506 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8518 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8511 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordParameterNode + # + # source://yarp//lib/prism/node.rb#8523 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8506 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8536 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8540 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#8484 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#8487 + def name_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8567 + def type; end + + # attr_reader value: Node? + # + # source://yarp//lib/prism/node.rb#8490 + def value; end +end + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://yarp//lib/prism/node.rb#8577 +class Prism::KeywordRestParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://yarp//lib/prism/node.rb#8588 + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8596 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8601 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8611 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8606 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordRestParameterNode + # + # source://yarp//lib/prism/node.rb#8616 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8601 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8629 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8638 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://yarp//lib/prism/node.rb#8579 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/prism/node.rb#8582 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#8634 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#8585 + 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://yarp//lib/prism/node.rb#8660 + def type; end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8669 +class Prism::LambdaNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://yarp//lib/prism/node.rb#8689 + def initialize(locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8700 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#8686 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8705 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#8754 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#8680 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8718 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8710 + def compact_child_nodes; end + + # def copy: (**params) -> LambdaNode + # + # source://yarp//lib/prism/node.rb#8723 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8705 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8739 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8758 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#8671 + def locals; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#8749 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#8677 + def opening_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#8744 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#8674 + def operator_loc; end + + # attr_reader parameters: BlockParametersNode? + # + # source://yarp//lib/prism/node.rb#8683 + 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://yarp//lib/prism/node.rb#8793 + def type; 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://yarp//lib/prism/lex_compat.rb#11 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://yarp//lib/prism/lex_compat.rb#555 + def initialize(source, filepath = T.unsafe(nil)); end + + # Returns the value of attribute filepath. + # + # source://yarp//lib/prism/lex_compat.rb#553 + def filepath; end + + # source://yarp//lib/prism/lex_compat.rb#560 + def result; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/lex_compat.rb#553 + def source; end +end + +# Ripper doesn't include the rest of the token in the event, so we need to +# trim it down to just the content on the first line when comparing. +# +# source://yarp//lib/prism/lex_compat.rb#206 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#207 + 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://yarp//lib/prism/lex_compat.rb#267 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://yarp//lib/prism/lex_compat.rb#541 + 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://yarp//lib/prism/lex_compat.rb#291 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://yarp//lib/prism/lex_compat.rb#294 + def initialize(split); end + + # source://yarp//lib/prism/lex_compat.rb#299 + def <<(token); end + + # Returns the value of attribute split. + # + # source://yarp//lib/prism/lex_compat.rb#292 + def split; end + + # source://yarp//lib/prism/lex_compat.rb#303 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/prism/lex_compat.rb#292 + 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://yarp//lib/prism/lex_compat.rb#350 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://yarp//lib/prism/lex_compat.rb#355 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://yarp//lib/prism/lex_compat.rb#365 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://yarp//lib/prism/lex_compat.rb#353 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://yarp//lib/prism/lex_compat.rb#353 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://yarp//lib/prism/lex_compat.rb#353 + def embexpr_balance; end + + # source://yarp//lib/prism/lex_compat.rb#397 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/prism/lex_compat.rb#353 + def tokens; end +end + +# source://yarp//lib/prism/lex_compat.rb#351 +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://yarp//lib/prism/lex_compat.rb#272 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://yarp//lib/prism/lex_compat.rb#275 + def initialize; end + + # source://yarp//lib/prism/lex_compat.rb#279 + def <<(token); end + + # source://yarp//lib/prism/lex_compat.rb#283 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/prism/lex_compat.rb#273 + 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://yarp//lib/prism/lex_compat.rb#224 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#225 + def ==(other); end +end + +# Tokens where state should be ignored +# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://yarp//lib/prism/lex_compat.rb#214 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#215 + def ==(other); end +end + +# Ignored newlines can occasionally have a LABEL state attached to them, so +# we compare the state differently here. +# +# source://yarp//lib/prism/lex_compat.rb#235 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#236 + 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://yarp//lib/prism/lex_compat.rb#255 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#256 + 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://yarp//lib/prism/lex_compat.rb#15 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://yarp//lib/prism/lex_compat.rb#186 +class Prism::LexCompat::Token < ::SimpleDelegator + # source://yarp//lib/prism/lex_compat.rb#191 + def event; end + + # source://yarp//lib/prism/lex_compat.rb#187 + def location; end + + # source://yarp//lib/prism/lex_compat.rb#199 + def state; end + + # source://yarp//lib/prism/lex_compat.rb#195 + def value; end +end + +# This is a class that wraps the Ripper lexer to produce almost exactly the +# same tokens. +# +# source://yarp//lib/prism/lex_compat.rb#800 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://yarp//lib/prism/lex_compat.rb#803 + def initialize(source); end + + # source://yarp//lib/prism/lex_compat.rb#807 + def result; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/lex_compat.rb#801 + def source; end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8802 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#8819 + def initialize(name_loc, operator_loc, value, name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8829 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8834 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8844 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8839 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#8849 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8834 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8864 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#8816 + def depth; end + + # source://yarp//lib/prism/node.rb#8873 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#8813 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#8804 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#8869 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#8807 + 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://yarp//lib/prism/node.rb#8898 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#8810 + def value; end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8907 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#8927 + def initialize(name_loc, operator_loc, value, name, operator, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8938 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8943 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8953 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8948 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#8958 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8943 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8974 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#8924 + def depth; end + + # source://yarp//lib/prism/node.rb#8978 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#8918 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#8909 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#8921 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#8912 + 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://yarp//lib/prism/node.rb#9004 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#8915 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9013 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#9030 + def initialize(name_loc, operator_loc, value, name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9040 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9045 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9055 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9050 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#9060 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9045 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9075 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#9027 + def depth; end + + # source://yarp//lib/prism/node.rb#9084 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9024 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#9015 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#9080 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#9018 + 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://yarp//lib/prism/node.rb#9109 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#9021 + def value; 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://yarp//lib/prism/node.rb#9120 +class Prism::LocalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://yarp//lib/prism/node.rb#9128 + def initialize(name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9135 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9140 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9150 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9145 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableReadNode + # + # source://yarp//lib/prism/node.rb#9155 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9140 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9167 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#9125 + def depth; end + + # source://yarp//lib/prism/node.rb#9171 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9122 + 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://yarp//lib/prism/node.rb#9192 + def type; end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# source://yarp//lib/prism/node.rb#9201 +class Prism::LocalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://yarp//lib/prism/node.rb#9209 + def initialize(name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9216 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9221 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9231 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9226 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableTargetNode + # + # source://yarp//lib/prism/node.rb#9236 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9221 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9248 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#9206 + def depth; end + + # source://yarp//lib/prism/node.rb#9252 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9203 + 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://yarp//lib/prism/node.rb#9273 + def type; end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9282 +class Prism::LocalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://yarp//lib/prism/node.rb#9299 + def initialize(name, depth, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9309 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9314 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9324 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9319 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableWriteNode + # + # source://yarp//lib/prism/node.rb#9329 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9314 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9344 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#9287 + def depth; end + + # source://yarp//lib/prism/node.rb#9353 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9284 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#9290 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#9349 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#9296 + 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://yarp//lib/prism/node.rb#9378 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#9293 + def value; end +end + +# This represents a location in the source. +# +# source://yarp//lib/prism/parse_result.rb#41 +class Prism::Location + # @return [Location] a new instance of Location + # + # source://yarp//lib/prism/parse_result.rb#56 + def initialize(source, start_offset, length); end + + # source://yarp//lib/prism/parse_result.rb#123 + def ==(other); end + + # The list of comments attached to this location + # + # source://yarp//lib/prism/parse_result.rb#54 + def comments; end + + # Create a new location object with the given options. + # + # source://yarp//lib/prism/parse_result.rb#64 + def copy(**options); end + + # source://yarp//lib/prism/parse_result.rb#115 + def deconstruct_keys(keys); end + + # The column number in bytes where this location ends from the start of the + # line. + # + # source://yarp//lib/prism/parse_result.rb#111 + def end_column; end + + # The line number where this location ends. + # + # source://yarp//lib/prism/parse_result.rb#99 + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # source://yarp//lib/prism/parse_result.rb#83 + def end_offset; end + + # Returns a string representation of this location. + # + # source://yarp//lib/prism/parse_result.rb#73 + def inspect; end + + # Returns a new location that stretches from this location to the given + # other location. Raises an error if this location is not before the other + # location or if they don't share the same source. + # + # source://yarp//lib/prism/parse_result.rb#132 + def join(other); end + + # The length of this location in bytes. + # + # source://yarp//lib/prism/parse_result.rb#51 + def length; end + + # source://yarp//lib/prism/parse_result.rb#119 + def pretty_print(q); end + + # The source code that this location represents. + # + # source://yarp//lib/prism/parse_result.rb#78 + def slice; end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://yarp//lib/prism/parse_result.rb#105 + def start_column; end + + # The line number where this location starts. + # + # source://yarp//lib/prism/parse_result.rb#88 + def start_line; end + + # The content of the line where this location starts before this location. + # + # source://yarp//lib/prism/parse_result.rb#93 + def start_line_slice; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # source://yarp//lib/prism/parse_result.rb#48 + def start_offset; end + + protected + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/parse_result.rb#44 + def source; end + + class << self + # source://yarp//lib/prism/parse_result.rb#139 + def null; end + end +end + +# source://yarp//lib/prism/node.rb#14500 +module Prism::LoopFlags; end + +# a loop after a begin statement, so the body is executed first before the condition +# +# source://yarp//lib/prism/node.rb#14502 +Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# 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://yarp//lib/prism/node.rb#9389 +class Prism::MatchLastLineNode < ::Prism::Node + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://yarp//lib/prism/node.rb#9406 + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9416 + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9491 + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9421 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#9466 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#9397 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9431 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9426 + def compact_child_nodes; end + + # def content: () -> String + # + # source://yarp//lib/prism/node.rb#9461 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/prism/node.rb#9394 + def content_loc; end + + # def copy: (**params) -> MatchLastLineNode + # + # source://yarp//lib/prism/node.rb#9436 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9421 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9451 + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9486 + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9476 + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9471 + def ignore_case?; end + + # source://yarp//lib/prism/node.rb#9510 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9481 + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9506 + def once?; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#9456 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#9391 + 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://yarp//lib/prism/node.rb#9535 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#9400 + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9501 + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9496 + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#9403 + def flags; end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9544 +class Prism::MatchPredicateNode < ::Prism::Node + # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://yarp//lib/prism/node.rb#9555 + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9563 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9568 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9578 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9573 + def compact_child_nodes; end + + # def copy: (**params) -> MatchPredicateNode + # + # source://yarp//lib/prism/node.rb#9583 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9568 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9596 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#9605 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#9601 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#9552 + def operator_loc; end + + # attr_reader pattern: Node + # + # source://yarp//lib/prism/node.rb#9549 + 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://yarp//lib/prism/node.rb#9629 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#9546 + def value; end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9638 +class Prism::MatchRequiredNode < ::Prism::Node + # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://yarp//lib/prism/node.rb#9649 + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9657 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9662 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9672 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9667 + def compact_child_nodes; end + + # def copy: (**params) -> MatchRequiredNode + # + # source://yarp//lib/prism/node.rb#9677 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9662 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9690 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#9699 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#9695 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#9646 + def operator_loc; end + + # attr_reader pattern: Node + # + # source://yarp//lib/prism/node.rb#9643 + 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://yarp//lib/prism/node.rb#9723 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#9640 + def value; end +end + +# Represents writing local variables using a regular expression match with +# named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9733 +class Prism::MatchWriteNode < ::Prism::Node + # def initialize: (call: CallNode, locals: Array[Symbol], location: Location) -> void + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://yarp//lib/prism/node.rb#9741 + def initialize(call, locals, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9748 + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://yarp//lib/prism/node.rb#9735 + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9753 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9763 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9758 + def compact_child_nodes; end + + # def copy: (**params) -> MatchWriteNode + # + # source://yarp//lib/prism/node.rb#9768 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9753 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9780 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#9784 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#9738 + def locals; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9806 + def type; end +end + +# Represents a node that is missing from the source and results in a syntax +# error. +# +# source://yarp//lib/prism/node.rb#9813 +class Prism::MissingNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # source://yarp//lib/prism/node.rb#9815 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9820 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9825 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9835 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9830 + def compact_child_nodes; end + + # def copy: (**params) -> MissingNode + # + # source://yarp//lib/prism/node.rb#9840 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9825 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9850 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#9854 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9873 + def type; end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9882 +class Prism::ModuleNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://yarp//lib/prism/node.rb#9902 + def initialize(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9913 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#9893 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9918 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9931 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9923 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://yarp//lib/prism/node.rb#9890 + def constant_path; end + + # def copy: (**params) -> ModuleNode + # + # source://yarp//lib/prism/node.rb#9936 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9918 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9952 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#9962 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#9896 + def end_keyword_loc; end + + # source://yarp//lib/prism/node.rb#9966 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#9884 + def locals; end + + # def module_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#9957 + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#9887 + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9899 + 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://yarp//lib/prism/node.rb#9997 + def type; end +end + +# Represents a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^ +# +# source://yarp//lib/prism/node.rb#10006 +class Prism::MultiTargetNode < ::Prism::Node + # def initialize: (targets: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://yarp//lib/prism/node.rb#10017 + def initialize(targets, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10025 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10030 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10040 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10035 + def compact_child_nodes; end + + # def copy: (**params) -> MultiTargetNode + # + # source://yarp//lib/prism/node.rb#10045 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10030 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10058 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10072 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#10063 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#10011 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#10068 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#10014 + def rparen_loc; end + + # attr_reader targets: Array[Node] + # + # source://yarp//lib/prism/node.rb#10008 + def targets; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10094 + def type; end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#10103 +class Prism::MultiWriteNode < ::Prism::Node + # def initialize: (targets: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://yarp//lib/prism/node.rb#10120 + def initialize(targets, lparen_loc, rparen_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10130 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10135 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10145 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10140 + def compact_child_nodes; end + + # def copy: (**params) -> MultiWriteNode + # + # source://yarp//lib/prism/node.rb#10150 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10135 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10165 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10184 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#10170 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#10108 + def lparen_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#10180 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10114 + def operator_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#10175 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#10111 + def rparen_loc; end + + # attr_reader targets: Array[Node] + # + # source://yarp//lib/prism/node.rb#10105 + def targets; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10209 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#10117 + def value; end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://yarp//lib/prism/mutation_compiler.rb#12 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#14 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#19 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#24 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#29 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#34 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#39 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#44 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#49 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#54 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#59 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#64 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#69 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#74 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#79 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#84 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#89 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#94 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#99 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#104 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#109 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#114 + def visit_call_or_write_node(node); end + + # Copy a CapturePatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#119 + def visit_capture_pattern_node(node); end + + # Copy a CaseNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#124 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#129 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#134 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#139 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#144 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#149 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#154 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#159 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#164 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#169 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#174 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#179 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#184 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#189 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#194 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#199 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#204 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#209 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#214 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#219 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#224 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#229 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#234 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#239 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#244 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#249 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#254 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#259 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#264 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#269 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#274 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#279 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#284 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#289 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#294 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#299 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#304 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#309 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#314 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#319 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#324 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#329 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#334 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#339 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#344 + def visit_implicit_node(node); end + + # Copy a InNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#349 + def visit_in_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#354 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#359 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#364 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#369 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#374 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#379 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#384 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#389 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#394 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#399 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#404 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#409 + def visit_interpolated_x_string_node(node); end + + # Copy a KeywordHashNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#414 + def visit_keyword_hash_node(node); end + + # Copy a KeywordParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#419 + def visit_keyword_parameter_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#424 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#429 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#434 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#439 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#444 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#449 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#454 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#459 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#464 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#469 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#474 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#479 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#484 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#489 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#494 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#499 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#504 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#509 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#514 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#519 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#524 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#529 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#534 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#539 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#544 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#549 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#554 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#559 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#564 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#569 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#574 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#579 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#584 + def visit_regular_expression_node(node); end + + # Copy a RequiredDestructuredParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#589 + def visit_required_destructured_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#594 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#599 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#604 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#609 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#614 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#619 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#624 + def visit_self_node(node); end + + # Copy a SingletonClassNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#629 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#634 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#639 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#644 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#649 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#654 + def visit_statements_node(node); end + + # Copy a StringConcatNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#659 + def visit_string_concat_node(node); end + + # Copy a StringNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#664 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#669 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#674 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#679 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#684 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#689 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#694 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#699 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#704 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#709 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#714 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#10218 +class Prism::NextNode < ::Prism::Node + # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void + # + # @return [NextNode] a new instance of NextNode + # + # source://yarp//lib/prism/node.rb#10226 + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10233 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#10220 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10238 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10250 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10243 + def compact_child_nodes; end + + # def copy: (**params) -> NextNode + # + # source://yarp//lib/prism/node.rb#10255 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10238 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10267 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10276 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#10272 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#10223 + 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://yarp//lib/prism/node.rb#10302 + def type; end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://yarp//lib/prism/node.rb#10311 +class Prism::NilNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [NilNode] a new instance of NilNode + # + # source://yarp//lib/prism/node.rb#10313 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10318 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10323 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10333 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10328 + def compact_child_nodes; end + + # def copy: (**params) -> NilNode + # + # source://yarp//lib/prism/node.rb#10338 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10323 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10348 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10352 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10371 + def type; end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#10381 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://yarp//lib/prism/node.rb#10389 + def initialize(operator_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10396 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10401 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10411 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10406 + def compact_child_nodes; end + + # def copy: (**params) -> NoKeywordsParameterNode + # + # source://yarp//lib/prism/node.rb#10416 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10401 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10428 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10442 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#10438 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#10386 + def keyword_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#10433 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10383 + 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://yarp//lib/prism/node.rb#10463 + def type; end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://yarp//lib/prism/node.rb#11 +class Prism::Node + # Returns the value of attribute location. + # + # source://yarp//lib/prism/node.rb#12 + def location; end + + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#14 + def newline?; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # source://yarp//lib/prism/node.rb#33 + def pretty_print(q); end + + # source://yarp//lib/prism/node.rb#18 + def set_newline_flag(newline_marked); end + + # Slice the location of the node from the source. + # + # source://yarp//lib/prism/node.rb#27 + def slice; end +end + +# This object is responsible for generating the output for the inspect method +# implementations of child nodes. +# +# source://yarp//lib/prism/node_inspector.rb#6 +class Prism::NodeInspector + # @return [NodeInspector] a new instance of NodeInspector + # + # source://yarp//lib/prism/node_inspector.rb#9 + def initialize(prefix = T.unsafe(nil)); end + + # Appends a line to the output with the current prefix. + # + # source://yarp//lib/prism/node_inspector.rb#15 + def <<(line); end + + # Returns a new inspector that can be used to inspect a child node. + # + # source://yarp//lib/prism/node_inspector.rb#59 + def child_inspector(append); end + + # Generates a string that represents a child node. + # + # source://yarp//lib/prism/node_inspector.rb#54 + def child_node(node, append); end + + # This generates a string that is used as the header of the inspect output + # for any given node. + # + # source://yarp//lib/prism/node_inspector.rb#21 + def header(node); end + + # Generates a string that represents a list of nodes. It handles properly + # using the box drawing characters to make the output look nice. + # + # source://yarp//lib/prism/node_inspector.rb#31 + def list(prefix, nodes); end + + # Generates a string that represents a location field on a node. + # + # source://yarp//lib/prism/node_inspector.rb#45 + def location(value); end + + # Returns the value of attribute output. + # + # source://yarp//lib/prism/node_inspector.rb#7 + def output; end + + # Returns the value of attribute prefix. + # + # source://yarp//lib/prism/node_inspector.rb#7 + def prefix; end + + # Returns the output as a string. + # + # source://yarp//lib/prism/node_inspector.rb#64 + def to_str; end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://yarp//lib/prism/node.rb#10472 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # def initialize: (number: Integer, location: Location) -> void + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://yarp//lib/prism/node.rb#10477 + def initialize(number, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10483 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10488 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10498 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10493 + def compact_child_nodes; end + + # def copy: (**params) -> NumberedReferenceReadNode + # + # source://yarp//lib/prism/node.rb#10503 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10488 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10514 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10518 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader number: Integer + # + # source://yarp//lib/prism/node.rb#10474 + 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://yarp//lib/prism/node.rb#10538 + def type; end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#10548 +class Prism::OptionalParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://yarp//lib/prism/node.rb#10562 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10571 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10576 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10586 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10581 + def compact_child_nodes; end + + # def copy: (**params) -> OptionalParameterNode + # + # source://yarp//lib/prism/node.rb#10591 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10576 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10605 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10614 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#10550 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#10553 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#10610 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10556 + 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://yarp//lib/prism/node.rb#10638 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#10559 + def value; end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#10647 +class Prism::OrNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [OrNode] a new instance of OrNode + # + # source://yarp//lib/prism/node.rb#10658 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10666 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10671 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10681 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10676 + def compact_child_nodes; end + + # def copy: (**params) -> OrNode + # + # source://yarp//lib/prism/node.rb#10686 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10671 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10699 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10708 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#10649 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#10704 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10655 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#10652 + 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://yarp//lib/prism/node.rb#10732 + def type; end +end + +# source://yarp//lib/prism/pack.rb#4 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#57 +class Prism::Pack::Directive + # @return [Directive] a new instance of Directive + # + # source://yarp//lib/prism/pack.rb#60 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # source://yarp//lib/prism/pack.rb#98 + def describe; end + + # Returns the value of attribute endian. + # + # source://yarp//lib/prism/pack.rb#58 + def endian; end + + # Returns the value of attribute length. + # + # source://yarp//lib/prism/pack.rb#58 + def length; end + + # Returns the value of attribute length_type. + # + # source://yarp//lib/prism/pack.rb#58 + def length_type; end + + # Returns the value of attribute signed. + # + # source://yarp//lib/prism/pack.rb#58 + def signed; end + + # Returns the value of attribute size. + # + # source://yarp//lib/prism/pack.rb#58 + def size; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/pack.rb#58 + def source; end + + # Returns the value of attribute type. + # + # source://yarp//lib/prism/pack.rb#58 + def type; end + + # Returns the value of attribute variant. + # + # source://yarp//lib/prism/pack.rb#58 + def variant; end + + # Returns the value of attribute version. + # + # source://yarp//lib/prism/pack.rb#58 + def version; end +end + +# source://yarp//lib/prism/pack.rb#72 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://yarp//lib/prism/pack.rb#80 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://yarp//lib/prism/pack.rb#86 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#162 +class Prism::Pack::Format + # @return [Format] a new instance of Format + # + # source://yarp//lib/prism/pack.rb#165 + def initialize(directives, encoding); end + + # source://yarp//lib/prism/pack.rb#170 + def describe; end + + # Returns the value of attribute directives. + # + # source://yarp//lib/prism/pack.rb#163 + def directives; end + + # Returns the value of attribute encoding. + # + # source://yarp//lib/prism/pack.rb#163 + def encoding; end +end + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +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://yarp//lib/prism/node.rb#10742 +class Prism::ParametersNode < ::Prism::Node + # def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://yarp//lib/prism/node.rb#10765 + def initialize(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10777 + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://yarp//lib/prism/node.rb#10762 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10782 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10800 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10787 + def compact_child_nodes; end + + # def copy: (**params) -> ParametersNode + # + # source://yarp//lib/prism/node.rb#10805 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10782 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10822 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10826 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader keyword_rest: Node? + # + # source://yarp//lib/prism/node.rb#10759 + def keyword_rest; end + + # attr_reader keywords: Array[Node] + # + # source://yarp//lib/prism/node.rb#10756 + def keywords; end + + # attr_reader optionals: Array[Node] + # + # source://yarp//lib/prism/node.rb#10747 + def optionals; end + + # attr_reader posts: Array[Node] + # + # source://yarp//lib/prism/node.rb#10753 + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/prism/node.rb#10744 + def requireds; end + + # attr_reader rest: RestParameterNode? + # + # source://yarp//lib/prism/node.rb#10750 + 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://yarp//lib/prism/node.rb#10867 + def type; end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#10876 +class Prism::ParenthesesNode < ::Prism::Node + # def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://yarp//lib/prism/node.rb#10887 + def initialize(body, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10895 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#10878 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10904 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#10944 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#10884 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10916 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10909 + def compact_child_nodes; end + + # def copy: (**params) -> ParenthesesNode + # + # source://yarp//lib/prism/node.rb#10921 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10904 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10934 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10948 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#10939 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#10881 + def opening_loc; end + + # source://yarp//lib/prism/node.rb#10899 + 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://yarp//lib/prism/node.rb#10975 + def type; end +end + +# This represents an error that was encountered during parsing. +# +# source://yarp//lib/prism/parse_result.rb#170 +class Prism::ParseError + # @return [ParseError] a new instance of ParseError + # + # source://yarp//lib/prism/parse_result.rb#173 + def initialize(message, location); end + + # source://yarp//lib/prism/parse_result.rb#178 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/parse_result.rb#182 + def inspect; end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result.rb#171 + def location; end + + # Returns the value of attribute message. + # + # source://yarp//lib/prism/parse_result.rb#171 + 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://yarp//lib/prism/parse_result.rb#208 +class Prism::ParseResult + # @return [ParseResult] a new instance of ParseResult + # + # source://yarp//lib/prism/parse_result.rb#211 + def initialize(value, comments, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://yarp//lib/prism/parse_result/comments.rb#168 + def attach_comments!; end + + # Returns the value of attribute comments. + # + # source://yarp//lib/prism/parse_result.rb#209 + def comments; end + + # source://yarp//lib/prism/parse_result.rb#219 + def deconstruct_keys(keys); end + + # Returns the value of attribute errors. + # + # source://yarp//lib/prism/parse_result.rb#209 + def errors; end + + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result.rb#227 + def failure?; end + + # Walk the tree and mark nodes that are on a new line. + # + # source://yarp//lib/prism/parse_result/newlines.rb#56 + def mark_newlines!; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/parse_result.rb#209 + def source; end + + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result.rb#223 + def success?; end + + # Returns the value of attribute value. + # + # source://yarp//lib/prism/parse_result.rb#209 + def value; end + + # Returns the value of attribute warnings. + # + # source://yarp//lib/prism/parse_result.rb#209 + 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://yarp//lib/prism/parse_result/comments.rb#19 +class Prism::ParseResult::Comments + # @return [Comments] a new instance of Comments + # + # source://yarp//lib/prism/parse_result/comments.rb#75 + def initialize(parse_result); end + + # source://yarp//lib/prism/parse_result/comments.rb#79 + def attach!; end + + # Returns the value of attribute parse_result. + # + # source://yarp//lib/prism/parse_result/comments.rb#73 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://yarp//lib/prism/parse_result/comments.rb#98 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://yarp//lib/prism/parse_result/comments.rb#49 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://yarp//lib/prism/parse_result/comments.rb#52 + def initialize(location); end + + # source://yarp//lib/prism/parse_result/comments.rb#68 + def <<(comment); end + + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result/comments.rb#64 + def encloses?(comment); end + + # source://yarp//lib/prism/parse_result/comments.rb#60 + def end_offset; end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result/comments.rb#50 + def location; end + + # source://yarp//lib/prism/parse_result/comments.rb#56 + def start_offset; end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://yarp//lib/prism/parse_result/comments.rb#22 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://yarp//lib/prism/parse_result/comments.rb#25 + def initialize(node); end + + # source://yarp//lib/prism/parse_result/comments.rb#42 + def <<(comment); end + + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result/comments.rb#37 + def encloses?(comment); end + + # source://yarp//lib/prism/parse_result/comments.rb#33 + def end_offset; end + + # Returns the value of attribute node. + # + # source://yarp//lib/prism/parse_result/comments.rb#23 + def node; end + + # source://yarp//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://yarp//lib/prism/parse_result/newlines.rb#20 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # @return [Newlines] a new instance of Newlines + # + # source://yarp//lib/prism/parse_result/newlines.rb#21 + def initialize(newline_marked); end + + # source://yarp//lib/prism/parse_result/newlines.rb#25 + def visit_block_node(node); end + + # source://yarp//lib/prism/parse_result/newlines.rb#38 + def visit_if_node(node); end + + # source://yarp//lib/prism/parse_result/newlines.rb#25 + def visit_lambda_node(node); end + + # source://yarp//lib/prism/parse_result/newlines.rb#45 + def visit_statements_node(node); end + + # source://yarp//lib/prism/parse_result/newlines.rb#38 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://yarp//lib/prism/parse_result.rb#188 +class Prism::ParseWarning + # @return [ParseWarning] a new instance of ParseWarning + # + # source://yarp//lib/prism/parse_result.rb#191 + def initialize(message, location); end + + # source://yarp//lib/prism/parse_result.rb#196 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/parse_result.rb#200 + def inspect; end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result.rb#189 + def location; end + + # Returns the value of attribute message. + # + # source://yarp//lib/prism/parse_result.rb#189 + 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://yarp//lib/prism/pattern.rb#37 +class Prism::Pattern + # @return [Pattern] a new instance of Pattern + # + # source://yarp//lib/prism/pattern.rb#58 + def initialize(query); end + + # source://yarp//lib/prism/pattern.rb#63 + def compile; end + + # Returns the value of attribute query. + # + # source://yarp//lib/prism/pattern.rb#56 + def query; end + + # source://yarp//lib/prism/pattern.rb#68 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://yarp//lib/prism/pattern.rb#84 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://yarp//lib/prism/pattern.rb#90 + def combine_or(left, right); end + + # in foo | bar + # + # source://yarp//lib/prism/pattern.rb#125 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://yarp//lib/prism/pattern.rb#100 + def compile_array_pattern_node(node); end + + # in Prism::ConstantReadNode + # + # source://yarp//lib/prism/pattern.rb#130 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://yarp//lib/prism/pattern.rb#142 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://yarp//lib/prism/pattern.rb#95 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://yarp//lib/prism/pattern.rb#160 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://yarp//lib/prism/pattern.rb#185 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://yarp//lib/prism/pattern.rb#214 + def compile_node(node); end + + # in /foo/ + # + # source://yarp//lib/prism/pattern.rb#190 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://yarp//lib/prism/pattern.rb#198 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://yarp//lib/prism/pattern.rb#206 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://yarp//lib/prism/pattern.rb#40 +class Prism::Pattern::CompilationError < ::StandardError + # @return [CompilationError] a new instance of CompilationError + # + # source://yarp//lib/prism/pattern.rb#41 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a +# pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#10985 +class Prism::PinnedExpressionNode < ::Prism::Node + # def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://yarp//lib/prism/node.rb#10999 + def initialize(expression, operator_loc, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11008 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11013 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11023 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11018 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedExpressionNode + # + # source://yarp//lib/prism/node.rb#11028 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11013 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11042 + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://yarp//lib/prism/node.rb#10987 + def expression; end + + # source://yarp//lib/prism/node.rb#11061 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String + # + # source://yarp//lib/prism/node.rb#11052 + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://yarp//lib/prism/node.rb#10993 + def lparen_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#11047 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10990 + def operator_loc; end + + # def rparen: () -> String + # + # source://yarp//lib/prism/node.rb#11057 + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://yarp//lib/prism/node.rb#10996 + 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://yarp//lib/prism/node.rb#11085 + def type; end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern +# matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://yarp//lib/prism/node.rb#11095 +class Prism::PinnedVariableNode < ::Prism::Node + # def initialize: (variable: Node, operator_loc: Location, location: Location) -> void + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://yarp//lib/prism/node.rb#11103 + def initialize(variable, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11110 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11115 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11125 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11120 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedVariableNode + # + # source://yarp//lib/prism/node.rb#11130 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11115 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11142 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11151 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#11147 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#11100 + 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://yarp//lib/prism/node.rb#11173 + def type; end + + # attr_reader variable: Node + # + # source://yarp//lib/prism/node.rb#11097 + def variable; end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#11182 +class Prism::PostExecutionNode < ::Prism::Node + # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://yarp//lib/prism/node.rb#11196 + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11205 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11210 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#11256 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#11193 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11222 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11215 + def compact_child_nodes; end + + # def copy: (**params) -> PostExecutionNode + # + # source://yarp//lib/prism/node.rb#11227 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11210 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11241 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11260 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#11246 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#11187 + def keyword_loc; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#11251 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#11190 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#11184 + 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://yarp//lib/prism/node.rb#11288 + def type; end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#11297 +class Prism::PreExecutionNode < ::Prism::Node + # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://yarp//lib/prism/node.rb#11311 + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11320 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11325 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#11371 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#11308 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11337 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11330 + def compact_child_nodes; end + + # def copy: (**params) -> PreExecutionNode + # + # source://yarp//lib/prism/node.rb#11342 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11325 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11356 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11375 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#11361 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#11302 + def keyword_loc; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#11366 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#11305 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#11299 + 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://yarp//lib/prism/node.rb#11403 + def type; end +end + +# The top level node of any parse tree. +# +# source://yarp//lib/prism/node.rb#11409 +class Prism::ProgramNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://yarp//lib/prism/node.rb#11417 + def initialize(locals, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11424 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11429 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11439 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11434 + def compact_child_nodes; end + + # def copy: (**params) -> ProgramNode + # + # source://yarp//lib/prism/node.rb#11444 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11429 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11456 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11460 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#11411 + def locals; end + + # attr_reader statements: StatementsNode + # + # source://yarp//lib/prism/node.rb#11414 + 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://yarp//lib/prism/node.rb#11482 + def type; end +end + +# source://yarp//lib/prism/node.rb#14505 +module Prism::RangeFlags; end + +# ... operator +# +# source://yarp//lib/prism/node.rb#14507 +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://yarp//lib/prism/node.rb#11494 +class Prism::RangeNode < ::Prism::Node + # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void + # + # @return [RangeNode] a new instance of RangeNode + # + # source://yarp//lib/prism/node.rb#11508 + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11517 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11522 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11535 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11527 + def compact_child_nodes; end + + # def copy: (**params) -> RangeNode + # + # source://yarp//lib/prism/node.rb#11540 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11522 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11554 + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11564 + def exclude_end?; end + + # source://yarp//lib/prism/node.rb#11568 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://yarp//lib/prism/node.rb#11496 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#11559 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#11502 + def operator_loc; end + + # attr_reader right: Node? + # + # source://yarp//lib/prism/node.rb#11499 + 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://yarp//lib/prism/node.rb#11602 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#11505 + def flags; end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://yarp//lib/prism/node.rb#11611 +class Prism::RationalNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void + # + # @return [RationalNode] a new instance of RationalNode + # + # source://yarp//lib/prism/node.rb#11616 + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11622 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11627 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11637 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11632 + def compact_child_nodes; end + + # def copy: (**params) -> RationalNode + # + # source://yarp//lib/prism/node.rb#11642 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11627 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11653 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11657 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://yarp//lib/prism/node.rb#11613 + 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://yarp//lib/prism/node.rb#11678 + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://yarp//lib/prism/node_ext.rb#40 + def value; end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://yarp//lib/prism/node.rb#11687 +class Prism::RedoNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [RedoNode] a new instance of RedoNode + # + # source://yarp//lib/prism/node.rb#11689 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11694 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11699 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11709 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11704 + def compact_child_nodes; end + + # def copy: (**params) -> RedoNode + # + # source://yarp//lib/prism/node.rb#11714 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11699 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11724 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11728 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11747 + def type; end +end + +# source://yarp//lib/prism/node.rb#14510 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://yarp//lib/prism/node.rb#14524 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://yarp//lib/prism/node.rb#14521 +Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) + +# x - ignores whitespace and allows comments in regular expressions +# +# source://yarp//lib/prism/node.rb#14515 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://yarp//lib/prism/node.rb#14512 +Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) + +# m - allows $ to match the end of lines within strings +# +# source://yarp//lib/prism/node.rb#14518 +Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) + +# o - only interpolates values into the regular expression once +# +# source://yarp//lib/prism/node.rb#14533 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://yarp//lib/prism/node.rb#14530 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://yarp//lib/prism/node.rb#14527 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#11756 +class Prism::RegularExpressionNode < ::Prism::Node + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://yarp//lib/prism/node.rb#11773 + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11783 + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11858 + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11788 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#11833 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#11764 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11798 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11793 + def compact_child_nodes; end + + # def content: () -> String + # + # source://yarp//lib/prism/node.rb#11828 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/prism/node.rb#11761 + def content_loc; end + + # def copy: (**params) -> RegularExpressionNode + # + # source://yarp//lib/prism/node.rb#11803 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11788 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11818 + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11853 + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11843 + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11838 + def ignore_case?; end + + # source://yarp//lib/prism/node.rb#11877 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11848 + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11873 + def once?; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#11823 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#11758 + def opening_loc; end + + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://yarp//lib/prism/node_ext.rb#48 + def options; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11902 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#11767 + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11868 + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11863 + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#11770 + def flags; end +end + +# Represents a destructured required parameter node. +# +# def foo((bar, baz)) +# ^^^^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#11912 +class Prism::RequiredDestructuredParameterNode < ::Prism::Node + # def initialize: (parameters: Array[Node], opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [RequiredDestructuredParameterNode] a new instance of RequiredDestructuredParameterNode + # + # source://yarp//lib/prism/node.rb#11923 + def initialize(parameters, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11931 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11936 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#11974 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#11920 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11946 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11941 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredDestructuredParameterNode + # + # source://yarp//lib/prism/node.rb#11951 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11936 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11964 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11978 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#11969 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#11917 + def opening_loc; end + + # attr_reader parameters: Array[Node] + # + # source://yarp//lib/prism/node.rb#11914 + 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://yarp//lib/prism/node.rb#12000 + def type; end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://yarp//lib/prism/node.rb#12010 +class Prism::RequiredParameterNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://yarp//lib/prism/node.rb#12015 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12021 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12026 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12036 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12031 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredParameterNode + # + # source://yarp//lib/prism/node.rb#12041 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12026 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12052 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12056 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#12012 + 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://yarp//lib/prism/node.rb#12076 + def type; end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12085 +class Prism::RescueModifierNode < ::Prism::Node + # def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://yarp//lib/prism/node.rb#12096 + def initialize(expression, keyword_loc, rescue_expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12104 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12113 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12123 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12118 + def compact_child_nodes; end + + # def copy: (**params) -> RescueModifierNode + # + # source://yarp//lib/prism/node.rb#12128 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12113 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12141 + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://yarp//lib/prism/node.rb#12087 + def expression; end + + # source://yarp//lib/prism/node.rb#12150 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12146 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12090 + def keyword_loc; end + + # attr_reader rescue_expression: Node + # + # source://yarp//lib/prism/node.rb#12093 + def rescue_expression; end + + # source://yarp//lib/prism/node.rb#12108 + 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://yarp//lib/prism/node.rb#12174 + def type; end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# ^^^^^^ +# foo +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. +# `ex` is in the `exception` field. +# +# source://yarp//lib/prism/node.rb#12189 +class Prism::RescueNode < ::Prism::Node + # def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void + # + # @return [RescueNode] a new instance of RescueNode + # + # source://yarp//lib/prism/node.rb#12209 + def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12220 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12225 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12240 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12230 + def compact_child_nodes; end + + # attr_reader consequent: RescueNode? + # + # source://yarp//lib/prism/node.rb#12206 + def consequent; end + + # def copy: (**params) -> RescueNode + # + # source://yarp//lib/prism/node.rb#12245 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12225 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12261 + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Node] + # + # source://yarp//lib/prism/node.rb#12194 + def exceptions; end + + # source://yarp//lib/prism/node.rb#12275 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12266 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12191 + def keyword_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/prism/node.rb#12271 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#12197 + def operator_loc; end + + # attr_reader reference: Node? + # + # source://yarp//lib/prism/node.rb#12200 + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#12203 + 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://yarp//lib/prism/node.rb#12315 + def type; end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://yarp//lib/prism/node.rb#12325 +class Prism::RestParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://yarp//lib/prism/node.rb#12336 + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12344 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12349 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12359 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12354 + def compact_child_nodes; end + + # def copy: (**params) -> RestParameterNode + # + # source://yarp//lib/prism/node.rb#12364 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12349 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12377 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12386 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://yarp//lib/prism/node.rb#12327 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/prism/node.rb#12330 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#12382 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#12333 + 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://yarp//lib/prism/node.rb#12408 + def type; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#12417 +class Prism::RetryNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # source://yarp//lib/prism/node.rb#12419 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12424 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12429 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12439 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12434 + def compact_child_nodes; end + + # def copy: (**params) -> RetryNode + # + # source://yarp//lib/prism/node.rb#12444 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12429 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12454 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12458 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12477 + def type; end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12486 +class Prism::ReturnNode < ::Prism::Node + # def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://yarp//lib/prism/node.rb#12494 + def initialize(keyword_loc, arguments, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12501 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#12491 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12506 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12518 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12511 + def compact_child_nodes; end + + # def copy: (**params) -> ReturnNode + # + # source://yarp//lib/prism/node.rb#12523 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12506 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12535 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12544 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12540 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12488 + 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://yarp//lib/prism/node.rb#12570 + def type; end +end + +# 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. +# +# source://yarp//lib/prism/ripper_compat.rb#13 +class Prism::RipperCompat + # @return [RipperCompat] a new instance of RipperCompat + # + # source://yarp//lib/prism/ripper_compat.rb#59 + def initialize(source); end + + # Returns the value of attribute column. + # + # source://yarp//lib/prism/ripper_compat.rb#57 + def column; end + + # Public interface + # + # @return [Boolean] + # + # source://yarp//lib/prism/ripper_compat.rb#70 + def error?; end + + # Returns the value of attribute lineno. + # + # source://yarp//lib/prism/ripper_compat.rb#57 + def lineno; end + + # source://yarp//lib/prism/ripper_compat.rb#74 + def parse; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/ripper_compat.rb#57 + def source; end + + # Visitor methods + # + # source://yarp//lib/prism/ripper_compat.rb#82 + def visit(node); end + + # source://yarp//lib/prism/ripper_compat.rb#86 + def visit_call_node(node); end + + # source://yarp//lib/prism/ripper_compat.rb#100 + def visit_integer_node(node); end + + # source://yarp//lib/prism/ripper_compat.rb#125 + def visit_program_node(node); end + + # source://yarp//lib/prism/ripper_compat.rb#105 + def visit_statements_node(node); end + + # source://yarp//lib/prism/ripper_compat.rb#112 + def visit_token(node); end + + private + + # source://yarp//lib/prism/ripper_compat.rb#162 + def _dispatch0; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def _dispatch1(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def _dispatch2(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def _dispatch3(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def _dispatch4(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#167 + def _dispatch5(_, _, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#168 + 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://yarp//lib/prism/ripper_compat.rb#151 + def bounds(location); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_BEGIN(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_CHAR(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_END(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on___end__(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_alias(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_alias_error(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_aref(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_aref_field(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_arg_ambiguous(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_arg_paren(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_args_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_args_add_block(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_args_add_star(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_args_forward; end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_args_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_array(_); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_aryptn(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_assign(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_assign_error(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_assoc_new(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_assoc_splat(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_assoclist_from_args(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_backref(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_backtick(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_bare_assoc_hash(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_begin(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_binary(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_block_var(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_blockarg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_bodystmt(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_brace_block(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_break(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_call(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_case(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_class(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_class_name_error(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_comma(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_command(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_command_call(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_comment(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_const(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_const_path_field(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_const_path_ref(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_const_ref(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_cvar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_def(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_defined(_); end + + # source://yarp//lib/prism/ripper_compat.rb#167 + def on_defs(_, _, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_do_block(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_dot2(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_dot3(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_dyna_symbol(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_else(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_elsif(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embdoc(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embdoc_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embdoc_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embexpr_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embexpr_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embvar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ensure(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_excessed_comma; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_fcall(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_field(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_float(_); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_fndptn(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_for(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_gvar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_hash(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_heredoc_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_heredoc_dedent(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_heredoc_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_hshptn(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ident(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_if(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_if_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_ifop(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ignored_nl(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ignored_sp(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_imaginary(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_in(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_int(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ivar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_kw(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_kwrest_param(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_label(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_label_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_lambda(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_lbrace(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_lbracket(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_lparen(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_magic_comment(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_massign(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_method_add_arg(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_method_add_block(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mlhs_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mlhs_add_post(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mlhs_add_star(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_mlhs_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_mlhs_paren(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_module(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mrhs_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mrhs_add_star(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_mrhs_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_mrhs_new_from_args(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_next(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_nl(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_nokw_param(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_op(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_opassign(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_operator_ambiguous(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_param_error(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#168 + def on_params(_, _, _, _, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_paren(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_parse_error(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_period(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_program(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_qsymbols_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_qsymbols_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_qsymbols_new; end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_qwords_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_qwords_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_qwords_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rational(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rbrace(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rbracket(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_redo; end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_regexp_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_regexp_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_regexp_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_regexp_literal(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_regexp_new; end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_rescue(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_rescue_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rest_param(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_retry; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_return(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_return0; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rparen(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_sclass(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_semicolon(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_sp(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_stmts_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_stmts_new; end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_string_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_string_concat(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_string_content; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_string_dvar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_string_embexpr(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_string_literal(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_super(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_symbeg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_symbol(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_symbol_literal(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_symbols_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_symbols_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_symbols_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tlambda(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tlambeg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_top_const_field(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_top_const_ref(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tstring_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tstring_content(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tstring_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_unary(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_undef(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_unless(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_unless_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_until(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_until_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_var_alias(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_var_field(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_var_ref(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_vcall(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_void_stmt; end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_when(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_while(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_while_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_word_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_word_new; end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_words_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_words_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_words_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_words_sep(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_xstring_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_xstring_literal(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_xstring_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_yield(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_yield0; end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_zsuper; end + + # source://yarp//lib/prism/ripper_compat.rb#158 + def result; end + + class << self + # This is a convenience method that runs the SexpBuilderPP subclass parser. + # + # source://yarp//lib/prism/ripper_compat.rb#140 + def sexp(source); end + + # This is a convenience method that runs the SexpBuilder subclass parser. + # + # source://yarp//lib/prism/ripper_compat.rb#135 + def sexp_raw(source); end + end +end + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://yarp//lib/prism/ripper_compat.rb#16 +class Prism::RipperCompat::SexpBuilder < ::Prism::RipperCompat + private + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_BEGIN(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_CHAR(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_END(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on___end__(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_alias(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_alias_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_aref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_aref_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_arg_ambiguous(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_arg_paren(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_add_block(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_add_star(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_forward(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_array(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_aryptn(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assign(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assign_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assoc_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assoc_splat(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assoclist_from_args(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_backref(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_backtick(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_bare_assoc_hash(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_begin(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_binary(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_block_var(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_blockarg(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_bodystmt(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_brace_block(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_break(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_call(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_case(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_class(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_class_name_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_comma(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_command(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_command_call(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_comment(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_const(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_const_path_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_const_path_ref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_const_ref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_cvar(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_def(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_defined(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_defs(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_do_block(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_dot2(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_dot3(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_dyna_symbol(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_else(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_elsif(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embdoc(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embdoc_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embdoc_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embexpr_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embexpr_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embvar(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_ensure(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_excessed_comma(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_fcall(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_float(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_fndptn(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_for(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_gvar(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_hash(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_heredoc_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_heredoc_dedent(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_heredoc_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_hshptn(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_ident(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_if(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_if_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_ifop(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_ignored_nl(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_ignored_sp(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_imaginary(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_in(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_int(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_ivar(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_kw(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_kwrest_param(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_label(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_label_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_lambda(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_lbrace(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_lbracket(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_lparen(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_magic_comment(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_massign(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_method_add_arg(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_method_add_block(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_add_post(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_add_star(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_paren(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_module(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mrhs_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mrhs_add_star(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mrhs_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mrhs_new_from_args(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_next(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_nl(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_nokw_param(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_op(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_opassign(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_operator_ambiguous(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_param_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_params(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_paren(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_parse_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_period(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_program(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_qsymbols_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_qsymbols_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_qsymbols_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_qwords_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_qwords_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_qwords_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_rational(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_rbrace(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_rbracket(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_redo(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_regexp_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_regexp_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_regexp_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_regexp_literal(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_regexp_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_rescue(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_rescue_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_rest_param(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_retry(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_return(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_return0(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_rparen(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_sclass(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_semicolon(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_sp(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_stmts_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_stmts_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_concat(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_content(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_dvar(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_embexpr(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_literal(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_super(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_symbeg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_symbol(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_symbol_literal(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_symbols_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_symbols_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_symbols_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tlambda(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tlambeg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_top_const_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_top_const_ref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tstring_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tstring_content(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tstring_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_unary(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_undef(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_unless(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_unless_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_until(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_until_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_var_alias(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_var_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_var_ref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_vcall(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_void_stmt(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_when(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_while(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_while_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_word_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_word_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_words_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_words_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_words_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_words_sep(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_xstring_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_xstring_literal(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_xstring_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_yield(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_yield0(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + 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://yarp//lib/prism/ripper_compat.rb#35 +class Prism::RipperCompat::SexpBuilderPP < ::Prism::RipperCompat::SexpBuilder + private + + # source://yarp//lib/prism/ripper_compat.rb#38 + def _dispatch_event_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def _dispatch_event_push(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_args_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_args_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_mlhs_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_mlhs_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_mrhs_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_mrhs_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_qsymbols_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_qsymbols_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_qwords_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_qwords_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_regexp_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_regexp_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_stmts_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_stmts_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_string_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_symbols_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_symbols_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_word_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_word_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_words_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_words_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_xstring_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_xstring_new; end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://yarp//lib/prism/node.rb#12579 +class Prism::SelfNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SelfNode] a new instance of SelfNode + # + # source://yarp//lib/prism/node.rb#12581 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12586 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12591 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12601 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12596 + def compact_child_nodes; end + + # def copy: (**params) -> SelfNode + # + # source://yarp//lib/prism/node.rb#12606 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12591 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12616 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12620 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12639 + def type; end +end + +# source://yarp//lib/prism/serialize.rb#22 +module Prism::Serialize + class << self + # source://yarp//lib/prism/serialize.rb#27 + def load(input, serialized); end + + # source://yarp//lib/prism/serialize.rb#37 + def load_tokens(source, serialized); end + end +end + +# source://yarp//lib/prism/serialize.rb#41 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://yarp//lib/prism/serialize.rb#45 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://yarp//lib/prism/serialize.rb#43 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://yarp//lib/prism/serialize.rb#43 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://yarp//lib/prism/serialize.rb#42 + def encoding; end + + # Returns the value of attribute input. + # + # source://yarp//lib/prism/serialize.rb#42 + def input; end + + # Returns the value of attribute io. + # + # source://yarp//lib/prism/serialize.rb#42 + def io; end + + # source://yarp//lib/prism/serialize.rb#59 + def load_encoding; end + + # source://yarp//lib/prism/serialize.rb#63 + def load_metadata; end + + # source://yarp//lib/prism/serialize.rb#96 + def load_nodes; end + + # source://yarp//lib/prism/serialize.rb#115 + def load_result; end + + # source://yarp//lib/prism/serialize.rb#70 + def load_tokens; end + + # source://yarp//lib/prism/serialize.rb#83 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://yarp//lib/prism/serialize.rb#42 + def serialized; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/serialize.rb#43 + def source; end + + private + + # source://yarp//lib/prism/serialize.rb#172 + def load_constant(index); end + + # source://yarp//lib/prism/serialize.rb#149 + def load_embedded_string; end + + # source://yarp//lib/prism/serialize.rb#164 + def load_location; end + + # source://yarp//lib/prism/serialize.rb#202 + def load_node; end + + # source://yarp//lib/prism/serialize.rb#197 + def load_optional_constant; end + + # source://yarp//lib/prism/serialize.rb#168 + def load_optional_location; end + + # source://yarp//lib/prism/serialize.rb#142 + def load_optional_node; end + + # source://yarp//lib/prism/serialize.rb#193 + def load_required_constant; end + + # source://yarp//lib/prism/serialize.rb#138 + def load_serialized_length; end + + # source://yarp//lib/prism/serialize.rb#153 + def load_string; end + + # variable-length integer using https://en.wikipedia.org/wiki/LEB128 + # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints + # + # source://yarp//lib/prism/serialize.rb#124 + def load_varint; end +end + +# source://yarp//lib/prism/serialize.rb#23 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# source://yarp//lib/prism/serialize.rb#24 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# source://yarp//lib/prism/serialize.rb#25 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# source://yarp//lib/prism/serialize.rb#494 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12648 +class Prism::SingletonClassNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://yarp//lib/prism/node.rb#12668 + def initialize(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12679 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#12662 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12684 + def child_nodes; end + + # def class_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12723 + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12653 + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12697 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12689 + def compact_child_nodes; end + + # def copy: (**params) -> SingletonClassNode + # + # source://yarp//lib/prism/node.rb#12702 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12684 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12718 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12733 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12665 + def end_keyword_loc; end + + # attr_reader expression: Node + # + # source://yarp//lib/prism/node.rb#12659 + def expression; end + + # source://yarp//lib/prism/node.rb#12737 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#12650 + def locals; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#12728 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#12656 + 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://yarp//lib/prism/node.rb#12768 + def type; end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://yarp//lib/prism/parse_result.rb#7 +class Prism::Source + # @return [Source] a new instance of Source + # + # source://yarp//lib/prism/parse_result.rb#10 + def initialize(source, offsets = T.unsafe(nil)); end + + # source://yarp//lib/prism/parse_result.rb#27 + def column(value); end + + # source://yarp//lib/prism/parse_result.rb#19 + def line(value); end + + # source://yarp//lib/prism/parse_result.rb#23 + def line_offset(value); end + + # Returns the value of attribute offsets. + # + # source://yarp//lib/prism/parse_result.rb#8 + def offsets; end + + # source://yarp//lib/prism/parse_result.rb#15 + def slice(offset, length); end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/parse_result.rb#8 + def source; end + + private + + # source://yarp//lib/prism/parse_result.rb#33 + def compute_offsets(code); end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12777 +class Prism::SourceEncodingNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://yarp//lib/prism/node.rb#12779 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12784 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12789 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12799 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12794 + def compact_child_nodes; end + + # def copy: (**params) -> SourceEncodingNode + # + # source://yarp//lib/prism/node.rb#12804 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12789 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12814 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12818 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12837 + def type; end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12846 +class Prism::SourceFileNode < ::Prism::Node + # def initialize: (filepath: String, location: Location) -> void + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://yarp//lib/prism/node.rb#12851 + def initialize(filepath, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12857 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12862 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12872 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12867 + def compact_child_nodes; end + + # def copy: (**params) -> SourceFileNode + # + # source://yarp//lib/prism/node.rb#12877 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12862 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12888 + def deconstruct_keys(keys); end + + # attr_reader filepath: String + # + # source://yarp//lib/prism/node.rb#12848 + def filepath; end + + # source://yarp//lib/prism/node.rb#12892 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12912 + def type; end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12921 +class Prism::SourceLineNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://yarp//lib/prism/node.rb#12923 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12928 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12933 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12943 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12938 + def compact_child_nodes; end + + # def copy: (**params) -> SourceLineNode + # + # source://yarp//lib/prism/node.rb#12948 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12933 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12958 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12962 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12981 + def type; end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://yarp//lib/prism/node.rb#12990 +class Prism::SplatNode < ::Prism::Node + # def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void + # + # @return [SplatNode] a new instance of SplatNode + # + # source://yarp//lib/prism/node.rb#12998 + def initialize(operator_loc, expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13005 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13010 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13022 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13015 + def compact_child_nodes; end + + # def copy: (**params) -> SplatNode + # + # source://yarp//lib/prism/node.rb#13027 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13010 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13039 + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://yarp//lib/prism/node.rb#12995 + def expression; end + + # source://yarp//lib/prism/node.rb#13048 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#13044 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#12992 + 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://yarp//lib/prism/node.rb#13074 + def type; end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13083 +class Prism::StatementsNode < ::Prism::Node + # def initialize: (body: Array[Node], location: Location) -> void + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://yarp//lib/prism/node.rb#13088 + def initialize(body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13094 + def accept(visitor); end + + # attr_reader body: Array[Node] + # + # source://yarp//lib/prism/node.rb#13085 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13099 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13109 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13104 + def compact_child_nodes; end + + # def copy: (**params) -> StatementsNode + # + # source://yarp//lib/prism/node.rb#13114 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13099 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13125 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13129 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13149 + def type; end +end + +# Represents the use of compile-time string concatenation. +# +# "foo" "bar" +# ^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13158 +class Prism::StringConcatNode < ::Prism::Node + # def initialize: (left: Node, right: Node, location: Location) -> void + # + # @return [StringConcatNode] a new instance of StringConcatNode + # + # source://yarp//lib/prism/node.rb#13166 + def initialize(left, right, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13173 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13178 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13188 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13183 + def compact_child_nodes; end + + # def copy: (**params) -> StringConcatNode + # + # source://yarp//lib/prism/node.rb#13193 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13178 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13205 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13209 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#13160 + def left; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#13163 + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13232 + def type; end +end + +# source://yarp//lib/prism/node.rb#14536 +module Prism::StringFlags; end + +# frozen by virtue of a frozen_string_literal comment +# +# source://yarp//lib/prism/node.rb#14538 +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://yarp//lib/prism/node.rb#13248 +class Prism::StringNode < ::Prism::Node + # def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void + # + # @return [StringNode] a new instance of StringNode + # + # source://yarp//lib/prism/node.rb#13265 + def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13275 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13280 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#13330 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#13259 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13290 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13285 + def compact_child_nodes; end + + # def content: () -> String + # + # source://yarp//lib/prism/node.rb#13325 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/prism/node.rb#13256 + def content_loc; end + + # def copy: (**params) -> StringNode + # + # source://yarp//lib/prism/node.rb#13295 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13280 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13310 + def deconstruct_keys(keys); end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#13315 + def frozen?; end + + # source://yarp//lib/prism/node.rb#13334 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#13320 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#13253 + 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://yarp//lib/prism/node.rb#13359 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#13262 + def unescaped; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#13250 + def flags; end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13371 +class Prism::SuperNode < ::Prism::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void + # + # @return [SuperNode] a new instance of SuperNode + # + # source://yarp//lib/prism/node.rb#13388 + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13398 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#13379 + def arguments; end + + # attr_reader block: Node? + # + # source://yarp//lib/prism/node.rb#13385 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13403 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13416 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13408 + def compact_child_nodes; end + + # def copy: (**params) -> SuperNode + # + # source://yarp//lib/prism/node.rb#13421 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13403 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13436 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13455 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#13441 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#13373 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#13446 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#13376 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#13451 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#13382 + 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://yarp//lib/prism/node.rb#13489 + def type; end +end + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://yarp//lib/prism/node.rb#13501 +class Prism::SymbolNode < ::Prism::Node + # def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://yarp//lib/prism/node.rb#13515 + def initialize(opening_loc, value_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13524 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13529 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#13573 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#13509 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13539 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13534 + def compact_child_nodes; end + + # def copy: (**params) -> SymbolNode + # + # source://yarp//lib/prism/node.rb#13544 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13529 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13558 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13577 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#13563 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#13503 + 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://yarp//lib/prism/node.rb#13600 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#13512 + def unescaped; end + + # def value: () -> String? + # + # source://yarp//lib/prism/node.rb#13568 + def value; end + + # attr_reader value_loc: Location? + # + # source://yarp//lib/prism/node.rb#13506 + def value_loc; end +end + +# This represents a token from the Ruby source. +# +# source://yarp//lib/prism/parse_result.rb#233 +class Prism::Token + # @return [Token] a new instance of Token + # + # source://yarp//lib/prism/parse_result.rb#236 + def initialize(type, value, location); end + + # source://yarp//lib/prism/parse_result.rb#260 + def ==(other); end + + # source://yarp//lib/prism/parse_result.rb#242 + def deconstruct_keys(keys); end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result.rb#234 + def location; end + + # source://yarp//lib/prism/parse_result.rb#246 + def pretty_print(q); end + + # Returns the value of attribute type. + # + # source://yarp//lib/prism/parse_result.rb#234 + def type; end + + # Returns the value of attribute value. + # + # source://yarp//lib/prism/parse_result.rb#234 + def value; end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://yarp//lib/prism/node.rb#13609 +class Prism::TrueNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # source://yarp//lib/prism/node.rb#13611 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13616 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13621 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13631 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13626 + def compact_child_nodes; end + + # def copy: (**params) -> TrueNode + # + # source://yarp//lib/prism/node.rb#13636 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13621 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13646 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13650 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13669 + def type; end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13678 +class Prism::UndefNode < ::Prism::Node + # def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void + # + # @return [UndefNode] a new instance of UndefNode + # + # source://yarp//lib/prism/node.rb#13686 + def initialize(names, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13693 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13698 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13708 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13703 + def compact_child_nodes; end + + # def copy: (**params) -> UndefNode + # + # source://yarp//lib/prism/node.rb#13713 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13698 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13725 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13734 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#13730 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#13683 + def keyword_loc; end + + # attr_reader names: Array[Node] + # + # source://yarp//lib/prism/node.rb#13680 + 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://yarp//lib/prism/node.rb#13755 + def type; 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://yarp//lib/prism/node.rb#13767 +class Prism::UnlessNode < ::Prism::Node + # def initialize: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://yarp//lib/prism/node.rb#13784 + def initialize(keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13794 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13803 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13817 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13808 + def compact_child_nodes; end + + # attr_reader consequent: ElseNode? + # + # source://yarp//lib/prism/node.rb#13778 + def consequent; end + + # def copy: (**params) -> UnlessNode + # + # source://yarp//lib/prism/node.rb#13822 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13803 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13837 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#13847 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#13781 + def end_keyword_loc; end + + # source://yarp//lib/prism/node.rb#13851 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#13842 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#13769 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/prism/node.rb#13772 + def predicate; end + + # source://yarp//lib/prism/node.rb#13798 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#13775 + 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://yarp//lib/prism/node.rb#13886 + def type; 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://yarp//lib/prism/node.rb#13898 +class Prism::UntilNode < ::Prism::Node + # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void + # + # @return [UntilNode] a new instance of UntilNode + # + # source://yarp//lib/prism/node.rb#13915 + def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13925 + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#13982 + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13934 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#13977 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#13903 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13947 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13939 + def compact_child_nodes; end + + # def copy: (**params) -> UntilNode + # + # source://yarp//lib/prism/node.rb#13952 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13934 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13967 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13986 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#13972 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#13900 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/prism/node.rb#13906 + def predicate; end + + # source://yarp//lib/prism/node.rb#13929 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#13909 + 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://yarp//lib/prism/node.rb#14017 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#13912 + def flags; 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://yarp//lib/prism/visitor.rb#46 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_call_or_write_node(node); end + + # Visit a CapturePatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_capture_pattern_node(node); end + + # Visit a CaseNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_implicit_node(node); end + + # Visit a InNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_in_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_keyword_hash_node(node); end + + # Visit a KeywordParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_keyword_parameter_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_regular_expression_node(node); end + + # Visit a RequiredDestructuredParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_required_destructured_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_self_node(node); end + + # Visit a SingletonClassNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_statements_node(node); end + + # Visit a StringConcatNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_string_concat_node(node); end + + # Visit a StringNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#14028 +class Prism::WhenNode < ::Prism::Node + # def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void + # + # @return [WhenNode] a new instance of WhenNode + # + # source://yarp//lib/prism/node.rb#14039 + def initialize(keyword_loc, conditions, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#14047 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14052 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#14065 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#14057 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://yarp//lib/prism/node.rb#14033 + def conditions; end + + # def copy: (**params) -> WhenNode + # + # source://yarp//lib/prism/node.rb#14070 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14052 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#14083 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#14092 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#14088 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#14030 + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#14036 + 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://yarp//lib/prism/node.rb#14119 + def type; 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://yarp//lib/prism/node.rb#14131 +class Prism::WhileNode < ::Prism::Node + # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void + # + # @return [WhileNode] a new instance of WhileNode + # + # source://yarp//lib/prism/node.rb#14148 + def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#14158 + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#14215 + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14167 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#14210 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#14136 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#14180 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#14172 + def compact_child_nodes; end + + # def copy: (**params) -> WhileNode + # + # source://yarp//lib/prism/node.rb#14185 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14167 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#14200 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#14219 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#14205 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#14133 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/prism/node.rb#14139 + def predicate; end + + # source://yarp//lib/prism/node.rb#14162 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#14142 + 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://yarp//lib/prism/node.rb#14250 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#14145 + def flags; end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#14259 +class Prism::XStringNode < ::Prism::Node + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void + # + # @return [XStringNode] a new instance of XStringNode + # + # source://yarp//lib/prism/node.rb#14273 + def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#14282 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14287 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#14331 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#14267 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#14297 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#14292 + def compact_child_nodes; end + + # def content: () -> String + # + # source://yarp//lib/prism/node.rb#14326 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/prism/node.rb#14264 + def content_loc; end + + # def copy: (**params) -> XStringNode + # + # source://yarp//lib/prism/node.rb#14302 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14287 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#14316 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#14335 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#14321 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#14261 + 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://yarp//lib/prism/node.rb#14358 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#14270 + def unescaped; end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://yarp//lib/prism/node.rb#14367 +class Prism::YieldNode < ::Prism::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void + # + # @return [YieldNode] a new instance of YieldNode + # + # source://yarp//lib/prism/node.rb#14381 + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#14390 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#14375 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14395 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#14407 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#14400 + def compact_child_nodes; end + + # def copy: (**params) -> YieldNode + # + # source://yarp//lib/prism/node.rb#14412 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14395 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#14426 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#14445 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#14431 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#14369 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#14436 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#14372 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#14441 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#14378 + 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://yarp//lib/prism/node.rb#14473 + def type; end +end + +# source://yarp//lib/yarp.rb#4 +YARP = Prism diff --git a/sorbet/rbi/shims/yarp.rbi b/sorbet/rbi/shims/prism.rbi similarity index 99% rename from sorbet/rbi/shims/yarp.rbi rename to sorbet/rbi/shims/prism.rbi index 505cd85fb..087ca0813 100644 --- a/sorbet/rbi/shims/yarp.rbi +++ b/sorbet/rbi/shims/prism.rbi @@ -6,7 +6,7 @@ modified manually. See templates/rbi/yarp.rbi.erb if you are looking to modify the template =end -module YARP +module Prism class Node sig { returns(T::Array[T.nilable(Node)]) } def child_nodes; end diff --git a/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb index 76a684cd8..62f06fa19 100644 --- a/sorbet/tapioca/require.rb +++ b/sorbet/tapioca/require.rb @@ -4,9 +4,8 @@ # Add your extra requires here (`bin/tapioca require` can be used to bootstrap this list) require "language_server-protocol" -require "yarp" +require "prism" require "mocha/minitest" require "rubocop/minitest/assert_offense" -require "yarp" require "syntax_tree/cli" require "spoom/backtrace_filter/minitest" diff --git a/test/document_test.rb b/test/document_test.rb index 3724e1ebd..7788cda10 100644 --- a/test/document_test.rb +++ b/test/document_test.rb @@ -428,33 +428,33 @@ class Post < ActiveRecord::Base # Locate the `ActiveRecord` module found, parent = document.locate_node({ line: 0, character: 19 }) - assert_instance_of(YARP::ConstantReadNode, found) - assert_equal("ActiveRecord", T.cast(found, YARP::ConstantReadNode).location.slice) + assert_instance_of(Prism::ConstantReadNode, found) + assert_equal("ActiveRecord", T.cast(found, Prism::ConstantReadNode).location.slice) - assert_instance_of(YARP::ConstantPathNode, parent) - assert_equal("ActiveRecord", T.must(T.cast(parent, YARP::ConstantPathNode).child_nodes.first).location.slice) + assert_instance_of(Prism::ConstantPathNode, parent) + assert_equal("ActiveRecord", T.must(T.cast(parent, Prism::ConstantPathNode).child_nodes.first).location.slice) # Locate the `Base` class found, parent = T.cast( document.locate_node({ line: 0, character: 27 }), - [YARP::ConstantReadNode, YARP::ConstantPathNode, T::Array[String]], + [Prism::ConstantReadNode, Prism::ConstantPathNode, T::Array[String]], ) - assert_instance_of(YARP::ConstantReadNode, found) + assert_instance_of(Prism::ConstantReadNode, found) assert_equal("Base", found.location.slice) - assert_instance_of(YARP::ConstantPathNode, parent) + assert_instance_of(Prism::ConstantPathNode, parent) assert_equal("Base", T.must(parent.child_nodes[1]).location.slice) assert_equal("ActiveRecord", T.must(parent.child_nodes[0]).location.slice) # Locate the `where` invocation found, parent = T.cast( document.locate_node({ line: 3, character: 4 }), - [YARP::CallNode, YARP::StatementsNode, T::Array[String]], + [Prism::CallNode, Prism::StatementsNode, T::Array[String]], ) - assert_instance_of(YARP::CallNode, found) + assert_instance_of(Prism::CallNode, found) assert_equal("where", T.must(found.message_loc).slice) - assert_instance_of(YARP::StatementsNode, parent) + assert_instance_of(Prism::StatementsNode, parent) end def test_locate_returns_nesting @@ -475,11 +475,11 @@ def baz RUBY found, _parent, nesting = document.locate_node({ line: 9, character: 6 }) - assert_equal("Qux", T.cast(found, YARP::ConstantReadNode).location.slice) + assert_equal("Qux", T.cast(found, Prism::ConstantReadNode).location.slice) assert_equal(["Foo", "Bar"], nesting) found, _parent, nesting = document.locate_node({ line: 3, character: 6 }) - assert_equal("Hello", T.cast(found, YARP::ConstantReadNode).location.slice) + assert_equal("Hello", T.cast(found, Prism::ConstantReadNode).location.slice) assert_equal(["Foo", "Other"], nesting) end @@ -494,8 +494,8 @@ def baz end RUBY - found, _parent, nesting = document.locate_node({ line: 3, character: 6 }, node_types: [YARP::ConstantReadNode]) - assert_equal("Qux", T.cast(found, YARP::ConstantReadNode).location.slice) + found, _parent, nesting = document.locate_node({ line: 3, character: 6 }, node_types: [Prism::ConstantReadNode]) + assert_equal("Qux", T.cast(found, Prism::ConstantReadNode).location.slice) assert_equal(["Foo", "Bar"], nesting) end @@ -507,11 +507,11 @@ def test_reparsing_without_new_edits_does_nothing ) # When there's a new edit, we parse it the first `parse` invocation - YARP.expects(:parse).with(document.source).once + Prism.expects(:parse).with(document.source).once document.parse # If there are no new edits, we don't do anything - YARP.expects(:parse).never + Prism.expects(:parse).never document.parse document.push_edits( @@ -520,7 +520,7 @@ def test_reparsing_without_new_edits_does_nothing ) # If there's another edit, we parse it once again - YARP.expects(:parse).with(document.source).once + Prism.expects(:parse).with(document.source).once document.parse end diff --git a/test/expectations/expectations_test_runner.rb b/test/expectations/expectations_test_runner.rb index d43bd4a70..ccf6565c2 100644 --- a/test/expectations/expectations_test_runner.rb +++ b/test/expectations/expectations_test_runner.rb @@ -5,7 +5,7 @@ class ExpectationsTestRunner < Minitest::Test TEST_EXP_DIR = "test/expectations" TEST_FIXTURES_DIR = "test/fixtures" TEST_RUBY_LSP_FIXTURES = File.join(TEST_FIXTURES_DIR, "*.rb") - TEST_YARP_FIXTURES = File.join(TEST_FIXTURES_DIR, "yarp/test/prism/fixtures/**", "*.txt") + TEST_PRISM_FIXTURES = File.join(TEST_FIXTURES_DIR, "prism/test/prism/fixtures/**", "*.txt") class << self def expectations_tests(handler_class, expectation_suffix) @@ -93,7 +93,7 @@ def test_#{expectation_suffix}__#{test_name}__does_not_raise end end - Dir.glob(TEST_YARP_FIXTURES).each do |path| + Dir.glob(TEST_PRISM_FIXTURES).each do |path| class_eval(<<~RB, __FILE__, __LINE__ + 1) def test_#{expectation_suffix}__#{uniq_name_from_path(path)}__does_not_raise @_path = "#{path}" @@ -107,8 +107,8 @@ def test_#{expectation_suffix}__#{uniq_name_from_path(path)}__does_not_raise end # Ensure that the test name include path context to avoid duplicate - # from test/fixtures/yarp/test/prism/fixtures/unparser/corpus/semantic/and.txt - # to test_fixtures_yarp_test_prism_fixtures_unparser_corpus_semantic_and + # from test/fixtures/prism/test/prism/fixtures/unparser/corpus/semantic/and.txt + # to test_fixtures_prism_test_prism_fixtures_unparser_corpus_semantic_and def uniq_name_from_path(path) path.gsub("/", "_").gsub('.txt', '') end diff --git a/test/fixtures/prism b/test/fixtures/prism new file mode 160000 index 000000000..afbc312be --- /dev/null +++ b/test/fixtures/prism @@ -0,0 +1 @@ +Subproject commit afbc312be753bfdeafd2e3dfd323fac95bb0fae2 diff --git a/test/fixtures/yarp b/test/fixtures/yarp deleted file mode 160000 index 36fef769a..000000000 --- a/test/fixtures/yarp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 36fef769ac85f1bf375e5cca20712a46df268bb3 diff --git a/test/requests/show_syntax_tree_test.rb b/test/requests/show_syntax_tree_test.rb index ee91fe8ef..15ae73803 100644 --- a/test/requests/show_syntax_tree_test.rb +++ b/test/requests/show_syntax_tree_test.rb @@ -21,28 +21,28 @@ def test_returns_partial_tree_if_document_has_syntax_error }).response assert_equal(<<~AST, response[:ast]) - @ ProgramNode (location: (0...6)) + @ ProgramNode (location: (1,0)-(1,6)) ├── locals: [] └── statements: - @ StatementsNode (location: (0...6)) + @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) - └── @ CallNode (location: (0...6)) + └── @ CallNode (location: (1,0)-(1,6)) ├── receiver: ∅ ├── call_operator_loc: ∅ - ├── message_loc: (0...3) = "foo" + ├── message_loc: (1,0)-(1,3) = "foo" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ ├── block: - │ @ BlockNode (location: (4...6)) + │ @ BlockNode (location: (1,4)-(1,6)) │ ├── locals: [] │ ├── parameters: ∅ │ ├── body: - │ │ @ StatementsNode (location: (4...6)) + │ │ @ StatementsNode (location: (1,4)-(1,6)) │ │ └── body: (length: 1) - │ │ └── @ MissingNode (location: (4...6)) - │ ├── opening_loc: (4...6) = "do" - │ └── closing_loc: (6...6) = "" + │ │ └── @ MissingNode (location: (1,4)-(1,6)) + │ ├── opening_loc: (1,4)-(1,6) = "do" + │ └── closing_loc: (1,6)-(1,6) = "" ├── flags: ∅ └── name: "foo" AST @@ -60,19 +60,19 @@ def test_returns_ast_if_document_is_parsed }).response assert_equal(<<~AST, response[:ast]) - @ ProgramNode (location: (0...9)) + @ ProgramNode (location: (1,0)-(1,9)) ├── locals: [:foo] └── statements: - @ StatementsNode (location: (0...9)) + @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 1) - └── @ LocalVariableWriteNode (location: (0...9)) + └── @ LocalVariableWriteNode (location: (1,0)-(1,9)) ├── name: :foo ├── depth: 0 - ├── name_loc: (0...3) = "foo" + ├── name_loc: (1,0)-(1,3) = "foo" ├── value: - │ @ IntegerNode (location: (6...9)) + │ @ IntegerNode (location: (1,6)-(1,9)) │ └── flags: decimal - └── operator_loc: (4...5) = "=" + └── operator_loc: (1,4)-(1,5) = "=" AST end @@ -96,23 +96,23 @@ def test_returns_ast_for_a_selection }).response assert_equal(<<~AST, response[:ast]) - @ LocalVariableWriteNode (location: (0...9)) + @ LocalVariableWriteNode (location: (1,0)-(1,9)) ├── name: :foo ├── depth: 0 - ├── name_loc: (0...3) = "foo" + ├── name_loc: (1,0)-(1,3) = "foo" ├── value: - │ @ IntegerNode (location: (6...9)) + │ @ IntegerNode (location: (1,6)-(1,9)) │ └── flags: decimal - └── operator_loc: (4...5) = "=" + └── operator_loc: (1,4)-(1,5) = "=" - @ LocalVariableWriteNode (location: (10...19)) + @ LocalVariableWriteNode (location: (2,0)-(2,9)) ├── name: :bar ├── depth: 0 - ├── name_loc: (10...13) = "bar" + ├── name_loc: (2,0)-(2,3) = "bar" ├── value: - │ @ IntegerNode (location: (16...19)) + │ @ IntegerNode (location: (2,6)-(2,9)) │ └── flags: decimal - └── operator_loc: (14...15) = "=" + └── operator_loc: (2,4)-(2,5) = "=" AST # We execute twice just to make sure we do not mutate by mistake. diff --git a/test/requests/support/dependency_detector_test.rb b/test/requests/support/dependency_detector_test.rb index 13568a5b8..361ef0394 100644 --- a/test/requests/support/dependency_detector_test.rb +++ b/test/requests/support/dependency_detector_test.rb @@ -34,7 +34,7 @@ def test_detects_test_unit end def test_detects_dependencies_in_gemspecs - assert(DependencyDetector.instance.direct_dependency?(/^yarp$/)) + assert(DependencyDetector.instance.direct_dependency?(/^prism$/)) end def test_detects_rails_if_both_rails_and_minitest_are_present diff --git a/test/requests/support/semantic_token_encoder_test.rb b/test/requests/support/semantic_token_encoder_test.rb index 7f6dc0d7d..e07732d61 100644 --- a/test/requests/support/semantic_token_encoder_test.rb +++ b/test/requests/support/semantic_token_encoder_test.rb @@ -96,7 +96,7 @@ def test_encoded_modifiers_with_some_modifiers private def stub_token(start_line, start_column, length, type, modifier) - location = YARP::Location.new("", 123, 123) + location = Prism::Location.new("", 123, 123) location.expects(:start_line).returns(start_line).at_least_once location.expects(:start_column).returns(start_column).at_least_once diff --git a/test/requests/support/sorbet_test.rb b/test/requests/support/sorbet_test.rb index 93b21799f..71dfbbfc6 100644 --- a/test/requests/support/sorbet_test.rb +++ b/test/requests/support/sorbet_test.rb @@ -497,20 +497,20 @@ def annotation?(source) sig do params(source: String) - .returns(YARP::CallNode) + .returns(Prism::CallNode) end def parse(source) - program = T.let(YARP.parse(source).value, YARP::Node) + program = T.let(Prism.parse(source).value, Prism::Node) select_relevant_node([program]) end sig do - params(nodes: T::Array[YARP::Node]).returns(YARP::CallNode) + params(nodes: T::Array[Prism::Node]).returns(Prism::CallNode) end def select_relevant_node(nodes) nodes.each do |node| - return node if node.is_a?(YARP::CallNode) + return node if node.is_a?(Prism::CallNode) end select_relevant_node(nodes.map(&:child_nodes).flatten.compact)