From 6483465bf09ae97252dc3686a71538b5b4a79cf9 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 9 Aug 2023 16:28:37 -0400 Subject: [PATCH 1/6] Add YARP dependency --- Gemfile.lock | 2 + ruby-lsp.gemspec | 1 + sorbet/rbi/gems/yarp@0.6.0.rbi | 11099 +++++++++++++++++++++++++++++++ sorbet/tapioca/require.rb | 1 + 4 files changed, 11103 insertions(+) create mode 100644 sorbet/rbi/gems/yarp@0.6.0.rbi diff --git a/Gemfile.lock b/Gemfile.lock index fd7802955..0dee3eb52 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,6 +5,7 @@ PATH language_server-protocol (~> 3.17.0) sorbet-runtime syntax_tree (>= 6.1.1, < 7) + yarp (~> 0.6.0) GEM remote: https://rubygems.org/ @@ -167,6 +168,7 @@ GEM yard-sorbet (0.8.1) sorbet-runtime (>= 0.5) yard (>= 0.9) + yarp (0.6.0) zeitwerk (2.6.8) PLATFORMS diff --git a/ruby-lsp.gemspec b/ruby-lsp.gemspec index f932fc40d..c4d6aefcc 100644 --- a/ruby-lsp.gemspec +++ b/ruby-lsp.gemspec @@ -20,6 +20,7 @@ Gem::Specification.new do |s| s.add_dependency("language_server-protocol", "~> 3.17.0") s.add_dependency("sorbet-runtime") s.add_dependency("syntax_tree", ">= 6.1.1", "< 7") + s.add_dependency("yarp", "~> 0.6.0") s.required_ruby_version = ">= 3.0" end diff --git a/sorbet/rbi/gems/yarp@0.6.0.rbi b/sorbet/rbi/gems/yarp@0.6.0.rbi new file mode 100644 index 000000000..fe46a069f --- /dev/null +++ b/sorbet/rbi/gems/yarp@0.6.0.rbi @@ -0,0 +1,11099 @@ +# 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 bin/template script and should not be +# modified manually. See templates/lib/yarp/node.rb.erb +# if you are looking to modify the template +# +# source://yarp//lib/yarp.rb#3 +module YARP + class << self + def dump(*_arg0); end + def dump_file(_arg0); end + 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#721 + def lex_compat(source, filepath = T.unsafe(nil)); end + + 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#728 + def lex_ripper(source); end + + # Load the serialized AST using the source as a reference into a tree. + # + # source://yarp//lib/yarp.rb#302 + def load(source, serialized); end + + def parse(*_arg0); end + def parse_file(_arg0); end + end +end + +# Represents the use of the `alias` keyword. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#13 +class YARP::AliasNode < ::YARP::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasNode] a new instance of AliasNode + # + # 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#38 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#38 + 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#46 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#51 + 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 an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#60 +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#71 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#79 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#85 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#85 + 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#93 + def deconstruct_keys(keys); end + + # attr_reader left: Node + # + # source://yarp//lib/yarp/node.rb#62 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#98 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#68 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/yarp/node.rb#65 + def right; end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#107 +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#118 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#126 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#132 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#132 + 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#140 + def deconstruct_keys(keys); end + + # attr_reader left: Node + # + # source://yarp//lib/yarp/node.rb#109 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#145 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#115 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/yarp/node.rb#112 + 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#154 +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#159 + def initialize(arguments, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#165 + def accept(visitor); end + + # attr_reader arguments: Array[Node] + # + # source://yarp//lib/yarp/node.rb#156 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#171 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#171 + 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#179 + def deconstruct_keys(keys); 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#189 +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#200 + def initialize(elements, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#208 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#214 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#232 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#197 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#214 + 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#222 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/yarp/node.rb#191 + def elements; end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#227 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#194 + 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#253 +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#273 + def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#284 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#290 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#308 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#270 + def closing_loc; end + + # attr_reader constant: Node? + # + # source://yarp//lib/yarp/node.rb#255 + def constant; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#290 + 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#298 + def deconstruct_keys(keys); end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#303 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#267 + def opening_loc; end + + # attr_reader posts: Array[Node] + # + # source://yarp//lib/yarp/node.rb#264 + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/yarp/node.rb#258 + def requireds; end + + # attr_reader rest: Node? + # + # source://yarp//lib/yarp/node.rb#261 + def rest; end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://yarp//lib/yarp/node.rb#317 +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#328 + def initialize(key, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#336 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#342 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#342 + 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#350 + def deconstruct_keys(keys); end + + # attr_reader key: Node + # + # source://yarp//lib/yarp/node.rb#319 + def key; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#355 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#325 + def operator_loc; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#322 + def value; end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://yarp//lib/yarp/node.rb#364 +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#372 + def initialize(value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#379 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#385 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#385 + 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#393 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#398 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#369 + def operator_loc; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#366 + def value; end +end + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://yarp//lib/yarp/node.rb#407 +class YARP::BackReferenceReadNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://yarp//lib/yarp/node.rb#409 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#414 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#420 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#420 + 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#428 + def deconstruct_keys(keys); 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#148 +class YARP::BasicVisitor + # source://yarp//lib/yarp.rb#149 + def visit(node); end + + # source://yarp//lib/yarp.rb#153 + def visit_all(nodes); end + + # source://yarp//lib/yarp.rb#157 + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://yarp//lib/yarp/node.rb#439 +class YARP::BeginNode < ::YARP::Node + # def initialize: (begin_keyword_loc: Location?, statements: Node?, rescue_clause: Node?, else_clause: Node?, ensure_clause: Node?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [BeginNode] a new instance of BeginNode + # + # source://yarp//lib/yarp/node.rb#459 + 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#470 + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://yarp//lib/yarp/node.rb#492 + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://yarp//lib/yarp/node.rb#441 + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#479 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#479 + 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#487 + def deconstruct_keys(keys); end + + # attr_reader else_clause: Node? + # + # source://yarp//lib/yarp/node.rb#450 + def else_clause; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/yarp/node.rb#497 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/yarp/node.rb#456 + def end_keyword_loc; end + + # attr_reader ensure_clause: Node? + # + # source://yarp//lib/yarp/node.rb#453 + def ensure_clause; end + + # attr_reader rescue_clause: Node? + # + # source://yarp//lib/yarp/node.rb#447 + def rescue_clause; end + + # source://yarp//lib/yarp/node.rb#474 + def set_newline_flag(newline_marked); end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#444 + def statements; end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#506 +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#514 + def initialize(expression, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#521 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#527 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#527 + 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#535 + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://yarp//lib/yarp/node.rb#508 + def expression; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#540 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#511 + def operator_loc; end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#549 +class YARP::BlockNode < ::YARP::Node + # def initialize: (locals: Array[Symbol], parameters: Node?, statements: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [BlockNode] a new instance of BlockNode + # + # source://yarp//lib/yarp/node.rb#566 + def initialize(locals, parameters, statements, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#576 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#582 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#600 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#563 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#582 + 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#590 + def deconstruct_keys(keys); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/yarp/node.rb#551 + def locals; end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#595 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#560 + def opening_loc; end + + # attr_reader parameters: Node? + # + # source://yarp//lib/yarp/node.rb#554 + def parameters; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#557 + def statements; end +end + +# Represents a block parameter to a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://yarp//lib/yarp/node.rb#610 +class YARP::BlockParameterNode < ::YARP::Node + # def initialize: (name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://yarp//lib/yarp/node.rb#618 + def initialize(name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#625 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#631 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#631 + 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#639 + def deconstruct_keys(keys); end + + # def name: () -> String? + # + # source://yarp//lib/yarp/node.rb#644 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/yarp/node.rb#612 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#649 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#615 + 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#662 +class YARP::BlockParametersNode < ::YARP::Node + # def initialize: (parameters: Node?, locals: Array[Location], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://yarp//lib/yarp/node.rb#676 + def initialize(parameters, locals, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#685 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#691 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#709 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#673 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#691 + 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#699 + def deconstruct_keys(keys); end + + # attr_reader locals: Array[Location] + # + # source://yarp//lib/yarp/node.rb#667 + def locals; end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#704 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#670 + def opening_loc; end + + # attr_reader parameters: Node? + # + # source://yarp//lib/yarp/node.rb#664 + def parameters; end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#718 +class YARP::BreakNode < ::YARP::Node + # def initialize: (arguments: Node?, keyword_loc: Location, location: Location) -> void + # + # @return [BreakNode] a new instance of BreakNode + # + # source://yarp//lib/yarp/node.rb#726 + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#733 + def accept(visitor); end + + # attr_reader arguments: Node? + # + # source://yarp//lib/yarp/node.rb#720 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#739 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#739 + 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#747 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#752 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#723 + def keyword_loc; 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#776 +class YARP::CallNode < ::YARP::Node + # def initialize: (receiver: Node?, operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: Node?, closing_loc: Location?, block: Node?, flags: Integer, name: String, location: Location) -> void + # + # @return [CallNode] a new instance of CallNode + # + # source://yarp//lib/yarp/node.rb#805 + def initialize(receiver, 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#819 + def accept(visitor); end + + # attr_reader arguments: Node? + # + # source://yarp//lib/yarp/node.rb#790 + def arguments; end + + # attr_reader block: Node? + # + # source://yarp//lib/yarp/node.rb#796 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#825 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#853 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#793 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#825 + 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#833 + def deconstruct_keys(keys); end + + # attr_reader flags: Integer + # + # source://yarp//lib/yarp/node.rb#799 + def flags; end + + # def message: () -> String? + # + # source://yarp//lib/yarp/node.rb#843 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/yarp/node.rb#784 + def message_loc; end + + # attr_reader name: String + # + # source://yarp//lib/yarp/node.rb#802 + def name; end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#848 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#787 + def opening_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#838 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#781 + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/yarp/node.rb#778 + def receiver; end +end + +# source://yarp//lib/yarp/node.rb#6358 +module YARP::CallNodeFlags; end + +# &. operator +# +# source://yarp//lib/yarp/node.rb#6360 +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#6363 +YARP::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#862 +class YARP::CallOperatorAndWriteNode < ::YARP::Node + # def initialize: (target: Node, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOperatorAndWriteNode] a new instance of CallOperatorAndWriteNode + # + # source://yarp//lib/yarp/node.rb#873 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#881 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#887 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#887 + 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#895 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#900 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#867 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/yarp/node.rb#864 + def target; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#870 + def value; end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#909 +class YARP::CallOperatorOrWriteNode < ::YARP::Node + # def initialize: (target: Node, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [CallOperatorOrWriteNode] a new instance of CallOperatorOrWriteNode + # + # source://yarp//lib/yarp/node.rb#920 + def initialize(target, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#928 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#934 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#934 + 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#942 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#947 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#917 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/yarp/node.rb#911 + def target; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#914 + def value; end +end + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#956 +class YARP::CallOperatorWriteNode < ::YARP::Node + # def initialize: (target: Node, operator_loc: Location, value: Node, operator_id: Symbol, location: Location) -> void + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://yarp//lib/yarp/node.rb#970 + def initialize(target, operator_loc, value, operator_id, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#979 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#985 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#985 + 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#993 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#998 + def operator; end + + # attr_reader operator_id: Symbol + # + # source://yarp//lib/yarp/node.rb#967 + def operator_id; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#961 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/yarp/node.rb#958 + def target; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#964 + def value; end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1007 +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#1018 + def initialize(value, target, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1026 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1032 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1032 + 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#1040 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#1045 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1015 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/yarp/node.rb#1012 + def target; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1009 + def value; end +end + +# Represents the use of a case statement. +# +# case true +# ^^^^^^^^^ +# when false +# end +# +# source://yarp//lib/yarp/node.rb#1056 +class YARP::CaseNode < ::YARP::Node + # def initialize: (predicate: Node?, conditions: Array[Node], consequent: Node?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void + # + # @return [CaseNode] a new instance of CaseNode + # + # source://yarp//lib/yarp/node.rb#1073 + def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1083 + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#1102 + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#1067 + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1089 + def child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://yarp//lib/yarp/node.rb#1061 + def conditions; end + + # attr_reader consequent: Node? + # + # source://yarp//lib/yarp/node.rb#1064 + def consequent; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1089 + 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#1097 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#1107 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#1070 + def end_keyword_loc; end + + # attr_reader predicate: Node? + # + # source://yarp//lib/yarp/node.rb#1058 + def predicate; end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1116 +class YARP::ClassNode < ::YARP::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, statements: Node?, end_keyword_loc: Location, location: Location) -> void + # + # @return [ClassNode] a new instance of ClassNode + # + # source://yarp//lib/yarp/node.rb#1139 + def initialize(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1151 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1157 + def child_nodes; end + + # def class_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#1170 + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#1121 + def class_keyword_loc; end + + # attr_reader constant_path: Node + # + # source://yarp//lib/yarp/node.rb#1124 + def constant_path; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1157 + 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#1165 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#1180 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#1136 + def end_keyword_loc; end + + # def inheritance_operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#1175 + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1127 + def inheritance_operator_loc; end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/yarp/node.rb#1118 + def locals; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#1133 + def statements; end + + # attr_reader superclass: Node? + # + # source://yarp//lib/yarp/node.rb#1130 + def superclass; end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1189 +class YARP::ClassVariableOperatorAndWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableOperatorAndWriteNode] a new instance of ClassVariableOperatorAndWriteNode + # + # source://yarp//lib/yarp/node.rb#1200 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1208 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1214 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1214 + 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#1222 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1227 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1191 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#1232 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1194 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1197 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1241 +class YARP::ClassVariableOperatorOrWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableOperatorOrWriteNode] a new instance of ClassVariableOperatorOrWriteNode + # + # source://yarp//lib/yarp/node.rb#1252 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1260 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1266 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1266 + 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#1274 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1279 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1243 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#1284 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1246 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1249 + def value; end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1293 +class YARP::ClassVariableOperatorWriteNode < ::YARP::Node + # def initialize: (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#1307 + def initialize(name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1316 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1322 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1322 + 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#1330 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1335 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1295 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/yarp/node.rb#1304 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1298 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1301 + def value; end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://yarp//lib/yarp/node.rb#1344 +class YARP::ClassVariableReadNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://yarp//lib/yarp/node.rb#1346 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1351 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1357 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1357 + 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#1365 + def deconstruct_keys(keys); end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1374 +class YARP::ClassVariableWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, value: Node?, operator_loc: Location?, location: Location) -> void + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://yarp//lib/yarp/node.rb#1385 + def initialize(name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1393 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1399 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1399 + 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#1407 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1412 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1376 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#1417 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1382 + def operator_loc; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#1379 + def value; end +end + +# This represents a comment that was encountered during parsing. +# +# source://yarp//lib/yarp.rb#103 +class YARP::Comment + # @return [Comment] a new instance of Comment + # + # source://yarp//lib/yarp.rb#106 + def initialize(type, location); end + + # source://yarp//lib/yarp.rb#111 + def deconstruct_keys(keys); end + + # Returns the value of attribute location. + # + # source://yarp//lib/yarp.rb#104 + def location; end + + # Returns the value of attribute type. + # + # source://yarp//lib/yarp.rb#104 + def type; end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1426 +class YARP::ConstantOperatorAndWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantOperatorAndWriteNode] a new instance of ConstantOperatorAndWriteNode + # + # source://yarp//lib/yarp/node.rb#1437 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1445 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1451 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1451 + 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#1459 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1464 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1428 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#1469 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1431 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1434 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1478 +class YARP::ConstantOperatorOrWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantOperatorOrWriteNode] a new instance of ConstantOperatorOrWriteNode + # + # source://yarp//lib/yarp/node.rb#1489 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1497 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1503 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1503 + 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#1511 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1516 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1480 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#1521 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1483 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1486 + def value; end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1530 +class YARP::ConstantOperatorWriteNode < ::YARP::Node + # def initialize: (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#1544 + def initialize(name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1553 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1559 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1559 + 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#1567 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1572 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1532 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/yarp/node.rb#1541 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1535 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1538 + def value; end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1581 +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#1592 + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1600 + def accept(visitor); end + + # attr_reader child: Node + # + # source://yarp//lib/yarp/node.rb#1586 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1606 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1606 + 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#1614 + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://yarp//lib/yarp/node.rb#1619 + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://yarp//lib/yarp/node.rb#1589 + def delimiter_loc; end + + # attr_reader parent: Node? + # + # source://yarp//lib/yarp/node.rb#1583 + def parent; end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1628 +class YARP::ConstantPathOperatorAndWriteNode < ::YARP::Node + # def initialize: (target: Node, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathOperatorAndWriteNode] a new instance of ConstantPathOperatorAndWriteNode + # + # source://yarp//lib/yarp/node.rb#1639 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1647 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1653 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1653 + 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#1661 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#1666 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1633 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/yarp/node.rb#1630 + def target; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1636 + 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#1675 +class YARP::ConstantPathOperatorOrWriteNode < ::YARP::Node + # def initialize: (target: Node, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathOperatorOrWriteNode] a new instance of ConstantPathOperatorOrWriteNode + # + # source://yarp//lib/yarp/node.rb#1686 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1694 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1700 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1700 + 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#1708 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#1713 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1680 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/yarp/node.rb#1677 + def target; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1683 + def value; end +end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1722 +class YARP::ConstantPathOperatorWriteNode < ::YARP::Node + # def initialize: (target: Node, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://yarp//lib/yarp/node.rb#1736 + def initialize(target, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1745 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1751 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1751 + 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#1759 + def deconstruct_keys(keys); end + + # attr_reader operator: Symbol + # + # source://yarp//lib/yarp/node.rb#1733 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#1727 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/yarp/node.rb#1724 + def target; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#1730 + def value; end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1774 +class YARP::ConstantPathWriteNode < ::YARP::Node + # def initialize: (target: Node, operator_loc: Location?, value: Node?, location: Location) -> void + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://yarp//lib/yarp/node.rb#1785 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1793 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1799 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1799 + 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#1807 + def deconstruct_keys(keys); end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#1812 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1779 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/yarp/node.rb#1776 + def target; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#1782 + def value; end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://yarp//lib/yarp/node.rb#1821 +class YARP::ConstantReadNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://yarp//lib/yarp/node.rb#1823 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1828 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1834 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1834 + 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#1842 + def deconstruct_keys(keys); end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1851 +class YARP::ConstantWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, value: Node?, operator_loc: Location?, location: Location) -> void + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://yarp//lib/yarp/node.rb#1862 + def initialize(name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#1870 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1876 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1876 + 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#1884 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1889 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1853 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#1894 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1859 + def operator_loc; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#1856 + def value; end +end + +# source://yarp//lib/yarp/node.rb#6785 +module YARP::DSL + private + + # Create a new AliasNode node + # + # source://yarp//lib/yarp/node.rb#6794 + def AliasNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AlternationPatternNode node + # + # source://yarp//lib/yarp/node.rb#6799 + def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new AndNode node + # + # source://yarp//lib/yarp/node.rb#6804 + def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ArgumentsNode node + # + # source://yarp//lib/yarp/node.rb#6809 + def ArgumentsNode(arguments, location = T.unsafe(nil)); end + + # Create a new ArrayNode node + # + # source://yarp//lib/yarp/node.rb#6814 + def ArrayNode(elements, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ArrayPatternNode node + # + # source://yarp//lib/yarp/node.rb#6819 + 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#6824 + def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new AssocSplatNode node + # + # source://yarp//lib/yarp/node.rb#6829 + def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node + # + # source://yarp//lib/yarp/node.rb#6834 + def BackReferenceReadNode(location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # source://yarp//lib/yarp/node.rb#6839 + 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#6844 + def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockNode node + # + # source://yarp//lib/yarp/node.rb#6849 + def BlockNode(locals, parameters, statements, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BlockParameterNode node + # + # source://yarp//lib/yarp/node.rb#6854 + def BlockParameterNode(name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockParametersNode node + # + # source://yarp//lib/yarp/node.rb#6859 + def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BreakNode node + # + # source://yarp//lib/yarp/node.rb#6864 + def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new CallNode node + # + # source://yarp//lib/yarp/node.rb#6869 + def CallNode(receiver, operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location = T.unsafe(nil)); end + + # Create a new CallOperatorAndWriteNode node + # + # source://yarp//lib/yarp/node.rb#6874 + def CallOperatorAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallOperatorOrWriteNode node + # + # source://yarp//lib/yarp/node.rb#6879 + def CallOperatorOrWriteNode(target, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new CallOperatorWriteNode node + # + # source://yarp//lib/yarp/node.rb#6884 + def CallOperatorWriteNode(target, operator_loc, value, operator_id, location = T.unsafe(nil)); end + + # Create a new CapturePatternNode node + # + # source://yarp//lib/yarp/node.rb#6889 + def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end + + # Create a new CaseNode node + # + # source://yarp//lib/yarp/node.rb#6894 + 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#6899 + def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorAndWriteNode node + # + # source://yarp//lib/yarp/node.rb#6904 + def ClassVariableOperatorAndWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorOrWriteNode node + # + # source://yarp//lib/yarp/node.rb#6909 + def ClassVariableOperatorOrWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node + # + # source://yarp//lib/yarp/node.rb#6914 + def ClassVariableOperatorWriteNode(name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node + # + # source://yarp//lib/yarp/node.rb#6919 + def ClassVariableReadNode(location = T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node + # + # source://yarp//lib/yarp/node.rb#6924 + def ClassVariableWriteNode(name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new ConstantOperatorAndWriteNode node + # + # source://yarp//lib/yarp/node.rb#6929 + def ConstantOperatorAndWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantOperatorOrWriteNode node + # + # source://yarp//lib/yarp/node.rb#6934 + def ConstantOperatorOrWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node + # + # source://yarp//lib/yarp/node.rb#6939 + def ConstantOperatorWriteNode(name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantPathNode node + # + # source://yarp//lib/yarp/node.rb#6944 + def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorAndWriteNode node + # + # source://yarp//lib/yarp/node.rb#6949 + def ConstantPathOperatorAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorOrWriteNode node + # + # source://yarp//lib/yarp/node.rb#6954 + def ConstantPathOperatorOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node + # + # source://yarp//lib/yarp/node.rb#6959 + def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node + # + # source://yarp//lib/yarp/node.rb#6964 + def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantReadNode node + # + # source://yarp//lib/yarp/node.rb#6969 + def ConstantReadNode(location = T.unsafe(nil)); end + + # Create a new ConstantWriteNode node + # + # source://yarp//lib/yarp/node.rb#6974 + def ConstantWriteNode(name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new DefNode node + # + # source://yarp//lib/yarp/node.rb#6979 + def DefNode(name_loc, receiver, parameters, statements, 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#6984 + 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#6989 + 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#6994 + def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node + # + # source://yarp//lib/yarp/node.rb#6999 + def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end + + # Create a new EnsureNode node + # + # source://yarp//lib/yarp/node.rb#7004 + 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#7009 + def FalseNode(location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # source://yarp//lib/yarp/node.rb#7014 + def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new FloatNode node + # + # source://yarp//lib/yarp/node.rb#7019 + def FloatNode(location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # source://yarp//lib/yarp/node.rb#7024 + 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#7029 + def ForwardingArgumentsNode(location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # source://yarp//lib/yarp/node.rb#7034 + def ForwardingParameterNode(location = T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node + # + # source://yarp//lib/yarp/node.rb#7039 + def ForwardingSuperNode(block, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorAndWriteNode node + # + # source://yarp//lib/yarp/node.rb#7044 + def GlobalVariableOperatorAndWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorOrWriteNode node + # + # source://yarp//lib/yarp/node.rb#7049 + def GlobalVariableOperatorOrWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/yarp/node.rb#7054 + def GlobalVariableOperatorWriteNode(name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node + # + # source://yarp//lib/yarp/node.rb#7059 + def GlobalVariableReadNode(location = T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node + # + # source://yarp//lib/yarp/node.rb#7064 + def GlobalVariableWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new HashNode node + # + # source://yarp//lib/yarp/node.rb#7069 + def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end + + # Create a new HashPatternNode node + # + # source://yarp//lib/yarp/node.rb#7074 + 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#7079 + 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#7084 + def ImaginaryNode(numeric, location = T.unsafe(nil)); end + + # Create a new InNode node + # + # source://yarp//lib/yarp/node.rb#7089 + def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorAndWriteNode node + # + # source://yarp//lib/yarp/node.rb#7094 + def InstanceVariableOperatorAndWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorOrWriteNode node + # + # source://yarp//lib/yarp/node.rb#7099 + def InstanceVariableOperatorOrWriteNode(name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/yarp/node.rb#7104 + def InstanceVariableOperatorWriteNode(name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node + # + # source://yarp//lib/yarp/node.rb#7109 + def InstanceVariableReadNode(location = T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node + # + # source://yarp//lib/yarp/node.rb#7114 + def InstanceVariableWriteNode(name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new IntegerNode node + # + # source://yarp//lib/yarp/node.rb#7119 + def IntegerNode(location = T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node + # + # source://yarp//lib/yarp/node.rb#7124 + def InterpolatedRegularExpressionNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node + # + # source://yarp//lib/yarp/node.rb#7129 + def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedSymbolNode node + # + # source://yarp//lib/yarp/node.rb#7134 + def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node + # + # source://yarp//lib/yarp/node.rb#7139 + def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new KeywordHashNode node + # + # source://yarp//lib/yarp/node.rb#7144 + def KeywordHashNode(elements, location = T.unsafe(nil)); end + + # Create a new KeywordParameterNode node + # + # source://yarp//lib/yarp/node.rb#7149 + def KeywordParameterNode(name_loc, value, location = T.unsafe(nil)); end + + # Create a new KeywordRestParameterNode node + # + # source://yarp//lib/yarp/node.rb#7154 + def KeywordRestParameterNode(operator_loc, name_loc, location = T.unsafe(nil)); end + + # Create a new LambdaNode node + # + # source://yarp//lib/yarp/node.rb#7159 + def LambdaNode(locals, opening_loc, parameters, statements, location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorAndWriteNode node + # + # source://yarp//lib/yarp/node.rb#7164 + def LocalVariableOperatorAndWriteNode(name_loc, operator_loc, value, constant_id, location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorOrWriteNode node + # + # source://yarp//lib/yarp/node.rb#7169 + def LocalVariableOperatorOrWriteNode(name_loc, operator_loc, value, constant_id, location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node + # + # source://yarp//lib/yarp/node.rb#7174 + def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, constant_id, operator_id, location = T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node + # + # source://yarp//lib/yarp/node.rb#7179 + def LocalVariableReadNode(constant_id, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node + # + # source://yarp//lib/yarp/node.rb#7184 + def LocalVariableWriteNode(constant_id, depth, value, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new Location object + # + # source://yarp//lib/yarp/node.rb#6789 + def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + + # Create a new MatchPredicateNode node + # + # source://yarp//lib/yarp/node.rb#7189 + def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchRequiredNode node + # + # source://yarp//lib/yarp/node.rb#7194 + def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MissingNode node + # + # source://yarp//lib/yarp/node.rb#7199 + def MissingNode(location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # source://yarp//lib/yarp/node.rb#7204 + def ModuleNode(locals, module_keyword_loc, constant_path, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new MultiWriteNode node + # + # source://yarp//lib/yarp/node.rb#7209 + def MultiWriteNode(targets, operator_loc, value, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new NextNode node + # + # source://yarp//lib/yarp/node.rb#7214 + def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NilNode node + # + # source://yarp//lib/yarp/node.rb#7219 + def NilNode(location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # source://yarp//lib/yarp/node.rb#7224 + def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # source://yarp//lib/yarp/node.rb#7229 + def NumberedReferenceReadNode(location = T.unsafe(nil)); end + + # Create a new OptionalParameterNode node + # + # source://yarp//lib/yarp/node.rb#7234 + def OptionalParameterNode(constant_id, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new OrNode node + # + # source://yarp//lib/yarp/node.rb#7239 + def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ParametersNode node + # + # source://yarp//lib/yarp/node.rb#7244 + def ParametersNode(requireds, optionals, posts, rest, keywords, keyword_rest, block, location = T.unsafe(nil)); end + + # Create a new ParenthesesNode node + # + # source://yarp//lib/yarp/node.rb#7249 + def ParenthesesNode(statements, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node + # + # source://yarp//lib/yarp/node.rb#7254 + 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#7259 + def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end + + # Create a new PostExecutionNode node + # + # source://yarp//lib/yarp/node.rb#7264 + 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#7269 + 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#7274 + def ProgramNode(locals, statements, location = T.unsafe(nil)); end + + # Create a new RangeNode node + # + # source://yarp//lib/yarp/node.rb#7279 + def RangeNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new RationalNode node + # + # source://yarp//lib/yarp/node.rb#7284 + def RationalNode(numeric, location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # source://yarp//lib/yarp/node.rb#7289 + def RedoNode(location = T.unsafe(nil)); end + + # Create a new RegularExpressionNode node + # + # source://yarp//lib/yarp/node.rb#7294 + 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#7299 + def RequiredDestructuredParameterNode(parameters, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new RequiredParameterNode node + # + # source://yarp//lib/yarp/node.rb#7304 + def RequiredParameterNode(constant_id, location = T.unsafe(nil)); end + + # Create a new RescueModifierNode node + # + # source://yarp//lib/yarp/node.rb#7309 + def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end + + # Create a new RescueNode node + # + # source://yarp//lib/yarp/node.rb#7314 + 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#7319 + def RestParameterNode(operator_loc, name_loc, location = T.unsafe(nil)); end + + # Create a new RetryNode node + # + # source://yarp//lib/yarp/node.rb#7324 + def RetryNode(location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # source://yarp//lib/yarp/node.rb#7329 + def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end + + # Create a new SelfNode node + # + # source://yarp//lib/yarp/node.rb#7334 + def SelfNode(location = T.unsafe(nil)); end + + # Create a new SingletonClassNode node + # + # source://yarp//lib/yarp/node.rb#7339 + def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new SourceEncodingNode node + # + # source://yarp//lib/yarp/node.rb#7344 + def SourceEncodingNode(location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # source://yarp//lib/yarp/node.rb#7349 + def SourceFileNode(filepath, location = T.unsafe(nil)); end + + # Create a new SourceLineNode node + # + # source://yarp//lib/yarp/node.rb#7354 + def SourceLineNode(location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # source://yarp//lib/yarp/node.rb#7359 + def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end + + # Create a new StatementsNode node + # + # source://yarp//lib/yarp/node.rb#7364 + def StatementsNode(body, location = T.unsafe(nil)); end + + # Create a new StringConcatNode node + # + # source://yarp//lib/yarp/node.rb#7369 + def StringConcatNode(left, right, location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # source://yarp//lib/yarp/node.rb#7374 + def StringNode(opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new SuperNode node + # + # source://yarp//lib/yarp/node.rb#7379 + 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#7384 + 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#7389 + def TrueNode(location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # source://yarp//lib/yarp/node.rb#7394 + def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end + + # Create a new UnlessNode node + # + # source://yarp//lib/yarp/node.rb#7399 + 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#7404 + def UntilNode(keyword_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new WhenNode node + # + # source://yarp//lib/yarp/node.rb#7409 + def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end + + # Create a new WhileNode node + # + # source://yarp//lib/yarp/node.rb#7414 + def WhileNode(keyword_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new XStringNode node + # + # source://yarp//lib/yarp/node.rb#7419 + 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#7424 + 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#308 +module YARP::Debug + class << self + def memsize(_arg0); end + def named_captures(_arg0); end + + # source://yarp//lib/yarp.rb#309 + def newlines(source); end + + # source://yarp//lib/yarp.rb#313 + 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 + end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#1904 +class YARP::DefNode < ::YARP::Node + # def initialize: (name_loc: Location, receiver: Node?, parameters: Node?, statements: 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#1939 + def initialize(name_loc, receiver, parameters, statements, 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#1955 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1961 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#1961 + 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#1969 + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#1979 + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#1921 + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/yarp/node.rb#2004 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1936 + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://yarp//lib/yarp/node.rb#1999 + def equal; end + + # attr_reader equal_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1933 + def equal_loc; end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/yarp/node.rb#1918 + def locals; end + + # def lparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#1989 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1927 + def lparen_loc; end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#1974 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#1906 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#1984 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1924 + def operator_loc; end + + # attr_reader parameters: Node? + # + # source://yarp//lib/yarp/node.rb#1912 + def parameters; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/yarp/node.rb#1909 + def receiver; end + + # def rparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#1994 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#1930 + def rparen_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#1915 + def statements; end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#2013 +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#2027 + def initialize(lparen_loc, value, rparen_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2036 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2042 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2042 + 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#2050 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#2065 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#2024 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#2055 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2015 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#2060 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2021 + def rparen_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#2018 + def value; 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#2074 +class YARP::ElseNode < ::YARP::Node + # def initialize: (else_keyword_loc: Location, statements: Node?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [ElseNode] a new instance of ElseNode + # + # source://yarp//lib/yarp/node.rb#2085 + def initialize(else_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2093 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2099 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2099 + 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#2107 + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#2112 + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#2076 + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/yarp/node.rb#2117 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2082 + def end_keyword_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#2079 + def statements; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://yarp//lib/yarp/node.rb#2126 +class YARP::EmbeddedStatementsNode < ::YARP::Node + # def initialize: (opening_loc: Location, statements: Node?, closing_loc: Location, location: Location) -> void + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://yarp//lib/yarp/node.rb#2137 + def initialize(opening_loc, statements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2145 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2151 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#2169 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#2134 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2151 + 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#2159 + def deconstruct_keys(keys); end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#2164 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#2128 + def opening_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#2131 + def statements; end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://yarp//lib/yarp/node.rb#2178 +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#2186 + def initialize(operator_loc, variable, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2193 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2199 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2199 + 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#2207 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#2212 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#2180 + def operator_loc; end + + # attr_reader variable: Node + # + # source://yarp//lib/yarp/node.rb#2183 + def variable; end +end + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://yarp//lib/yarp/node.rb#2225 +class YARP::EnsureNode < ::YARP::Node + # def initialize: (ensure_keyword_loc: Location, statements: Node?, end_keyword_loc: Location, location: Location) -> void + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://yarp//lib/yarp/node.rb#2236 + def initialize(ensure_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2244 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2250 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2250 + 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#2258 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#2268 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#2233 + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#2263 + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#2227 + def ensure_keyword_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#2230 + def statements; end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://yarp//lib/yarp/node.rb#2277 +class YARP::FalseNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [FalseNode] a new instance of FalseNode + # + # source://yarp//lib/yarp/node.rb#2279 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2284 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2290 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2290 + 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#2298 + def deconstruct_keys(keys); 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#2313 +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#2333 + def initialize(constant, left, requireds, right, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2344 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2350 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#2368 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2330 + def closing_loc; end + + # attr_reader constant: Node? + # + # source://yarp//lib/yarp/node.rb#2315 + def constant; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2350 + 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#2358 + def deconstruct_keys(keys); end + + # attr_reader left: Node + # + # source://yarp//lib/yarp/node.rb#2318 + def left; end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#2363 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2327 + def opening_loc; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/yarp/node.rb#2321 + def requireds; end + + # attr_reader right: Node + # + # source://yarp//lib/yarp/node.rb#2324 + def right; end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://yarp//lib/yarp/node.rb#2377 +class YARP::FloatNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # source://yarp//lib/yarp/node.rb#2379 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2384 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2390 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2390 + 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#2398 + def deconstruct_keys(keys); end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#2407 +class YARP::ForNode < ::YARP::Node + # def initialize: (index: Node, collection: Node, statements: Node?, 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#2430 + 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#2442 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2448 + def child_nodes; end + + # attr_reader collection: Node + # + # source://yarp//lib/yarp/node.rb#2412 + def collection; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2448 + 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#2456 + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://yarp//lib/yarp/node.rb#2471 + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2424 + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#2476 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#2427 + def end_keyword_loc; end + + # def for_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#2461 + def for_keyword; end + + # attr_reader for_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#2418 + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#2466 + def in_keyword; end + + # attr_reader in_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#2421 + def in_keyword_loc; end + + # attr_reader index: Node + # + # source://yarp//lib/yarp/node.rb#2409 + def index; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#2415 + def statements; end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^^^^^^ +# end +# +# source://yarp//lib/yarp/node.rb#2487 +class YARP::ForwardingArgumentsNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://yarp//lib/yarp/node.rb#2489 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2494 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2500 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2500 + 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#2508 + def deconstruct_keys(keys); 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#2518 +class YARP::ForwardingParameterNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://yarp//lib/yarp/node.rb#2520 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2525 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2531 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2531 + 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#2539 + def deconstruct_keys(keys); end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://yarp//lib/yarp/node.rb#2548 +class YARP::ForwardingSuperNode < ::YARP::Node + # def initialize: (block: Node?, location: Location) -> void + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://yarp//lib/yarp/node.rb#2553 + def initialize(block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2559 + def accept(visitor); end + + # attr_reader block: Node? + # + # source://yarp//lib/yarp/node.rb#2550 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2565 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2565 + 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#2573 + def deconstruct_keys(keys); end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#2582 +class YARP::GlobalVariableOperatorAndWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableOperatorAndWriteNode] a new instance of GlobalVariableOperatorAndWriteNode + # + # source://yarp//lib/yarp/node.rb#2593 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2601 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2607 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2607 + 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#2615 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#2620 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#2584 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#2625 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#2587 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#2590 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#2634 +class YARP::GlobalVariableOperatorOrWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableOperatorOrWriteNode] a new instance of GlobalVariableOperatorOrWriteNode + # + # source://yarp//lib/yarp/node.rb#2645 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2653 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2659 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2659 + 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#2667 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#2672 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#2636 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#2677 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#2639 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#2642 + def value; end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#2686 +class YARP::GlobalVariableOperatorWriteNode < ::YARP::Node + # def initialize: (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#2700 + def initialize(name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2709 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2715 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2715 + 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#2723 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#2728 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#2688 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/yarp/node.rb#2697 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#2691 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#2694 + def value; end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://yarp//lib/yarp/node.rb#2737 +class YARP::GlobalVariableReadNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://yarp//lib/yarp/node.rb#2739 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2744 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2750 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2750 + 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#2758 + def deconstruct_keys(keys); end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#2767 +class YARP::GlobalVariableWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location?, value: Node?, location: Location) -> void + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://yarp//lib/yarp/node.rb#2778 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2786 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2792 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2792 + 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#2800 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#2805 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#2769 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#2810 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2772 + def operator_loc; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#2775 + def value; end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#2819 +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#2830 + def initialize(opening_loc, elements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2838 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2844 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#2862 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#2827 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2844 + 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#2852 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/yarp/node.rb#2824 + def elements; end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#2857 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#2821 + 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#2874 +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#2891 + def initialize(constant, assocs, kwrest, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2901 + def accept(visitor); end + + # attr_reader assocs: Array[Node] + # + # source://yarp//lib/yarp/node.rb#2879 + def assocs; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2907 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#2925 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2888 + def closing_loc; end + + # attr_reader constant: Node? + # + # source://yarp//lib/yarp/node.rb#2876 + def constant; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2907 + 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#2915 + def deconstruct_keys(keys); end + + # attr_reader kwrest: Node? + # + # source://yarp//lib/yarp/node.rb#2882 + def kwrest; end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#2920 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2885 + 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#2937 +class YARP::IfNode < ::YARP::Node + # def initialize: (if_keyword_loc: Location?, predicate: Node, statements: Node?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [IfNode] a new instance of IfNode + # + # source://yarp//lib/yarp/node.rb#2954 + def initialize(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#2964 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2973 + def child_nodes; end + + # attr_reader consequent: Node? + # + # source://yarp//lib/yarp/node.rb#2948 + def consequent; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#2973 + 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#2981 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://yarp//lib/yarp/node.rb#2991 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2951 + def end_keyword_loc; end + + # def if_keyword: () -> String? + # + # source://yarp//lib/yarp/node.rb#2986 + def if_keyword; end + + # attr_reader if_keyword_loc: Location? + # + # source://yarp//lib/yarp/node.rb#2939 + def if_keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/yarp/node.rb#2942 + def predicate; end + + # source://yarp//lib/yarp/node.rb#2968 + def set_newline_flag(newline_marked); end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#2945 + def statements; end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://yarp//lib/yarp/node.rb#3000 +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#3005 + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3011 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3017 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3017 + 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#3025 + def deconstruct_keys(keys); end + + # attr_reader numeric: Node + # + # source://yarp//lib/yarp/node.rb#3002 + def numeric; 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#3034 +class YARP::InNode < ::YARP::Node + # def initialize: (pattern: Node, statements: Node?, in_loc: Location, then_loc: Location?, location: Location) -> void + # + # @return [InNode] a new instance of InNode + # + # source://yarp//lib/yarp/node.rb#3048 + def initialize(pattern, statements, in_loc, then_loc, 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#3063 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3063 + 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#3071 + def deconstruct_keys(keys); end + + # def in: () -> String + # + # source://yarp//lib/yarp/node.rb#3076 + def in; end + + # attr_reader in_loc: Location + # + # source://yarp//lib/yarp/node.rb#3042 + def in_loc; end + + # attr_reader pattern: Node + # + # source://yarp//lib/yarp/node.rb#3036 + def pattern; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#3039 + def statements; end + + # def then: () -> String? + # + # source://yarp//lib/yarp/node.rb#3081 + def then; end + + # attr_reader then_loc: Location? + # + # source://yarp//lib/yarp/node.rb#3045 + 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#3090 +class YARP::InstanceVariableOperatorAndWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableOperatorAndWriteNode] a new instance of InstanceVariableOperatorAndWriteNode + # + # source://yarp//lib/yarp/node.rb#3101 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3109 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3115 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3115 + 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#3123 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#3128 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3092 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#3133 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#3095 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#3098 + def value; end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3142 +class YARP::InstanceVariableOperatorOrWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableOperatorOrWriteNode] a new instance of InstanceVariableOperatorOrWriteNode + # + # source://yarp//lib/yarp/node.rb#3153 + def initialize(name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3161 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3167 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3167 + 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#3175 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#3180 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3144 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#3185 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#3147 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#3150 + def value; end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3194 +class YARP::InstanceVariableOperatorWriteNode < ::YARP::Node + # def initialize: (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#3208 + def initialize(name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3217 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3223 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3223 + 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#3231 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#3236 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3196 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/yarp/node.rb#3205 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#3199 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#3202 + def value; end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://yarp//lib/yarp/node.rb#3245 +class YARP::InstanceVariableReadNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://yarp//lib/yarp/node.rb#3247 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3252 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3258 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3258 + 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#3266 + def deconstruct_keys(keys); end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3275 +class YARP::InstanceVariableWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, value: Node?, operator_loc: Location?, location: Location) -> void + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://yarp//lib/yarp/node.rb#3286 + def initialize(name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3294 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3300 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3300 + 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#3308 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#3313 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3277 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#3318 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#3283 + def operator_loc; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#3280 + def value; end +end + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://yarp//lib/yarp/node.rb#3327 +class YARP::IntegerNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://yarp//lib/yarp/node.rb#3329 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3334 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3340 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3340 + 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#3348 + def deconstruct_keys(keys); end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3357 +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#3371 + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3380 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3390 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#3408 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#3365 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3390 + 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#3398 + def deconstruct_keys(keys); end + + # attr_reader flags: Integer + # + # source://yarp//lib/yarp/node.rb#3368 + def flags; end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#3403 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#3359 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/yarp/node.rb#3362 + def parts; end + + # source://yarp//lib/yarp/node.rb#3384 + def set_newline_flag(newline_marked); end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3417 +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#3428 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3436 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3446 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#3464 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#3425 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3446 + 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#3454 + def deconstruct_keys(keys); end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#3459 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#3419 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/yarp/node.rb#3422 + def parts; end + + # source://yarp//lib/yarp/node.rb#3440 + def set_newline_flag(newline_marked); end +end + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3473 +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#3484 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3492 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3502 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#3520 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#3481 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3502 + 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#3510 + def deconstruct_keys(keys); end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#3515 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#3475 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/yarp/node.rb#3478 + def parts; end + + # source://yarp//lib/yarp/node.rb#3496 + def set_newline_flag(newline_marked); end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3529 +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#3540 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3548 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3558 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#3576 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#3537 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3558 + 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#3566 + def deconstruct_keys(keys); end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#3571 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#3531 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/yarp/node.rb#3534 + def parts; end + + # source://yarp//lib/yarp/node.rb#3552 + 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#3585 +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#3590 + def initialize(elements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3596 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3602 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3602 + 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#3610 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/yarp/node.rb#3587 + def elements; 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#3624 +class YARP::KeywordParameterNode < ::YARP::Node + # def initialize: (name_loc: Location, value: Node?, location: Location) -> void + # + # @return [KeywordParameterNode] a new instance of KeywordParameterNode + # + # source://yarp//lib/yarp/node.rb#3632 + def initialize(name_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3639 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3645 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3645 + 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#3653 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#3658 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3626 + def name_loc; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#3629 + 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#3668 +class YARP::KeywordRestParameterNode < ::YARP::Node + # def initialize: (operator_loc: Location, name_loc: Location?, location: Location) -> void + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://yarp//lib/yarp/node.rb#3676 + def initialize(operator_loc, name_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3683 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3689 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3689 + 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#3697 + def deconstruct_keys(keys); end + + # def name: () -> String? + # + # source://yarp//lib/yarp/node.rb#3707 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/yarp/node.rb#3673 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#3702 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#3670 + def operator_loc; end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3716 +class YARP::LambdaNode < ::YARP::Node + # def initialize: (locals: Array[Symbol], opening_loc: Location, parameters: Node?, statements: Node?, location: Location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://yarp//lib/yarp/node.rb#3730 + def initialize(locals, opening_loc, parameters, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3739 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3745 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3745 + 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#3753 + def deconstruct_keys(keys); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/yarp/node.rb#3718 + def locals; end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#3758 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#3721 + def opening_loc; end + + # attr_reader parameters: Node? + # + # source://yarp//lib/yarp/node.rb#3724 + def parameters; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#3727 + def statements; 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#546 + def initialize(source, filepath = T.unsafe(nil)); end + + # Returns the value of attribute filepath. + # + # source://yarp//lib/yarp/lex_compat.rb#544 + def filepath; end + + # source://yarp//lib/yarp/lex_compat.rb#551 + def result; end + + # Returns the value of attribute source. + # + # source://yarp//lib/yarp/lex_compat.rb#544 + def source; end +end + +# It is extremely non obvious which state the parser is in when comments get +# dispatched. Because of this we don't both comparing state when comparing +# against other comment tokens. +# +# source://yarp//lib/yarp/lex_compat.rb#214 +class YARP::LexCompat::CommentToken < ::YARP::LexCompat::Token + # source://yarp//lib/yarp/lex_compat.rb#215 + def ==(other); 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#258 +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#532 + 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#282 +class YARP::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://yarp//lib/yarp/lex_compat.rb#285 + def initialize(split); end + + # source://yarp//lib/yarp/lex_compat.rb#290 + def <<(token); end + + # Returns the value of attribute split. + # + # source://yarp//lib/yarp/lex_compat.rb#283 + def split; end + + # source://yarp//lib/yarp/lex_compat.rb#294 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/yarp/lex_compat.rb#283 + 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#341 +class YARP::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://yarp//lib/yarp/lex_compat.rb#346 + 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#356 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://yarp//lib/yarp/lex_compat.rb#344 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://yarp//lib/yarp/lex_compat.rb#344 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://yarp//lib/yarp/lex_compat.rb#344 + def embexpr_balance; end + + # source://yarp//lib/yarp/lex_compat.rb#388 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/yarp/lex_compat.rb#344 + def tokens; end +end + +# source://yarp//lib/yarp/lex_compat.rb#342 +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#263 +class YARP::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://yarp//lib/yarp/lex_compat.rb#266 + def initialize; end + + # source://yarp//lib/yarp/lex_compat.rb#270 + def <<(token); end + + # source://yarp//lib/yarp/lex_compat.rb#274 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/yarp/lex_compat.rb#264 + def tokens; end +end + +# Heredoc end tokens are emitted in an odd order, so we don't compare the +# state on them. +# +# source://yarp//lib/yarp/lex_compat.rb#222 +class YARP::LexCompat::HeredocEndToken < ::YARP::LexCompat::Token + # source://yarp//lib/yarp/lex_compat.rb#223 + def ==(other); 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#232 +class YARP::LexCompat::IdentToken < ::YARP::LexCompat::Token + # source://yarp//lib/yarp/lex_compat.rb#233 + 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#243 +class YARP::LexCompat::IgnoredNewlineToken < ::YARP::LexCompat::Token + # source://yarp//lib/yarp/lex_compat.rb#244 + 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#3767 +class YARP::LocalVariableOperatorAndWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, constant_id: Symbol, location: Location) -> void + # + # @return [LocalVariableOperatorAndWriteNode] a new instance of LocalVariableOperatorAndWriteNode + # + # source://yarp//lib/yarp/node.rb#3781 + def initialize(name_loc, operator_loc, value, constant_id, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3790 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3796 + def child_nodes; end + + # attr_reader constant_id: Symbol + # + # source://yarp//lib/yarp/node.rb#3778 + def constant_id; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3796 + 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#3804 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#3809 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3769 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#3814 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#3772 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#3775 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3823 +class YARP::LocalVariableOperatorOrWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, constant_id: Symbol, location: Location) -> void + # + # @return [LocalVariableOperatorOrWriteNode] a new instance of LocalVariableOperatorOrWriteNode + # + # source://yarp//lib/yarp/node.rb#3837 + def initialize(name_loc, operator_loc, value, constant_id, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3846 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3852 + def child_nodes; end + + # attr_reader constant_id: Symbol + # + # source://yarp//lib/yarp/node.rb#3834 + def constant_id; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3852 + 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 + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#3865 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3825 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#3870 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#3828 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#3831 + def value; end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3879 +class YARP::LocalVariableOperatorWriteNode < ::YARP::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, constant_id: Symbol, operator_id: Symbol, location: Location) -> void + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://yarp//lib/yarp/node.rb#3896 + def initialize(name_loc, operator_loc, value, constant_id, operator_id, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3906 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3912 + def child_nodes; end + + # attr_reader constant_id: Symbol + # + # source://yarp//lib/yarp/node.rb#3890 + def constant_id; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3912 + 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#3920 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#3925 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3881 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#3930 + def operator; end + + # attr_reader operator_id: Symbol + # + # source://yarp//lib/yarp/node.rb#3893 + def operator_id; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#3884 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#3887 + 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#3941 +class YARP::LocalVariableReadNode < ::YARP::Node + # def initialize: (constant_id: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://yarp//lib/yarp/node.rb#3949 + def initialize(constant_id, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#3956 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3962 + def child_nodes; end + + # attr_reader constant_id: Symbol + # + # source://yarp//lib/yarp/node.rb#3943 + def constant_id; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#3962 + 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#3970 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/yarp/node.rb#3946 + def depth; end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#3979 +class YARP::LocalVariableWriteNode < ::YARP::Node + # def initialize: (constant_id: Symbol, depth: Integer, value: Node?, name_loc: Location, operator_loc: Location?, location: Location) -> void + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://yarp//lib/yarp/node.rb#3996 + def initialize(constant_id, depth, value, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4006 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4012 + def child_nodes; end + + # attr_reader constant_id: Symbol + # + # source://yarp//lib/yarp/node.rb#3981 + def constant_id; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4012 + 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#4020 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/yarp/node.rb#3984 + def depth; end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#4025 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#3990 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#4030 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#3993 + def operator_loc; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#3987 + def value; end +end + +# This represents a location in the source. +# +# source://yarp//lib/yarp.rb#29 +class YARP::Location + # @return [Location] a new instance of Location + # + # source://yarp//lib/yarp.rb#41 + def initialize(source, start_offset, length); end + + # source://yarp//lib/yarp.rb#91 + def ==(other); end + + # source://yarp//lib/yarp.rb#83 + 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#79 + def end_column; end + + # The line number where this location ends. + # + # source://yarp//lib/yarp.rb#67 + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # source://yarp//lib/yarp.rb#57 + def end_offset; end + + # source://yarp//lib/yarp.rb#47 + def inspect; end + + # The length of this location in bytes. + # + # source://yarp//lib/yarp.rb#39 + def length; end + + # source://yarp//lib/yarp.rb#87 + def pretty_print(q); end + + # The source code that this location represents. + # + # source://yarp//lib/yarp.rb#52 + def slice; end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://yarp//lib/yarp.rb#73 + def start_column; end + + # The line number where this location starts. + # + # source://yarp//lib/yarp.rb#62 + def start_line; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # source://yarp//lib/yarp.rb#36 + def start_offset; end + + private + + # Returns the value of attribute source. + # + # source://yarp//lib/yarp.rb#32 + def source; end + + class << self + # source://yarp//lib/yarp.rb#97 + def null; end + end +end + +# source://yarp//lib/yarp/node.rb#6366 +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#6368 +YARP::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4039 +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#4050 + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4058 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4064 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4064 + 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#4072 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#4077 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#4047 + def operator_loc; end + + # attr_reader pattern: Node + # + # source://yarp//lib/yarp/node.rb#4044 + def pattern; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#4041 + def value; end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4086 +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#4097 + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4105 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4111 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4111 + 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#4119 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#4124 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#4094 + def operator_loc; end + + # attr_reader pattern: Node + # + # source://yarp//lib/yarp/node.rb#4091 + def pattern; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#4088 + def value; end +end + +# Represents a node that is missing from the source and results in a syntax +# error. +# +# source://yarp//lib/yarp/node.rb#4131 +class YARP::MissingNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # source://yarp//lib/yarp/node.rb#4133 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4138 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4144 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4144 + 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#4152 + def deconstruct_keys(keys); end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4161 +class YARP::ModuleNode < ::YARP::Node + # def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, statements: Node?, end_keyword_loc: Location, location: Location) -> void + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://yarp//lib/yarp/node.rb#4178 + def initialize(locals, module_keyword_loc, constant_path, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4188 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4194 + def child_nodes; end + + # attr_reader constant_path: Node + # + # source://yarp//lib/yarp/node.rb#4169 + def constant_path; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4194 + 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#4202 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#4212 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#4175 + def end_keyword_loc; end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/yarp/node.rb#4163 + def locals; end + + # def module_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#4207 + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#4166 + def module_keyword_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#4172 + def statements; end +end + +# Represents a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4221 +class YARP::MultiWriteNode < ::YARP::Node + # def initialize: (targets: Array[Node], operator_loc: Location?, value: Node?, lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://yarp//lib/yarp/node.rb#4238 + def initialize(targets, operator_loc, value, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4248 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4254 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4254 + 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#4262 + def deconstruct_keys(keys); end + + # def lparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#4272 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#4232 + def lparen_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#4267 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#4226 + def operator_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#4277 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#4235 + def rparen_loc; end + + # attr_reader targets: Array[Node] + # + # source://yarp//lib/yarp/node.rb#4223 + def targets; end + + # attr_reader value: Node? + # + # source://yarp//lib/yarp/node.rb#4229 + def value; end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4286 +class YARP::NextNode < ::YARP::Node + # def initialize: (arguments: Node?, keyword_loc: Location, location: Location) -> void + # + # @return [NextNode] a new instance of NextNode + # + # source://yarp//lib/yarp/node.rb#4294 + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4301 + def accept(visitor); end + + # attr_reader arguments: Node? + # + # source://yarp//lib/yarp/node.rb#4288 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4307 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4307 + 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#4315 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#4320 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#4291 + def keyword_loc; end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://yarp//lib/yarp/node.rb#4329 +class YARP::NilNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [NilNode] a new instance of NilNode + # + # source://yarp//lib/yarp/node.rb#4331 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4336 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4342 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4342 + 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#4350 + def deconstruct_keys(keys); end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://yarp//lib/yarp/node.rb#4360 +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#4368 + def initialize(operator_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4375 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4381 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4381 + 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#4389 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#4399 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#4365 + def keyword_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#4394 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#4362 + def operator_loc; end +end + +# This represents a node in the tree. +# +# source://yarp//lib/yarp.rb#267 +class YARP::Node + # Returns the value of attribute location. + # + # source://yarp//lib/yarp.rb#268 + def location; end + + # @return [Boolean] + # + # source://yarp//lib/yarp.rb#270 + def newline?; end + + # source://yarp//lib/yarp.rb#282 + def pretty_print(q); end + + # source://yarp//lib/yarp.rb#274 + def set_newline_flag(newline_marked); end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://yarp//lib/yarp/node.rb#4408 +class YARP::NumberedReferenceReadNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://yarp//lib/yarp/node.rb#4410 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4415 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4421 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4421 + 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#4429 + def deconstruct_keys(keys); end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://yarp//lib/yarp/node.rb#4439 +class YARP::OptionalParameterNode < ::YARP::Node + # def initialize: (constant_id: 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#4453 + def initialize(constant_id, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4462 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4468 + def child_nodes; end + + # attr_reader constant_id: Symbol + # + # source://yarp//lib/yarp/node.rb#4441 + def constant_id; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4468 + 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#4476 + def deconstruct_keys(keys); end + + # def name: () -> String + # + # source://yarp//lib/yarp/node.rb#4481 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/yarp/node.rb#4444 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#4486 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#4447 + def operator_loc; end + + # attr_reader value: Node + # + # source://yarp//lib/yarp/node.rb#4450 + def value; end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4495 +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#4506 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4514 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4520 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4520 + 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#4528 + def deconstruct_keys(keys); end + + # attr_reader left: Node + # + # source://yarp//lib/yarp/node.rb#4497 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#4533 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#4503 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/yarp/node.rb#4500 + 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#4543 +class YARP::ParametersNode < ::YARP::Node + # def initialize: (requireds: Array[Node], optionals: Array[Node], posts: Array[Node], rest: Node?, keywords: Array[Node], keyword_rest: Node?, block: Node?, location: Location) -> void + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://yarp//lib/yarp/node.rb#4566 + def initialize(requireds, optionals, posts, rest, keywords, keyword_rest, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4578 + def accept(visitor); end + + # attr_reader block: Node? + # + # source://yarp//lib/yarp/node.rb#4563 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4584 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4584 + 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#4592 + def deconstruct_keys(keys); end + + # attr_reader keyword_rest: Node? + # + # source://yarp//lib/yarp/node.rb#4560 + def keyword_rest; end + + # attr_reader keywords: Array[Node] + # + # source://yarp//lib/yarp/node.rb#4557 + def keywords; end + + # attr_reader optionals: Array[Node] + # + # source://yarp//lib/yarp/node.rb#4548 + def optionals; end + + # attr_reader posts: Array[Node] + # + # source://yarp//lib/yarp/node.rb#4551 + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/yarp/node.rb#4545 + def requireds; end + + # attr_reader rest: Node? + # + # source://yarp//lib/yarp/node.rb#4554 + def rest; end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4601 +class YARP::ParenthesesNode < ::YARP::Node + # def initialize: (statements: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://yarp//lib/yarp/node.rb#4612 + def initialize(statements, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4620 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4629 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#4647 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#4609 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4629 + 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#4637 + def deconstruct_keys(keys); end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#4642 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#4606 + def opening_loc; end + + # source://yarp//lib/yarp/node.rb#4624 + def set_newline_flag(newline_marked); end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#4603 + def statements; end +end + +# This represents an error that was encountered during parsing. +# +# source://yarp//lib/yarp.rb#117 +class YARP::ParseError + # @return [ParseError] a new instance of ParseError + # + # source://yarp//lib/yarp.rb#120 + def initialize(message, location); end + + # source://yarp//lib/yarp.rb#125 + def deconstruct_keys(keys); end + + # Returns the value of attribute location. + # + # source://yarp//lib/yarp.rb#118 + def location; end + + # Returns the value of attribute message. + # + # source://yarp//lib/yarp.rb#118 + 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#168 +class YARP::ParseResult + # @return [ParseResult] a new instance of ParseResult + # + # source://yarp//lib/yarp.rb#171 + def initialize(value, comments, errors, warnings, source); end + + # Returns the value of attribute comments. + # + # source://yarp//lib/yarp.rb#169 + def comments; end + + # source://yarp//lib/yarp.rb#179 + def deconstruct_keys(keys); end + + # Returns the value of attribute errors. + # + # source://yarp//lib/yarp.rb#169 + def errors; end + + # @return [Boolean] + # + # source://yarp//lib/yarp.rb#187 + def failure?; end + + # source://yarp//lib/yarp.rb#223 + def mark_newlines; end + + # Returns the value of attribute source. + # + # source://yarp//lib/yarp.rb#169 + def source; end + + # @return [Boolean] + # + # source://yarp//lib/yarp.rb#183 + def success?; end + + # Returns the value of attribute value. + # + # source://yarp//lib/yarp.rb#169 + def value; end + + # Returns the value of attribute warnings. + # + # source://yarp//lib/yarp.rb#169 + def warnings; end +end + +# Keep in sync with Java MarkNewlinesVisitor +# +# source://yarp//lib/yarp.rb#192 +class YARP::ParseResult::MarkNewlinesVisitor < ::YARP::Visitor + # @return [MarkNewlinesVisitor] a new instance of MarkNewlinesVisitor + # + # source://yarp//lib/yarp.rb#193 + def initialize(newline_marked); end + + # source://yarp//lib/yarp.rb#197 + def visit_block_node(node); end + + # source://yarp//lib/yarp.rb#208 + def visit_if_node(node); end + + # source://yarp//lib/yarp.rb#197 + def visit_lambda_node(node); end + + # source://yarp//lib/yarp.rb#214 + def visit_statements_node(node); end + + # source://yarp//lib/yarp.rb#208 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://yarp//lib/yarp.rb#131 +class YARP::ParseWarning + # @return [ParseWarning] a new instance of ParseWarning + # + # source://yarp//lib/yarp.rb#134 + def initialize(message, location); end + + # source://yarp//lib/yarp.rb#139 + def deconstruct_keys(keys); end + + # Returns the value of attribute location. + # + # source://yarp//lib/yarp.rb#132 + def location; end + + # Returns the value of attribute message. + # + # source://yarp//lib/yarp.rb#132 + def message; 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#4657 +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#4671 + def initialize(expression, operator_loc, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4680 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4686 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4686 + 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#4694 + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://yarp//lib/yarp/node.rb#4659 + def expression; end + + # def lparen: () -> String + # + # source://yarp//lib/yarp/node.rb#4704 + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://yarp//lib/yarp/node.rb#4665 + def lparen_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#4699 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#4662 + def operator_loc; end + + # def rparen: () -> String + # + # source://yarp//lib/yarp/node.rb#4709 + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://yarp//lib/yarp/node.rb#4668 + 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#4719 +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#4727 + def initialize(variable, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4734 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4740 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4740 + 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#4748 + def deconstruct_keys(keys); end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#4753 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#4724 + def operator_loc; end + + # attr_reader variable: Node + # + # source://yarp//lib/yarp/node.rb#4721 + def variable; end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4762 +class YARP::PostExecutionNode < ::YARP::Node + # def initialize: (statements: Node?, 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#4776 + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4785 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4791 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#4814 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#4773 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4791 + 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#4799 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#4804 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#4767 + def keyword_loc; end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#4809 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#4770 + def opening_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#4764 + def statements; end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4823 +class YARP::PreExecutionNode < ::YARP::Node + # def initialize: (statements: Node?, 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#4837 + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4846 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4852 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#4875 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#4834 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/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/yarp/node.rb#4860 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#4865 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#4828 + def keyword_loc; end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#4870 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#4831 + def opening_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#4825 + def statements; end +end + +# The top level node of any parse tree. +# +# source://yarp//lib/yarp/node.rb#4881 +class YARP::ProgramNode < ::YARP::Node + # def initialize: (locals: Array[Symbol], statements: Node, location: Location) -> void + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://yarp//lib/yarp/node.rb#4889 + def initialize(locals, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4896 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4902 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4902 + 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#4910 + def deconstruct_keys(keys); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/yarp/node.rb#4883 + def locals; end + + # attr_reader statements: Node + # + # source://yarp//lib/yarp/node.rb#4886 + def statements; end +end + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#4922 +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#4936 + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4945 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4951 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4951 + 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#4959 + def deconstruct_keys(keys); end + + # attr_reader flags: Integer + # + # source://yarp//lib/yarp/node.rb#4933 + def flags; end + + # attr_reader left: Node? + # + # source://yarp//lib/yarp/node.rb#4924 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#4964 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#4930 + def operator_loc; end + + # attr_reader right: Node? + # + # source://yarp//lib/yarp/node.rb#4927 + def right; end +end + +# source://yarp//lib/yarp/node.rb#6371 +module YARP::RangeNodeFlags; end + +# ... operator +# +# source://yarp//lib/yarp/node.rb#6373 +YARP::RangeNodeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://yarp//lib/yarp/node.rb#4973 +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#4978 + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#4984 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4990 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#4990 + 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#4998 + def deconstruct_keys(keys); end + + # attr_reader numeric: Node + # + # source://yarp//lib/yarp/node.rb#4975 + def numeric; end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://yarp//lib/yarp/node.rb#5007 +class YARP::RedoNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [RedoNode] a new instance of RedoNode + # + # source://yarp//lib/yarp/node.rb#5009 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5014 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5020 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5020 + 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#5028 + def deconstruct_keys(keys); end +end + +# source://yarp//lib/yarp/node.rb#6376 +module YARP::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://yarp//lib/yarp/node.rb#6390 +YARP::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://yarp//lib/yarp/node.rb#6387 +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#6384 +YARP::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://yarp//lib/yarp/node.rb#6378 +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#6381 +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#6399 +YARP::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://yarp//lib/yarp/node.rb#6396 +YARP::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://yarp//lib/yarp/node.rb#6393 +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#5037 +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#5054 + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5064 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5070 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#5093 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#5045 + def closing_loc; end + + # def content: () -> String + # + # source://yarp//lib/yarp/node.rb#5088 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/yarp/node.rb#5042 + def content_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5070 + 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#5078 + def deconstruct_keys(keys); end + + # attr_reader flags: Integer + # + # source://yarp//lib/yarp/node.rb#5051 + def flags; end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#5083 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#5039 + def opening_loc; end + + # attr_reader unescaped: String + # + # source://yarp//lib/yarp/node.rb#5048 + def unescaped; end +end + +# Represents a destructured required parameter node. +# +# def foo((bar, baz)) +# ^^^^^^^^^^ +# end +# +# source://yarp//lib/yarp/node.rb#5103 +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#5114 + def initialize(parameters, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5122 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5128 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#5146 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#5111 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5128 + 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#5136 + def deconstruct_keys(keys); end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#5141 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#5108 + def opening_loc; end + + # attr_reader parameters: Array[Node] + # + # source://yarp//lib/yarp/node.rb#5105 + 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#5156 +class YARP::RequiredParameterNode < ::YARP::Node + # def initialize: (constant_id: Symbol, location: Location) -> void + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://yarp//lib/yarp/node.rb#5161 + def initialize(constant_id, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5167 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5173 + def child_nodes; end + + # attr_reader constant_id: Symbol + # + # source://yarp//lib/yarp/node.rb#5158 + def constant_id; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5173 + 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#5181 + def deconstruct_keys(keys); end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5190 +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#5201 + def initialize(expression, keyword_loc, rescue_expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5209 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5218 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5218 + 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#5226 + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://yarp//lib/yarp/node.rb#5192 + def expression; end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#5231 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#5195 + def keyword_loc; end + + # attr_reader rescue_expression: Node + # + # source://yarp//lib/yarp/node.rb#5198 + def rescue_expression; end + + # source://yarp//lib/yarp/node.rb#5213 + 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#5246 +class YARP::RescueNode < ::YARP::Node + # def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: Node?, consequent: Node?, location: Location) -> void + # + # @return [RescueNode] a new instance of RescueNode + # + # source://yarp//lib/yarp/node.rb#5266 + def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5277 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5283 + def child_nodes; end + + # attr_reader consequent: Node? + # + # source://yarp//lib/yarp/node.rb#5263 + def consequent; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5283 + 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#5291 + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Node] + # + # source://yarp//lib/yarp/node.rb#5251 + def exceptions; end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#5296 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#5248 + def keyword_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/yarp/node.rb#5301 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/yarp/node.rb#5254 + def operator_loc; end + + # attr_reader reference: Node? + # + # source://yarp//lib/yarp/node.rb#5257 + def reference; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#5260 + 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#5311 +class YARP::RestParameterNode < ::YARP::Node + # def initialize: (operator_loc: Location, name_loc: Location?, location: Location) -> void + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://yarp//lib/yarp/node.rb#5319 + def initialize(operator_loc, name_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5326 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5332 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5332 + 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#5340 + def deconstruct_keys(keys); end + + # def name: () -> String? + # + # source://yarp//lib/yarp/node.rb#5350 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/yarp/node.rb#5316 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#5345 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#5313 + def operator_loc; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://yarp//lib/yarp/node.rb#5359 +class YARP::RetryNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # source://yarp//lib/yarp/node.rb#5361 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5366 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5372 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5372 + 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#5380 + def deconstruct_keys(keys); end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5389 +class YARP::ReturnNode < ::YARP::Node + # def initialize: (keyword_loc: Location, arguments: Node?, location: Location) -> void + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://yarp//lib/yarp/node.rb#5397 + def initialize(keyword_loc, arguments, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5404 + def accept(visitor); end + + # attr_reader arguments: Node? + # + # source://yarp//lib/yarp/node.rb#5394 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5410 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5410 + 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#5418 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#5423 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#5391 + 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#5432 +class YARP::SelfNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [SelfNode] a new instance of SelfNode + # + # source://yarp//lib/yarp/node.rb#5434 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5439 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5445 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5445 + 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#5453 + def deconstruct_keys(keys); end +end + +# source://yarp//lib/yarp/serialize.rb#22 +module YARP::Serialize + class << self + # source://yarp//lib/yarp/serialize.rb#23 + def load(input, serialized); end + end +end + +# source://yarp//lib/yarp/serialize.rb#30 +class YARP::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://yarp//lib/yarp/serialize.rb#34 + def initialize(input, serialized, io); end + + # Returns the value of attribute constant_pool. + # + # source://yarp//lib/yarp/serialize.rb#32 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://yarp//lib/yarp/serialize.rb#32 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://yarp//lib/yarp/serialize.rb#31 + def encoding; end + + # Returns the value of attribute input. + # + # source://yarp//lib/yarp/serialize.rb#31 + def input; end + + # Returns the value of attribute io. + # + # source://yarp//lib/yarp/serialize.rb#31 + def io; end + + # source://yarp//lib/yarp/serialize.rb#49 + def load; end + + # Returns the value of attribute serialized. + # + # source://yarp//lib/yarp/serialize.rb#31 + def serialized; end + + # Returns the value of attribute source. + # + # source://yarp//lib/yarp/serialize.rb#32 + def source; end + + private + + # source://yarp//lib/yarp/serialize.rb#108 + def load_constant; end + + # source://yarp//lib/yarp/serialize.rb#100 + def load_location; end + + # source://yarp//lib/yarp/serialize.rb#125 + def load_node; end + + # source://yarp//lib/yarp/serialize.rb#104 + def load_optional_location; end + + # source://yarp//lib/yarp/serialize.rb#89 + def load_optional_node; end + + # source://yarp//lib/yarp/serialize.rb#85 + def load_serialized_length; end + + # source://yarp//lib/yarp/serialize.rb#96 + 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#71 + def load_varint; end +end + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5462 +class YARP::SingletonClassNode < ::YARP::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, statements: Node?, end_keyword_loc: Location, location: Location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://yarp//lib/yarp/node.rb#5482 + def initialize(locals, class_keyword_loc, operator_loc, expression, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5493 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5499 + def child_nodes; end + + # def class_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#5512 + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#5467 + def class_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5499 + 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#5507 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#5522 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#5479 + def end_keyword_loc; end + + # attr_reader expression: Node + # + # source://yarp//lib/yarp/node.rb#5473 + def expression; end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/yarp/node.rb#5464 + def locals; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#5517 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#5470 + def operator_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#5476 + def statements; 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); end + + # source://yarp//lib/yarp.rb#23 + def column(value); end + + # source://yarp//lib/yarp.rb#19 + def line(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 +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5531 +class YARP::SourceEncodingNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://yarp//lib/yarp/node.rb#5533 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5538 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5544 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5544 + 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#5552 + def deconstruct_keys(keys); end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5561 +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#5566 + def initialize(filepath, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5572 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5578 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5578 + 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#5586 + def deconstruct_keys(keys); end + + # attr_reader filepath: String + # + # source://yarp//lib/yarp/node.rb#5563 + def filepath; end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5595 +class YARP::SourceLineNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://yarp//lib/yarp/node.rb#5597 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5602 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5608 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5608 + 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#5616 + def deconstruct_keys(keys); end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://yarp//lib/yarp/node.rb#5625 +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#5633 + def initialize(operator_loc, expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5640 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5646 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5646 + 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#5654 + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://yarp//lib/yarp/node.rb#5630 + def expression; end + + # def operator: () -> String + # + # source://yarp//lib/yarp/node.rb#5659 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/yarp/node.rb#5627 + def operator_loc; end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5668 +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#5673 + def initialize(body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5679 + def accept(visitor); end + + # attr_reader body: Array[Node] + # + # source://yarp//lib/yarp/node.rb#5670 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5685 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5685 + 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#5693 + def deconstruct_keys(keys); end +end + +# Represents the use of compile-time string concatenation. +# +# "foo" "bar" +# ^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5702 +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#5710 + def initialize(left, right, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5717 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5723 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5723 + 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#5731 + def deconstruct_keys(keys); end + + # attr_reader left: Node + # + # source://yarp//lib/yarp/node.rb#5704 + def left; end + + # attr_reader right: Node + # + # source://yarp//lib/yarp/node.rb#5707 + def right; end +end + +# 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#5747 +class YARP::StringNode < ::YARP::Node + # def initialize: (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#5761 + def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5770 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5776 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#5799 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#5755 + def closing_loc; end + + # def content: () -> String + # + # source://yarp//lib/yarp/node.rb#5794 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/yarp/node.rb#5752 + def content_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5776 + 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#5784 + def deconstruct_keys(keys); end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#5789 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#5749 + def opening_loc; end + + # attr_reader unescaped: String + # + # source://yarp//lib/yarp/node.rb#5758 + def unescaped; end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5811 +class YARP::SuperNode < ::YARP::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: Node?, rparen_loc: Location?, block: Node?, location: Location) -> void + # + # @return [SuperNode] a new instance of SuperNode + # + # source://yarp//lib/yarp/node.rb#5828 + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5838 + def accept(visitor); end + + # attr_reader arguments: Node? + # + # source://yarp//lib/yarp/node.rb#5819 + def arguments; end + + # attr_reader block: Node? + # + # source://yarp//lib/yarp/node.rb#5825 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5844 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5844 + 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#5852 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#5857 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#5813 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#5862 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#5816 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#5867 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#5822 + 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#5879 +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#5893 + def initialize(opening_loc, value_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5902 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5908 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/yarp/node.rb#5931 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/yarp/node.rb#5887 + def closing_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5908 + 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#5916 + def deconstruct_keys(keys); end + + # def opening: () -> String? + # + # source://yarp//lib/yarp/node.rb#5921 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/yarp/node.rb#5881 + def opening_loc; end + + # attr_reader unescaped: String + # + # source://yarp//lib/yarp/node.rb#5890 + def unescaped; end + + # def value: () -> String + # + # source://yarp//lib/yarp/node.rb#5926 + def value; end + + # attr_reader value_loc: Location + # + # source://yarp//lib/yarp/node.rb#5884 + def value_loc; end +end + +# This represents a token from the Ruby source. +# +# source://yarp//lib/yarp.rb#232 +class YARP::Token + # @return [Token] a new instance of Token + # + # source://yarp//lib/yarp.rb#235 + def initialize(type, value, location); end + + # source://yarp//lib/yarp.rb#259 + def ==(other); end + + # source://yarp//lib/yarp.rb#241 + def deconstruct_keys(keys); end + + # Returns the value of attribute location. + # + # source://yarp//lib/yarp.rb#233 + def location; end + + # source://yarp//lib/yarp.rb#245 + def pretty_print(q); end + + # Returns the value of attribute type. + # + # source://yarp//lib/yarp.rb#233 + def type; end + + # Returns the value of attribute value. + # + # source://yarp//lib/yarp.rb#233 + def value; end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://yarp//lib/yarp/node.rb#5940 +class YARP::TrueNode < ::YARP::Node + # def initialize: (location: Location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # source://yarp//lib/yarp/node.rb#5942 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5947 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5953 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5953 + 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#5961 + def deconstruct_keys(keys); end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#5970 +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#5978 + def initialize(names, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#5985 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5991 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#5991 + 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#5999 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#6004 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#5975 + def keyword_loc; end + + # attr_reader names: Array[Node] + # + # source://yarp//lib/yarp/node.rb#5972 + 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#6016 +class YARP::UnlessNode < ::YARP::Node + # def initialize: (keyword_loc: Location, predicate: Node, statements: Node?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://yarp//lib/yarp/node.rb#6033 + def initialize(keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#6043 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6052 + def child_nodes; end + + # attr_reader consequent: Node? + # + # source://yarp//lib/yarp/node.rb#6027 + def consequent; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6052 + 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#6060 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://yarp//lib/yarp/node.rb#6070 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/yarp/node.rb#6030 + def end_keyword_loc; end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#6065 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#6018 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/yarp/node.rb#6021 + def predicate; end + + # source://yarp//lib/yarp/node.rb#6047 + def set_newline_flag(newline_marked); end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#6024 + 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#6082 +class YARP::UntilNode < ::YARP::Node + # def initialize: (keyword_loc: Location, predicate: Node, statements: Node?, flags: Integer, location: Location) -> void + # + # @return [UntilNode] a new instance of UntilNode + # + # source://yarp//lib/yarp/node.rb#6096 + def initialize(keyword_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#6105 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6114 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6114 + 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#6122 + def deconstruct_keys(keys); end + + # attr_reader flags: Integer + # + # source://yarp//lib/yarp/node.rb#6093 + def flags; end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#6127 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#6084 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/yarp/node.rb#6087 + def predicate; end + + # source://yarp//lib/yarp/node.rb#6109 + def set_newline_flag(newline_marked); end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#6090 + def statements; end +end + +YARP::VERSION = T.let(T.unsafe(nil), String) + +# source://yarp//lib/yarp.rb#162 +class YARP::Visitor < ::YARP::BasicVisitor + # Visit a AliasNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_alias_node(node); end + + # Visit a AlternationPatternNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_block_argument_node(node); end + + # Visit a BlockNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_break_node(node); end + + # Visit a CallNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_call_node(node); end + + # Visit a CallOperatorAndWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_call_operator_and_write_node(node); end + + # Visit a CallOperatorOrWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_call_operator_or_write_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_call_operator_write_node(node); end + + # Visit a CapturePatternNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_capture_pattern_node(node); end + + # Visit a CaseNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_class_node(node); end + + # Visit a ClassVariableOperatorAndWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_class_variable_operator_and_write_node(node); end + + # Visit a ClassVariableOperatorOrWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_class_variable_operator_or_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_class_variable_write_node(node); end + + # Visit a ConstantOperatorAndWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_operator_and_write_node(node); end + + # Visit a ConstantOperatorOrWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_operator_or_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorAndWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_path_operator_and_write_node(node); end + + # Visit a ConstantPathOperatorOrWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_path_operator_or_write_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_read_node(node); end + + # Visit a ConstantWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_find_pattern_node(node); end + + # Visit a FloatNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableOperatorAndWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_global_variable_operator_and_write_node(node); end + + # Visit a GlobalVariableOperatorOrWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_global_variable_operator_or_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_imaginary_node(node); end + + # Visit a InNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_in_node(node); end + + # Visit a InstanceVariableOperatorAndWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_instance_variable_operator_and_write_node(node); end + + # Visit a InstanceVariableOperatorOrWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_instance_variable_operator_or_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_integer_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_keyword_hash_node(node); end + + # Visit a KeywordParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_keyword_parameter_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_lambda_node(node); end + + # Visit a LocalVariableOperatorAndWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_local_variable_operator_and_write_node(node); end + + # Visit a LocalVariableOperatorOrWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_local_variable_operator_or_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_local_variable_write_node(node); end + + # Visit a MatchPredicateNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_match_required_node(node); end + + # Visit a MissingNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_module_node(node); end + + # Visit a MultiWriteNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_regular_expression_node(node); end + + # Visit a RequiredDestructuredParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_required_destructured_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_self_node(node); end + + # Visit a SingletonClassNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_statements_node(node); end + + # Visit a StringConcatNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_string_concat_node(node); end + + # Visit a StringNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://yarp//lib/yarp.rb#157 + def visit_yield_node(node); end +end + +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://yarp//lib/yarp/node.rb#6136 +class YARP::WhenNode < ::YARP::Node + # def initialize: (keyword_loc: Location, conditions: Array[Node], statements: Node?, location: Location) -> void + # + # @return [WhenNode] a new instance of WhenNode + # + # source://yarp//lib/yarp/node.rb#6147 + def initialize(keyword_loc, conditions, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#6155 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6161 + def child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://yarp//lib/yarp/node.rb#6141 + def conditions; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6161 + 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#6169 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#6174 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#6138 + def keyword_loc; end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#6144 + 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#6186 +class YARP::WhileNode < ::YARP::Node + # def initialize: (keyword_loc: Location, predicate: Node, statements: Node?, flags: Integer, location: Location) -> void + # + # @return [WhileNode] a new instance of WhileNode + # + # source://yarp//lib/yarp/node.rb#6200 + def initialize(keyword_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#6209 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6218 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6218 + 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#6226 + def deconstruct_keys(keys); end + + # attr_reader flags: Integer + # + # source://yarp//lib/yarp/node.rb#6197 + def flags; end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#6231 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#6188 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/yarp/node.rb#6191 + def predicate; end + + # source://yarp//lib/yarp/node.rb#6213 + def set_newline_flag(newline_marked); end + + # attr_reader statements: Node? + # + # source://yarp//lib/yarp/node.rb#6194 + def statements; end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://yarp//lib/yarp/node.rb#6240 +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#6254 + def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#6263 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6269 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/yarp/node.rb#6292 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/yarp/node.rb#6248 + def closing_loc; end + + # def content: () -> String + # + # source://yarp//lib/yarp/node.rb#6287 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/yarp/node.rb#6245 + def content_loc; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6269 + 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#6277 + def deconstruct_keys(keys); end + + # def opening: () -> String + # + # source://yarp//lib/yarp/node.rb#6282 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/yarp/node.rb#6242 + def opening_loc; end + + # attr_reader unescaped: String + # + # source://yarp//lib/yarp/node.rb#6251 + def unescaped; end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://yarp//lib/yarp/node.rb#6301 +class YARP::YieldNode < ::YARP::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: Node?, rparen_loc: Location?, location: Location) -> void + # + # @return [YieldNode] a new instance of YieldNode + # + # source://yarp//lib/yarp/node.rb#6315 + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/yarp/node.rb#6324 + def accept(visitor); end + + # attr_reader arguments: Node? + # + # source://yarp//lib/yarp/node.rb#6309 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6330 + def child_nodes; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/yarp/node.rb#6330 + 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#6338 + def deconstruct_keys(keys); end + + # def keyword: () -> String + # + # source://yarp//lib/yarp/node.rb#6343 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/yarp/node.rb#6303 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#6348 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#6306 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/yarp/node.rb#6353 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/yarp/node.rb#6312 + def rparen_loc; end +end diff --git a/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb index a0e288deb..3a93b02db 100644 --- a/sorbet/tapioca/require.rb +++ b/sorbet/tapioca/require.rb @@ -8,3 +8,4 @@ require "syntax_tree/cli" require "mocha/minitest" require "rubocop/minitest/assert_offense" +require "yarp" From 5b01de6994f050dc6b39aeeceacb27cf6a391e05 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 9 Aug 2023 16:48:20 -0400 Subject: [PATCH 2/6] Configure RuboCop and tests to pick up the indexer --- .rubocop.yml | 2 ++ Rakefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index b1491f711..2ee0c6055 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -32,6 +32,7 @@ Sorbet/TrueSigil: Enabled: true Include: - "test/**/*.rb" + - "lib/ruby_indexer/test/**/*.rb" Exclude: - "**/*.rake" - "lib/**/*.rb" @@ -43,6 +44,7 @@ Sorbet/StrictSigil: Exclude: - "**/*.rake" - "test/**/*.rb" + - "lib/ruby_indexer/test/**/*.rb" - "lib/ruby-lsp.rb" Style/StderrPuts: diff --git a/Rakefile b/Rakefile index d07111450..21cceda54 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"] + t.test_files = FileList["test/**/*_test.rb", "lib/ruby_indexer/test/**/*_test.rb"] end RDoc::Task.new do |rdoc| From 01f3f8b0ad7ca708e4d1184223de4cacb7021863 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 9 Aug 2023 16:48:30 -0400 Subject: [PATCH 3/6] Move indexer to Ruby LSP --- .../lib/ruby_indexer/configuration.rb | 20 ++ lib/ruby_indexer/lib/ruby_indexer/index.rb | 110 ++++++++ lib/ruby_indexer/lib/ruby_indexer/visitor.rb | 91 +++++++ lib/ruby_indexer/ruby_indexer.rb | 36 +++ .../test/classes_and_modules_test.rb | 238 ++++++++++++++++++ lib/ruby_indexer/test/index_test.rb | 82 ++++++ lib/ruby_lsp/internal.rb | 2 + 7 files changed, 579 insertions(+) create mode 100644 lib/ruby_indexer/lib/ruby_indexer/configuration.rb create mode 100644 lib/ruby_indexer/lib/ruby_indexer/index.rb create mode 100644 lib/ruby_indexer/lib/ruby_indexer/visitor.rb create mode 100644 lib/ruby_indexer/ruby_indexer.rb create mode 100644 lib/ruby_indexer/test/classes_and_modules_test.rb create mode 100644 lib/ruby_indexer/test/index_test.rb diff --git a/lib/ruby_indexer/lib/ruby_indexer/configuration.rb b/lib/ruby_indexer/lib/ruby_indexer/configuration.rb new file mode 100644 index 000000000..f39ff2810 --- /dev/null +++ b/lib/ruby_indexer/lib/ruby_indexer/configuration.rb @@ -0,0 +1,20 @@ +# typed: strict +# frozen_string_literal: true + +module RubyIndexer + class Configuration + extend T::Sig + + sig { returns(T::Array[String]) } + attr_accessor :files_to_index + + sig { void } + def initialize + files_to_index = $LOAD_PATH.flat_map { |p| Dir.glob("#{p}/**/*.rb", base: p) } + files_to_index.concat(Dir.glob("#{Dir.pwd}/**/*.rb")) + files_to_index.reject! { |path| path.end_with?("_test.rb") } + + @files_to_index = T.let(files_to_index, T::Array[String]) + end + end +end diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb new file mode 100644 index 000000000..dc1271cc0 --- /dev/null +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -0,0 +1,110 @@ +# typed: strict +# frozen_string_literal: true + +module RubyIndexer + class Index + extend T::Sig + + sig { returns(T::Hash[String, T::Array[Entry]]) } + attr_reader :entries + + sig { void } + def initialize + # Holds all entries in the index using the following format: + # { + # "Foo" => [#, #], + # "Foo::Bar" => [#], + # } + @entries = T.let({}, T::Hash[String, T::Array[Entry]]) + + # Holds references to where entries where discovered so that we can easily delete them + # { + # "/my/project/foo.rb" => ["Foo"], + # "/my/project/bar.rb" => ["Foo::Bar"], + # } + @files_to_entries = T.let({}, T::Hash[String, T::Array[String]]) + end + + sig { params(path: String).void } + def delete(path) + # For each constant discovered in `path`, delete the associated entry from the index. If there are no entries + # left, delete the constant from the index. + @files_to_entries[path]&.each do |fully_qualified_name| + entries = @entries[fully_qualified_name] + next unless entries + + entries.reject! { |entry| entry.file_path == path } + @entries.delete(fully_qualified_name) if entries.empty? + end + + @files_to_entries.delete(path) + end + + sig { params(entry: Entry).void } + def <<(entry) + (@entries[entry.name] ||= []) << entry + (@files_to_entries[entry.file_path] ||= []) << entry.name + end + + sig { params(fully_qualified_name: String).returns(T.nilable(T::Array[Entry])) } + def [](fully_qualified_name) + @entries[fully_qualified_name] + end + + # Try to find the entry based on the nesting from the most specific to the least specific. For example, if we have + # the nesting as ["Foo", "Bar"] and the name as "Baz", we will try to find it in this order: + # 1. Foo::Bar::Baz + # 2. Foo::Baz + # 3. Baz + sig { params(name: String, nesting: T::Array[String]).returns(T.nilable(T::Array[Entry])) } + def resolve(name, nesting) + (nesting.length + 1).downto(0).each do |i| + prefix = T.must(nesting[0...i]).join("::") + full_name = prefix.empty? ? name : "#{prefix}::#{name}" + entries = @entries[full_name] + return entries if entries + end + + nil + end + + sig { void } + def clear + @entries.clear + end + + class Entry + extend T::Sig + + sig { returns(String) } + attr_reader :name + + sig { returns(String) } + attr_reader :file_path + + sig { returns(YARP::Location) } + attr_reader :location + + sig { returns(T::Array[String]) } + attr_reader :comments + + sig { params(name: String, file_path: String, location: YARP::Location, comments: T::Array[String]).void } + def initialize(name, file_path, location, comments) + @name = name + @file_path = file_path + @location = location + @comments = comments + end + + class Module < Entry + sig { returns(String) } + def short_name + T.must(@name.split("::").last) + end + end + + class Class < Module + end + end + end +end diff --git a/lib/ruby_indexer/lib/ruby_indexer/visitor.rb b/lib/ruby_indexer/lib/ruby_indexer/visitor.rb new file mode 100644 index 000000000..f82b52706 --- /dev/null +++ b/lib/ruby_indexer/lib/ruby_indexer/visitor.rb @@ -0,0 +1,91 @@ +# typed: strict +# frozen_string_literal: true + +module RubyIndexer + class IndexVisitor < YARP::Visitor + extend T::Sig + + sig { params(index: Index, parse_result: YARP::ParseResult, file_path: String).void } + def initialize(index, parse_result, file_path) + @index = index + @parse_result = parse_result + @file_path = file_path + @stack = T.let([], T::Array[String]) + @comments_by_line = T.let( + parse_result.comments.to_h do |c| + [c.location.start_line, c] + end, + T::Hash[Integer, YARP::Comment], + ) + + super() + end + + sig { void } + def run + visit(@parse_result.value) + end + + sig { params(node: T.nilable(YARP::Node)).void } + def visit(node) + case node + when YARP::ProgramNode, YARP::StatementsNode + visit_child_nodes(node) + when YARP::ClassNode + add_index_entry(node, Index::Entry::Class) + when YARP::ModuleNode + add_index_entry(node, Index::Entry::Module) + end + end + + # Override to avoid using `map` instead of `each` + sig { params(nodes: T::Array[T.nilable(YARP::Node)]).void } + def visit_all(nodes) + nodes.each { |node| visit(node) } + end + + private + + sig { params(node: T.any(YARP::ClassNode, YARP::ModuleNode), klass: T.class_of(Index::Entry)).void } + def add_index_entry(node, klass) + name = node.constant_path.location.slice + + unless /^[A-Z:]/.match?(name) + return visit_child_nodes(node) + end + + fully_qualified_name = name.start_with?("::") ? name : fully_qualify_name(name) + name.delete_prefix!("::") + + comments = collect_comments(node) + @index << klass.new(fully_qualified_name, @file_path, node.location, comments) + @stack << name + visit_child_nodes(node) + @stack.pop + end + + sig { params(node: YARP::Node).returns(T::Array[String]) } + def collect_comments(node) + comments = [] + + start_line = node.location.start_line - 1 + start_line -= 1 unless @comments_by_line.key?(start_line) + + start_line.downto(1) do |line| + comment = @comments_by_line[line] + break unless comment + + comments.unshift(comment.location.slice) + end + + comments + end + + sig { params(name: String).returns(String) } + def fully_qualify_name(name) + return name if @stack.empty? + + "#{@stack.join("::")}::#{name}" + end + end +end diff --git a/lib/ruby_indexer/ruby_indexer.rb b/lib/ruby_indexer/ruby_indexer.rb new file mode 100644 index 000000000..21a8763f7 --- /dev/null +++ b/lib/ruby_indexer/ruby_indexer.rb @@ -0,0 +1,36 @@ +# typed: strict +# frozen_string_literal: true + +require "ruby_indexer/lib/ruby_indexer/visitor" +require "ruby_indexer/lib/ruby_indexer/index" +require "ruby_indexer/lib/ruby_indexer/configuration" + +module RubyIndexer + class << self + extend T::Sig + + sig { params(block: T.proc.params(configuration: Configuration).void).void } + def configure(&block) + block.call(configuration) + end + + sig { returns(Configuration) } + def configuration + @configuration ||= T.let(Configuration.new, T.nilable(Configuration)) + end + + sig { params(paths: T::Array[String]).returns(Index) } + def index(paths = configuration.files_to_index) + index = Index.new + paths.each { |path| index_single(index, path) } + index + end + + sig { params(index: Index, path: String, source: T.nilable(String)).void } + def index_single(index, path, source = nil) + content = source || File.read(path) + visitor = IndexVisitor.new(index, YARP.parse(content), path) + visitor.run + end + end +end diff --git a/lib/ruby_indexer/test/classes_and_modules_test.rb b/lib/ruby_indexer/test/classes_and_modules_test.rb new file mode 100644 index 000000000..c715b4414 --- /dev/null +++ b/lib/ruby_indexer/test/classes_and_modules_test.rb @@ -0,0 +1,238 @@ +# typed: true +# frozen_string_literal: true + +require "test_helper" + +module RubyIndexer + class ClassesAndModulesTest < Minitest::Test + def setup + @index = Index.new + end + + def teardown + @index.clear + end + + def test_empty_statements_class + index(<<~RUBY) + class Foo + end + RUBY + + assert_entry("Foo", Index::Entry::Class, "/fake/path/foo.rb:0-0:1-2") + end + + def test_class_with_statements + index(<<~RUBY) + class Foo + def something; end + end + RUBY + + assert_entry("Foo", Index::Entry::Class, "/fake/path/foo.rb:0-0:2-2") + end + + def test_colon_colon_class + index(<<~RUBY) + class ::Foo + end + RUBY + + assert_entry("Foo", Index::Entry::Class, "/fake/path/foo.rb:0-0:1-2") + end + + def test_colon_colon_class_inside_class + index(<<~RUBY) + class Bar + class ::Foo + end + end + RUBY + + assert_entry("Bar", Index::Entry::Class, "/fake/path/foo.rb:0-0:3-2") + assert_entry("Foo", Index::Entry::Class, "/fake/path/foo.rb:1-2:2-4") + end + + def test_namespaced_class + index(<<~RUBY) + class Foo::Bar + end + RUBY + + assert_entry("Foo::Bar", Index::Entry::Class, "/fake/path/foo.rb:0-0:1-2") + end + + def test_dynamically_namespaced_class + index(<<~RUBY) + class self::Bar + end + RUBY + + refute_entry("self::Bar") + end + + def test_empty_statements_module + index(<<~RUBY) + module Foo + end + RUBY + + assert_entry("Foo", Index::Entry::Module, "/fake/path/foo.rb:0-0:1-2") + end + + def test_module_with_statements + index(<<~RUBY) + module Foo + def something; end + end + RUBY + + assert_entry("Foo", Index::Entry::Module, "/fake/path/foo.rb:0-0:2-2") + end + + def test_colon_colon_module + index(<<~RUBY) + module ::Foo + end + RUBY + + assert_entry("Foo", Index::Entry::Module, "/fake/path/foo.rb:0-0:1-2") + end + + def test_namespaced_module + index(<<~RUBY) + module Foo::Bar + end + RUBY + + assert_entry("Foo::Bar", Index::Entry::Module, "/fake/path/foo.rb:0-0:1-2") + end + + def test_dynamically_namespaced_module + index(<<~RUBY) + module self::Bar + end + RUBY + + refute_entry("self::Bar") + end + + def test_nested_modules_and_classes + index(<<~RUBY) + module Foo + class Bar + end + + module Baz + class Qux + class Something + end + end + end + end + RUBY + + assert_entry("Foo", Index::Entry::Module, "/fake/path/foo.rb:0-0:10-2") + assert_entry("Foo::Bar", Index::Entry::Class, "/fake/path/foo.rb:1-2:2-4") + assert_entry("Foo::Baz", Index::Entry::Module, "/fake/path/foo.rb:4-2:9-4") + assert_entry("Foo::Baz::Qux", Index::Entry::Class, "/fake/path/foo.rb:5-4:8-6") + assert_entry("Foo::Baz::Qux::Something", Index::Entry::Class, "/fake/path/foo.rb:6-6:7-8") + end + + def test_deleting_from_index_based_on_file_path + index(<<~RUBY) + class Foo + end + RUBY + + assert_entry("Foo", Index::Entry::Class, "/fake/path/foo.rb:0-0:1-2") + + @index.delete("/fake/path/foo.rb") + refute_entry("Foo") + assert_empty(@index.instance_variable_get(:@files_to_entries)) + end + + def test_comments_can_be_attached_to_a_class + index(<<~RUBY) + # This is method comment + def foo; end + # This is a Foo comment + # This is another Foo comment + class Foo + # This should not be attached + end + + # Ignore me + + # This Bar comment has 1 line padding + + class Bar; end + RUBY + + foo_entry = @index["Foo"].first + assert_equal("# This is a Foo comment\n# This is another Foo comment\n", foo_entry.comments.join) + + bar_entry = @index["Bar"].first + assert_equal("# This Bar comment has 1 line padding\n", bar_entry.comments.join) + end + + def test_comments_can_be_attached_to_a_namespaced_class + index(<<~RUBY) + # This is a Foo comment + # This is another Foo comment + class Foo + # This is a Bar comment + class Bar; end + end + RUBY + + foo_entry = @index["Foo"].first + assert_equal("# This is a Foo comment\n# This is another Foo comment\n", foo_entry.comments.join) + + bar_entry = @index["Foo::Bar"].first + assert_equal("# This is a Bar comment\n", bar_entry.comments.join) + end + + def test_comments_can_be_attached_to_a_reopened_class + index(<<~RUBY) + # This is a Foo comment + class Foo; end + + # This is another Foo comment + class Foo; end + RUBY + + first_foo_entry = @index["Foo"][0] + assert_equal("# This is a Foo comment\n", first_foo_entry.comments.join) + + second_foo_entry = @index["Foo"][1] + assert_equal("# This is another Foo comment\n", second_foo_entry.comments.join) + end + + private + + def index(source) + RubyIndexer.index_single(@index, "/fake/path/foo.rb", source) + end + + def assert_entry(expected_name, type, expected_location) + entries = @index[expected_name] + refute_empty(entries, "Expected #{expected_name} to be indexed") + + entry = entries.first + assert_instance_of(type, entry, "Expected #{expected_name} to be a #{type}") + + location = entry.location + location_string = + "#{entry.file_path}:#{location.start_line - 1}-#{location.start_column}" \ + ":#{location.end_line - 1}-#{location.end_column}" + + assert_equal(expected_location, location_string) + end + + def refute_entry(expected_name) + entries = @index[expected_name] + assert_nil(entries, "Expected #{expected_name} to not be indexed") + end + end +end diff --git a/lib/ruby_indexer/test/index_test.rb b/lib/ruby_indexer/test/index_test.rb new file mode 100644 index 000000000..b1f22b17a --- /dev/null +++ b/lib/ruby_indexer/test/index_test.rb @@ -0,0 +1,82 @@ +# typed: true +# frozen_string_literal: true + +require "test_helper" + +module RubyIndexer + class IndexTest < Minitest::Test + def setup + @index = Index.new + end + + def teardown + @index.clear + end + + def test_deleting_one_entry_for_a_class + RubyIndexer.index_single(@index, "/fake/path/foo.rb", <<~RUBY) + class Foo + end + RUBY + RubyIndexer.index_single(@index, "/fake/path/other_foo.rb", <<~RUBY) + class Foo + end + RUBY + + entries = @index["Foo"] + assert_equal(2, entries.length) + + @index.delete("/fake/path/other_foo.rb") + entries = @index["Foo"] + assert_equal(1, entries.length) + end + + def test_deleting_all_entries_for_a_class + RubyIndexer.index_single(@index, "/fake/path/foo.rb", <<~RUBY) + class Foo + end + RUBY + + entries = @index["Foo"] + assert_equal(1, entries.length) + + @index.delete("/fake/path/foo.rb") + entries = @index["Foo"] + assert_nil(entries) + end + + def test_index_resolve + RubyIndexer.index_single(@index, "/fake/path/foo.rb", <<~RUBY) + class Bar; end + + module Foo + class Bar + end + + class Baz + class Something + end + end + end + RUBY + + entries = @index.resolve("Something", ["Foo", "Baz"]) + refute_empty(entries) + assert_equal("Foo::Baz::Something", entries.first.name) + + entries = @index.resolve("Bar", ["Foo"]) + refute_empty(entries) + assert_equal("Foo::Bar", entries.first.name) + + entries = @index.resolve("Bar", ["Foo", "Baz"]) + refute_empty(entries) + assert_equal("Foo::Bar", entries.first.name) + + entries = @index.resolve("Foo::Bar", ["Foo", "Baz"]) + refute_empty(entries) + assert_equal("Foo::Bar", entries.first.name) + + assert_nil(@index.resolve("DoesNotExist", ["Foo"])) + end + end +end diff --git a/lib/ruby_lsp/internal.rb b/lib/ruby_lsp/internal.rb index 708560c11..d79e6866d 100644 --- a/lib/ruby_lsp/internal.rb +++ b/lib/ruby_lsp/internal.rb @@ -3,6 +3,7 @@ require "sorbet-runtime" require "syntax_tree" +require "yarp" require "language_server-protocol" require "benchmark" require "bundler" @@ -10,6 +11,7 @@ require "cgi" require "ruby-lsp" +require "ruby_indexer/ruby_indexer" require "core_ext/uri" require "ruby_lsp/utils" require "ruby_lsp/server" From 44155f9b6e126a97102e63ebd46d0a6f039f07e7 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 10 Aug 2023 15:06:22 -0400 Subject: [PATCH 4/6] Change files_to_entries to use entries instead of strings --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index dc1271cc0..403b7e832 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -19,22 +19,24 @@ def initialize # Holds references to where entries where discovered so that we can easily delete them # { - # "/my/project/foo.rb" => ["Foo"], - # "/my/project/bar.rb" => ["Foo::Bar"], + # "/my/project/foo.rb" => [#, #], + # "/my/project/bar.rb" => [#], # } - @files_to_entries = T.let({}, T::Hash[String, T::Array[String]]) + @files_to_entries = T.let({}, T::Hash[String, T::Array[Entry]]) end sig { params(path: String).void } def delete(path) # For each constant discovered in `path`, delete the associated entry from the index. If there are no entries # left, delete the constant from the index. - @files_to_entries[path]&.each do |fully_qualified_name| - entries = @entries[fully_qualified_name] + @files_to_entries[path]&.each do |entry| + entries = @entries[entry.name] next unless entries - entries.reject! { |entry| entry.file_path == path } - @entries.delete(fully_qualified_name) if entries.empty? + # Delete the specific entry from the list for this name + entries.delete(entry) + # If all entries were deleted, then remove the name from the hash + @entries.delete(entry.name) if entries.empty? end @files_to_entries.delete(path) @@ -43,7 +45,7 @@ def delete(path) sig { params(entry: Entry).void } def <<(entry) (@entries[entry.name] ||= []) << entry - (@files_to_entries[entry.file_path] ||= []) << entry.name + (@files_to_entries[entry.file_path] ||= []) << entry end sig { params(fully_qualified_name: String).returns(T.nilable(T::Array[Entry])) } From ab17bfb517d85b3af1d05c2d57f7dfa5b25bed04 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 10 Aug 2023 15:06:41 -0400 Subject: [PATCH 5/6] Create Entry::Namespace as parent concept for classes and modules --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 403b7e832..083a1aa62 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -98,14 +98,17 @@ def initialize(name, file_path, location, comments) @comments = comments end - class Module < Entry + class Namespace < Entry sig { returns(String) } def short_name T.must(@name.split("::").last) end end - class Class < Module + class Module < Namespace + end + + class Class < Namespace end end end From ee0d6a01e3f44b174beca5b3c15a0280dd852c7e Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 10 Aug 2023 15:09:48 -0400 Subject: [PATCH 6/6] Handle names prefixed by :: when accessing index --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 2 +- lib/ruby_indexer/test/index_test.rb | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 083a1aa62..ba8e02b3d 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -50,7 +50,7 @@ def <<(entry) sig { params(fully_qualified_name: String).returns(T.nilable(T::Array[Entry])) } def [](fully_qualified_name) - @entries[fully_qualified_name] + @entries[fully_qualified_name.delete_prefix("::")] end # Try to find the entry based on the nesting from the most specific to the least specific. For example, if we have diff --git a/lib/ruby_indexer/test/index_test.rb b/lib/ruby_indexer/test/index_test.rb index b1f22b17a..536082317 100644 --- a/lib/ruby_indexer/test/index_test.rb +++ b/lib/ruby_indexer/test/index_test.rb @@ -78,5 +78,25 @@ class Something assert_nil(@index.resolve("DoesNotExist", ["Foo"])) end + + def test_accessing_with_colon_colon_prefix + RubyIndexer.index_single(@index, "/fake/path/foo.rb", <<~RUBY) + class Bar; end + + module Foo + class Bar + end + + class Baz + class Something + end + end + end + RUBY + + entries = @index["::Foo::Baz::Something"] + refute_empty(entries) + assert_equal("Foo::Baz::Something", entries.first.name) + end end end