From b3c0df500b89da7ee1686bb9ae7690f9dc22bbe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Co=C3=AAlho?= Date: Tue, 17 Oct 2023 00:23:48 +0000 Subject: [PATCH] Update RBIs --- sorbet/rbi/gems/.gitattributes | 1 + sorbet/rbi/gems/ast@2.4.2.rbi | 584 - sorbet/rbi/gems/coderay@1.1.3.rbi | 8 - sorbet/rbi/gems/diff-lcs@1.5.0.rbi | 8 - sorbet/rbi/gems/docile@1.4.0.rbi | 376 + sorbet/rbi/gems/erubi@1.12.0.rbi | 145 + sorbet/rbi/gems/method_source@1.0.0.rbi | 8 - ...initest@5.16.2.rbi => minitest@5.20.0.rbi} | 492 +- ...arallel@1.22.1.rbi => parallel@1.23.0.rbi} | 154 +- sorbet/rbi/gems/parser@3.1.2.1.rbi | 5028 ---- ...eader@2.10.0.rbi => pdf-reader@2.11.0.rbi} | 669 +- sorbet/rbi/gems/prettier_print@1.2.1.rbi | 951 + sorbet/rbi/gems/pry@0.14.1.rbi | 8 - .../gems/{rbi@0.0.15.rbi => rbi@0.1.1.rbi} | 1355 +- sorbet/rbi/gems/simplecov-html@0.12.3.rbi | 216 + sorbet/rbi/gems/simplecov@0.22.0.rbi | 2148 ++ .../gems/simplecov_json_formatter@0.1.4.rbi | 8 + sorbet/rbi/gems/spoom@1.1.12.rbi | 2369 -- sorbet/rbi/gems/spoom@1.2.4.rbi | 3777 +++ sorbet/rbi/gems/syntax_tree@6.2.0.rbi | 23136 ++++++++++++++++ ...{tapioca@0.10.1.rbi => tapioca@0.11.9.rbi} | 1954 +- .../gems/{thor@1.2.1.rbi => thor@1.2.2.rbi} | 166 +- sorbet/rbi/gems/unparser@0.6.5.rbi | 8 - sorbet/rbi/gems/webrick@1.7.0.rbi | 2555 -- ...sorbet@0.7.0.rbi => yard-sorbet@0.8.1.rbi} | 137 +- .../gems/{yard@0.9.28.rbi => yard@0.9.34.rbi} | 1669 +- sorbet/rbi/gems/yarp@0.13.0.rbi | 21646 +++++++++++++++ 27 files changed, 56243 insertions(+), 13333 deletions(-) create mode 100644 sorbet/rbi/gems/.gitattributes delete mode 100644 sorbet/rbi/gems/ast@2.4.2.rbi delete mode 100644 sorbet/rbi/gems/coderay@1.1.3.rbi delete mode 100644 sorbet/rbi/gems/diff-lcs@1.5.0.rbi create mode 100644 sorbet/rbi/gems/docile@1.4.0.rbi create mode 100644 sorbet/rbi/gems/erubi@1.12.0.rbi delete mode 100644 sorbet/rbi/gems/method_source@1.0.0.rbi rename sorbet/rbi/gems/{minitest@5.16.2.rbi => minitest@5.20.0.rbi} (75%) rename sorbet/rbi/gems/{parallel@1.22.1.rbi => parallel@1.23.0.rbi} (59%) delete mode 100644 sorbet/rbi/gems/parser@3.1.2.1.rbi rename sorbet/rbi/gems/{pdf-reader@2.10.0.rbi => pdf-reader@2.11.0.rbi} (81%) create mode 100644 sorbet/rbi/gems/prettier_print@1.2.1.rbi delete mode 100644 sorbet/rbi/gems/pry@0.14.1.rbi rename sorbet/rbi/gems/{rbi@0.0.15.rbi => rbi@0.1.1.rbi} (71%) create mode 100644 sorbet/rbi/gems/simplecov-html@0.12.3.rbi create mode 100644 sorbet/rbi/gems/simplecov@0.22.0.rbi create mode 100644 sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi delete mode 100644 sorbet/rbi/gems/spoom@1.1.12.rbi create mode 100644 sorbet/rbi/gems/spoom@1.2.4.rbi create mode 100644 sorbet/rbi/gems/syntax_tree@6.2.0.rbi rename sorbet/rbi/gems/{tapioca@0.10.1.rbi => tapioca@0.11.9.rbi} (70%) rename sorbet/rbi/gems/{thor@1.2.1.rbi => thor@1.2.2.rbi} (97%) delete mode 100644 sorbet/rbi/gems/unparser@0.6.5.rbi delete mode 100644 sorbet/rbi/gems/webrick@1.7.0.rbi rename sorbet/rbi/gems/{yard-sorbet@0.7.0.rbi => yard-sorbet@0.8.1.rbi} (73%) rename sorbet/rbi/gems/{yard@0.9.28.rbi => yard@0.9.34.rbi} (94%) create mode 100644 sorbet/rbi/gems/yarp@0.13.0.rbi diff --git a/sorbet/rbi/gems/.gitattributes b/sorbet/rbi/gems/.gitattributes new file mode 100644 index 0000000..d9bb82a --- /dev/null +++ b/sorbet/rbi/gems/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi deleted file mode 100644 index 3fc4495..0000000 --- a/sorbet/rbi/gems/ast@2.4.2.rbi +++ /dev/null @@ -1,584 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `ast` gem. -# Please instead update this file by running `bin/tapioca gem ast`. - -# {AST} is a library for manipulating abstract syntax trees. -# -# It embraces immutability; each AST node is inherently frozen at -# creation, and updating a child node requires recreating that node -# and its every parent, recursively. -# This is a design choice. It does create some pressure on -# garbage collector, but completely eliminates all concurrency -# and aliasing problems. -# -# See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for -# additional recommendations and design patterns. -# -# source://ast//lib/ast.rb#13 -module AST; end - -# Node is an immutable class, instances of which represent abstract -# syntax tree nodes. It combines semantic information (i.e. anything -# that affects the algorithmic properties of a program) with -# meta-information (line numbers or compiler intermediates). -# -# Notes on inheritance -# ==================== -# -# The distinction between semantics and metadata is important. Complete -# semantic information should be contained within just the {#type} and -# {#children} of a Node instance; in other words, if an AST was to be -# stripped of all meta-information, it should remain a valid AST which -# could be successfully processed to yield a result with the same -# algorithmic properties. -# -# Thus, Node should never be inherited in order to define methods which -# affect or return semantic information, such as getters for `class_name`, -# `superclass` and `body` in the case of a hypothetical `ClassNode`. The -# correct solution is to use a generic Node with a {#type} of `:class` -# and three children. See also {Processor} for tips on working with such -# ASTs. -# -# On the other hand, Node can and should be inherited to define -# application-specific metadata (see also {#initialize}) or customize the -# printing format. It is expected that an application would have one or two -# such classes and use them across the entire codebase. -# -# The rationale for this pattern is extensibility and maintainability. -# Unlike static ones, dynamic languages do not require the presence of a -# predefined, rigid structure, nor does it improve dispatch efficiency, -# and while such a structure can certainly be defined, it does not add -# any value but incurs a maintaining cost. -# For example, extending the AST even with a transformation-local -# temporary node type requires making globally visible changes to -# the codebase. -# -# source://ast//lib/ast/node.rb#40 -class AST::Node - # Constructs a new instance of Node. - # - # The arguments `type` and `children` are converted with `to_sym` and - # `to_a` respectively. Additionally, the result of converting `children` - # is frozen. While mutating the arguments is generally considered harmful, - # the most common case is to pass an array literal to the constructor. If - # your code does not expect the argument to be frozen, use `#dup`. - # - # The `properties` hash is passed to {#assign_properties}. - # - # @return [Node] a new instance of Node - # - # source://ast//lib/ast/node.rb#72 - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - - # Concatenates `array` with `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#168 - def +(array); end - - # Appends `element` to `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#177 - def <<(element); end - - # Compares `self` to `other`, possibly converting with `to_ast`. Only - # `type` and `children` are compared; metadata is deliberately ignored. - # - # @return [Boolean] - # - # source://ast//lib/ast/node.rb#153 - def ==(other); end - - # Appends `element` to `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#177 - def append(element); end - - # Returns the children of this node. - # The returned value is frozen. - # The to_a alias is useful for decomposing nodes concisely. - # For example: - # - # node = s(:gasgn, :$foo, s(:integer, 1)) - # var_name, value = *node - # p var_name # => :$foo - # p value # => (integer 1) - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#56 - def children; end - - # Nodes are already frozen, so there is no harm in returning the - # current node as opposed to initializing from scratch and freezing - # another one. - # - # @return self - # - # source://ast//lib/ast/node.rb#115 - def clone; end - - # Concatenates `array` with `children` and returns the resulting node. - # - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#168 - def concat(array); end - - # Enables matching for Node, where type is the first element - # and the children are remaining items. - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#253 - def deconstruct; end - - # Nodes are already frozen, so there is no harm in returning the - # current node as opposed to initializing from scratch and freezing - # another one. - # - # @return self - # - # source://ast//lib/ast/node.rb#115 - def dup; end - - # Test if other object is equal to - # - # @param other [Object] - # @return [Boolean] - # - # source://ast//lib/ast/node.rb#85 - def eql?(other); end - - # Returns the precomputed hash value for this node - # - # @return [Fixnum] - # - # source://ast//lib/ast/node.rb#61 - def hash; end - - # Converts `self` to a s-expression ruby string. - # The code return will recreate the node, using the sexp module s() - # - # @param indent [Integer] Base indentation level. - # @return [String] - # - # source://ast//lib/ast/node.rb#211 - def inspect(indent = T.unsafe(nil)); end - - # Returns the children of this node. - # The returned value is frozen. - # The to_a alias is useful for decomposing nodes concisely. - # For example: - # - # node = s(:gasgn, :$foo, s(:integer, 1)) - # var_name, value = *node - # p var_name # => :$foo - # p value # => (integer 1) - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#56 - def to_a; end - - # @return [AST::Node] self - # - # source://ast//lib/ast/node.rb#229 - def to_ast; end - - # Converts `self` to a pretty-printed s-expression. - # - # @param indent [Integer] Base indentation level. - # @return [String] - # - # source://ast//lib/ast/node.rb#187 - def to_s(indent = T.unsafe(nil)); end - - # Converts `self` to a pretty-printed s-expression. - # - # @param indent [Integer] Base indentation level. - # @return [String] - # - # source://ast//lib/ast/node.rb#187 - def to_sexp(indent = T.unsafe(nil)); end - - # Converts `self` to an Array where the first element is the type as a Symbol, - # and subsequent elements are the same representation of its children. - # - # @return [Array] - # - # source://ast//lib/ast/node.rb#237 - def to_sexp_array; end - - # Returns the type of this node. - # - # @return [Symbol] - # - # source://ast//lib/ast/node.rb#43 - def type; end - - # Returns a new instance of Node where non-nil arguments replace the - # corresponding fields of `self`. - # - # For example, `Node.new(:foo, [ 1, 2 ]).updated(:bar)` would yield - # `(bar 1 2)`, and `Node.new(:foo, [ 1, 2 ]).updated(nil, [])` would - # yield `(foo)`. - # - # If the resulting node would be identical to `self`, does nothing. - # - # @param type [Symbol, nil] - # @param children [Array, nil] - # @param properties [Hash, nil] - # @return [AST::Node] - # - # source://ast//lib/ast/node.rb#133 - def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end - - protected - - # By default, each entry in the `properties` hash is assigned to - # an instance variable in this instance of Node. A subclass should define - # attribute readers for such variables. The values passed in the hash - # are not frozen or whitelisted; such behavior can also be implemented - # by subclassing Node and overriding this method. - # - # @return [nil] - # - # source://ast//lib/ast/node.rb#98 - def assign_properties(properties); end - - # Returns `@type` with all underscores replaced by dashes. This allows - # to write symbol literals without quotes in Ruby sources and yet have - # nicely looking s-expressions. - # - # @return [String] - # - # source://ast//lib/ast/node.rb#264 - def fancy_type; end - - private - - def original_dup; end -end - -# This class includes {AST::Processor::Mixin}; however, it is -# deprecated, since the module defines all of the behaviors that -# the processor includes. Any new libraries should use -# {AST::Processor::Mixin} instead of subclassing this. -# -# @deprecated Use {AST::Processor::Mixin} instead. -# -# source://ast//lib/ast/processor.rb#8 -class AST::Processor - include ::AST::Processor::Mixin -end - -# The processor module is a module which helps transforming one -# AST into another. In a nutshell, the {#process} method accepts -# a {Node} and dispatches it to a handler corresponding to its -# type, and returns a (possibly) updated variant of the node. -# -# The processor module has a set of associated design patterns. -# They are best explained with a concrete example. Let's define a -# simple arithmetic language and an AST format for it: -# -# Terminals (AST nodes which do not have other AST nodes inside): -# -# * `(integer )`, -# -# Nonterminals (AST nodes with other nodes as children): -# -# * `(add )`, -# * `(multiply )`, -# * `(divide )`, -# * `(negate )`, -# * `(store )`: stores value of `` -# into a variable named ``, -# * `(load )`: loads value of a variable named -# ``, -# * `(each ...)`: computes each of the ``s and -# prints the result. -# -# All AST nodes have the same Ruby class, and therefore they don't -# know how to traverse themselves. (A solution which dynamically -# checks the type of children is possible, but is slow and -# error-prone.) So, a class including the module which knows how -# to traverse the entire tree should be defined. Such classes -# have a handler for each nonterminal node which recursively -# processes children nodes: -# -# require 'ast' -# -# class ArithmeticsProcessor -# include AST::Processor::Mixin -# # This method traverses any binary operators such as (add) -# # or (multiply). -# def process_binary_op(node) -# # Children aren't decomposed automatically; it is -# # suggested to use Ruby multiple assignment expansion, -# # as it is very convenient here. -# left_expr, right_expr = *node -# -# # AST::Node#updated won't change node type if nil is -# # passed as a first argument, which allows to reuse the -# # same handler for multiple node types using `alias' -# # (below). -# node.updated(nil, [ -# process(left_expr), -# process(right_expr) -# ]) -# end -# alias_method :on_add, :process_binary_op -# alias_method :on_multiply, :process_binary_op -# alias_method :on_divide, :process_binary_op -# -# def on_negate(node) -# # It is also possible to use #process_all for more -# # compact code if every child is a Node. -# node.updated(nil, process_all(node)) -# end -# -# def on_store(node) -# expr, variable_name = *node -# -# # Note that variable_name is not a Node and thus isn't -# # passed to #process. -# node.updated(nil, [ -# process(expr), -# variable_name -# ]) -# end -# -# # (load) is effectively a terminal node, and so it does -# # not need an explicit handler, as the following is the -# # default behavior. Essentially, for any nodes that don't -# # have a defined handler, the node remains unchanged. -# def on_load(node) -# nil -# end -# -# def on_each(node) -# node.updated(nil, process_all(node)) -# end -# end -# -# Let's test our ArithmeticsProcessor: -# -# include AST::Sexp -# expr = s(:add, s(:integer, 2), s(:integer, 2)) -# -# p ArithmeticsProcessor.new.process(expr) == expr # => true -# -# As expected, it does not change anything at all. This isn't -# actually very useful, so let's now define a Calculator, which -# will compute the expression values: -# -# # This Processor folds nonterminal nodes and returns an -# # (integer) terminal node. -# class ArithmeticsCalculator < ArithmeticsProcessor -# def compute_op(node) -# # First, node children are processed and then unpacked -# # to local variables. -# nodes = process_all(node) -# -# if nodes.all? { |node| node.type == :integer } -# # If each of those nodes represents a literal, we can -# # fold this node! -# values = nodes.map { |node| node.children.first } -# AST::Node.new(:integer, [ -# yield(values) -# ]) -# else -# # Otherwise, we can just leave the current node in the -# # tree and only update it with processed children -# # nodes, which can be partially folded. -# node.updated(nil, nodes) -# end -# end -# -# def on_add(node) -# compute_op(node) { |left, right| left + right } -# end -# -# def on_multiply(node) -# compute_op(node) { |left, right| left * right } -# end -# end -# -# Let's check: -# -# p ArithmeticsCalculator.new.process(expr) # => (integer 4) -# -# Excellent, the calculator works! Now, a careful reader could -# notice that the ArithmeticsCalculator does not know how to -# divide numbers. What if we pass an expression with division to -# it? -# -# expr_with_division = \ -# s(:add, -# s(:integer, 1), -# s(:divide, -# s(:add, s(:integer, 8), s(:integer, 4)), -# s(:integer, 3))) # 1 + (8 + 4) / 3 -# -# folded_expr_with_division = ArithmeticsCalculator.new.process(expr_with_division) -# p folded_expr_with_division -# # => (add -# # (integer 1) -# # (divide -# # (integer 12) -# # (integer 3))) -# -# As you can see, the expression was folded _partially_: the inner -# `(add)` node which could be computed was folded to -# `(integer 12)`, the `(divide)` node is left as-is because there -# is no computing handler for it, and the root `(add)` node was -# also left as it is because some of its children were not -# literals. -# -# Note that this partial folding is only possible because the -# _data_ format, i.e. the format in which the computed values of -# the nodes are represented, is the same as the AST itself. -# -# Let's extend our ArithmeticsCalculator class further. -# -# class ArithmeticsCalculator -# def on_divide(node) -# compute_op(node) { |left, right| left / right } -# end -# -# def on_negate(node) -# # Note how #compute_op works regardless of the operator -# # arity. -# compute_op(node) { |value| -value } -# end -# end -# -# Now, let's apply our renewed ArithmeticsCalculator to a partial -# result of previous evaluation: -# -# p ArithmeticsCalculator.new.process(expr_with_division) # => (integer 5) -# -# Five! Excellent. This is also pretty much how CRuby 1.8 executed -# its programs. -# -# Now, let's do some automated bug searching. Division by zero is -# an error, right? So if we could detect that someone has divided -# by zero before the program is even run, that could save some -# debugging time. -# -# class DivisionByZeroVerifier < ArithmeticsProcessor -# class VerificationFailure < Exception; end -# -# def on_divide(node) -# # You need to process the children to handle nested divisions -# # such as: -# # (divide -# # (integer 1) -# # (divide (integer 1) (integer 0)) -# left, right = process_all(node) -# -# if right.type == :integer && -# right.children.first == 0 -# raise VerificationFailure, "Ouch! This code divides by zero." -# end -# end -# -# def divides_by_zero?(ast) -# process(ast) -# false -# rescue VerificationFailure -# true -# end -# end -# -# nice_expr = \ -# s(:divide, -# s(:add, s(:integer, 10), s(:integer, 2)), -# s(:integer, 4)) -# -# p DivisionByZeroVerifier.new.divides_by_zero?(nice_expr) -# # => false. Good. -# -# bad_expr = \ -# s(:add, s(:integer, 10), -# s(:divide, s(:integer, 1), s(:integer, 0))) -# -# p DivisionByZeroVerifier.new.divides_by_zero?(bad_expr) -# # => true. WHOOPS. DO NOT RUN THIS. -# -# Of course, this won't detect more complex cases... unless you -# use some partial evaluation before! The possibilites are -# endless. Have fun. -# -# source://ast//lib/ast/processor/mixin.rb#240 -module AST::Processor::Mixin - # Default handler. Does nothing. - # - # @param node [AST::Node] - # @return [AST::Node, nil] - # - # source://ast//lib/ast/processor/mixin.rb#284 - def handler_missing(node); end - - # Dispatches `node`. If a node has type `:foo`, then a handler - # named `on_foo` is invoked with one argument, the `node`; if - # there isn't such a handler, {#handler_missing} is invoked - # with the same argument. - # - # If the handler returns `nil`, `node` is returned; otherwise, - # the return value of the handler is passed along. - # - # @param node [AST::Node, nil] - # @return [AST::Node, nil] - # - # source://ast//lib/ast/processor/mixin.rb#251 - def process(node); end - - # {#process}es each node from `nodes` and returns an array of - # results. - # - # @param nodes [Array] - # @return [Array] - # - # source://ast//lib/ast/processor/mixin.rb#274 - def process_all(nodes); end -end - -# This simple module is very useful in the cases where one needs -# to define deeply nested ASTs from Ruby code, for example, in -# tests. It should be used like this: -# -# describe YourLanguage::AST do -# include Sexp -# -# it "should correctly parse expressions" do -# YourLanguage.parse("1 + 2 * 3").should == -# s(:add, -# s(:integer, 1), -# s(:multiply, -# s(:integer, 2), -# s(:integer, 3))) -# end -# end -# -# This way the amount of boilerplate code is greatly reduced. -# -# source://ast//lib/ast/sexp.rb#20 -module AST::Sexp - # Creates a {Node} with type `type` and children `children`. - # Note that the resulting node is of the type AST::Node and not a - # subclass. - # This would not pose a problem with comparisons, as {Node#==} - # ignores metadata. - # - # source://ast//lib/ast/sexp.rb#26 - def s(type, *children); end -end diff --git a/sorbet/rbi/gems/coderay@1.1.3.rbi b/sorbet/rbi/gems/coderay@1.1.3.rbi deleted file mode 100644 index 3fb193b..0000000 --- a/sorbet/rbi/gems/coderay@1.1.3.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `coderay` gem. -# Please instead update this file by running `bin/tapioca gem coderay`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi deleted file mode 100644 index 7c80d24..0000000 --- a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `diff-lcs` gem. -# Please instead update this file by running `bin/tapioca gem diff-lcs`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/docile@1.4.0.rbi b/sorbet/rbi/gems/docile@1.4.0.rbi new file mode 100644 index 0000000..35ff010 --- /dev/null +++ b/sorbet/rbi/gems/docile@1.4.0.rbi @@ -0,0 +1,376 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `docile` gem. +# Please instead update this file by running `bin/tapioca gem docile`. + +# Docile keeps your Ruby DSLs tame and well-behaved. +# +# source://docile//lib/docile/version.rb#3 +module Docile + extend ::Docile::Execution + + private + + # Execute a block in the context of an object whose methods represent the + # commands in a DSL. + # + # Use this method to execute an *imperative* DSL, which means that: + # + # 1. Each command mutates the state of the DSL context object + # 2. The return value of each command is ignored + # 3. The final return value is the original context object + # + # @example Use a String as a DSL + # Docile.dsl_eval("Hello, world!") do + # reverse! + # upcase! + # end + # #=> "!DLROW ,OLLEH" + # @example Use an Array as a DSL + # Docile.dsl_eval([]) do + # push 1 + # push 2 + # pop + # push 3 + # end + # #=> [1, 3] + # @note Use with an *imperative* DSL (commands modify the context object) + # @param dsl [Object] context object whose methods make up the DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object + # @return [Object] the `dsl` context object after executing the block + # + # source://docile//lib/docile.rb#45 + def dsl_eval(dsl, *args, **_arg2, &block); end + + # Execute a block in the context of an immutable object whose methods, + # and the methods of their return values, represent the commands in a DSL. + # + # Use this method to execute a *functional* DSL, which means that: + # + # 1. The original DSL context object is never mutated + # 2. Each command returns the next DSL context object + # 3. The final return value is the value returned by the last command + # + # @example Use a frozen String as a DSL + # Docile.dsl_eval_immutable("I'm immutable!".freeze) do + # reverse + # upcase + # end + # #=> "!ELBATUMMI M'I" + # @example Use a Float as a DSL + # Docile.dsl_eval_immutable(84.5) do + # fdiv(2) + # floor + # end + # #=> 42 + # @note Use with a *functional* DSL (commands return successor + # context objects) + # @param dsl [Object] immutable context object whose methods make up the + # initial DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object and successor return values + # @return [Object] the return value of the final command in the block + # + # source://docile//lib/docile.rb#128 + def dsl_eval_immutable(dsl, *args, **_arg2, &block); end + + # Execute a block in the context of an object whose methods represent the + # commands in a DSL, and return *the block's return value*. + # + # Use this method to execute an *imperative* DSL, which means that: + # + # 1. Each command mutates the state of the DSL context object + # 2. The return value of each command is ignored + # 3. The final return value is the original context object + # + # @example Use a String as a DSL + # Docile.dsl_eval_with_block_return("Hello, world!") do + # reverse! + # upcase! + # first + # end + # #=> "!" + # @example Use an Array as a DSL + # Docile.dsl_eval_with_block_return([]) do + # push "a" + # push "b" + # pop + # push "c" + # length + # end + # #=> 2 + # @note Use with an *imperative* DSL (commands modify the context object) + # @param dsl [Object] context object whose methods make up the DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object + # @return [Object] the return value from executing the block + # + # source://docile//lib/docile.rb#87 + def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end + + class << self + # Execute a block in the context of an object whose methods represent the + # commands in a DSL. + # + # Use this method to execute an *imperative* DSL, which means that: + # + # 1. Each command mutates the state of the DSL context object + # 2. The return value of each command is ignored + # 3. The final return value is the original context object + # + # @example Use a String as a DSL + # Docile.dsl_eval("Hello, world!") do + # reverse! + # upcase! + # end + # #=> "!DLROW ,OLLEH" + # @example Use an Array as a DSL + # Docile.dsl_eval([]) do + # push 1 + # push 2 + # pop + # push 3 + # end + # #=> [1, 3] + # @note Use with an *imperative* DSL (commands modify the context object) + # @param dsl [Object] context object whose methods make up the DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object + # @return [Object] the `dsl` context object after executing the block + # + # source://docile//lib/docile.rb#45 + def dsl_eval(dsl, *args, **_arg2, &block); end + + # Execute a block in the context of an immutable object whose methods, + # and the methods of their return values, represent the commands in a DSL. + # + # Use this method to execute a *functional* DSL, which means that: + # + # 1. The original DSL context object is never mutated + # 2. Each command returns the next DSL context object + # 3. The final return value is the value returned by the last command + # + # @example Use a frozen String as a DSL + # Docile.dsl_eval_immutable("I'm immutable!".freeze) do + # reverse + # upcase + # end + # #=> "!ELBATUMMI M'I" + # @example Use a Float as a DSL + # Docile.dsl_eval_immutable(84.5) do + # fdiv(2) + # floor + # end + # #=> 42 + # @note Use with a *functional* DSL (commands return successor + # context objects) + # @param dsl [Object] immutable context object whose methods make up the + # initial DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object and successor return values + # @return [Object] the return value of the final command in the block + # + # source://docile//lib/docile.rb#128 + def dsl_eval_immutable(dsl, *args, **_arg2, &block); end + + # Execute a block in the context of an object whose methods represent the + # commands in a DSL, and return *the block's return value*. + # + # Use this method to execute an *imperative* DSL, which means that: + # + # 1. Each command mutates the state of the DSL context object + # 2. The return value of each command is ignored + # 3. The final return value is the original context object + # + # @example Use a String as a DSL + # Docile.dsl_eval_with_block_return("Hello, world!") do + # reverse! + # upcase! + # first + # end + # #=> "!" + # @example Use an Array as a DSL + # Docile.dsl_eval_with_block_return([]) do + # push "a" + # push "b" + # pop + # push "c" + # length + # end + # #=> 2 + # @note Use with an *imperative* DSL (commands modify the context object) + # @param dsl [Object] context object whose methods make up the DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object + # @return [Object] the return value from executing the block + # + # source://docile//lib/docile.rb#87 + def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end + end +end + +# This is used to remove entries pointing to Docile's source files +# from {Exception#backtrace} and {Exception#backtrace_locations}. +# +# If {NoMethodError} is caught then the exception object will be extended +# by this module to add filter functionalities. +# +# @api private +# +# source://docile//lib/docile/backtrace_filter.rb#11 +module Docile::BacktraceFilter + # @api private + # + # source://docile//lib/docile/backtrace_filter.rb#14 + def backtrace; end + + # @api private + # + # source://docile//lib/docile/backtrace_filter.rb#19 + def backtrace_locations; end +end + +# @api private +# +# source://docile//lib/docile/backtrace_filter.rb#12 +Docile::BacktraceFilter::FILTER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Operates in the same manner as {FallbackContextProxy}, but replacing +# the primary `receiver` object with the result of each proxied method. +# +# This is useful for implementing DSL evaluation for immutable context +# objects. +# +# +# @api private +# @see Docile.dsl_eval_immutable +# +# source://docile//lib/docile/chaining_fallback_context_proxy.rb#17 +class Docile::ChainingFallbackContextProxy < ::Docile::FallbackContextProxy + # Proxy methods as in {FallbackContextProxy#method_missing}, replacing + # `receiver` with the returned value. + # + # @api private + # + # source://docile//lib/docile/chaining_fallback_context_proxy.rb#20 + def method_missing(method, *args, **_arg2, &block); end +end + +# A namespace for functions relating to the execution of a block against a +# proxy object. +# +# @api private +# +# source://docile//lib/docile/execution.rb#8 +module Docile::Execution + private + + # Execute a block in the context of an object whose methods represent the + # commands in a DSL, using a specific proxy class. + # + # @api private + # @param dsl [Object] context object whose methods make up the + # (initial) DSL + # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed + # @return [Object] the return value of the block + # + # source://docile//lib/docile/execution.rb#19 + def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end + + class << self + # Execute a block in the context of an object whose methods represent the + # commands in a DSL, using a specific proxy class. + # + # @api private + # @param dsl [Object] context object whose methods make up the + # (initial) DSL + # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed + # @return [Object] the return value of the block + # + # source://docile//lib/docile/execution.rb#19 + def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end + end +end + +# A proxy object with a primary receiver as well as a secondary +# fallback receiver. +# +# Will attempt to forward all method calls first to the primary receiver, +# and then to the fallback receiver if the primary does not handle that +# method. +# +# This is useful for implementing DSL evaluation in the context of an object. +# +# +# @api private +# @see Docile.dsl_eval +# +# source://docile//lib/docile/fallback_context_proxy.rb#20 +class Docile::FallbackContextProxy + # @api private + # @param receiver [Object] the primary proxy target to which all methods + # initially will be forwarded + # @param fallback [Object] the fallback proxy target to which any methods + # not handled by `receiver` will be forwarded + # @return [FallbackContextProxy] a new instance of FallbackContextProxy + # + # source://docile//lib/docile/fallback_context_proxy.rb#46 + def initialize(receiver, fallback); end + + # @api private + # @return [Array] Instance variable names, excluding + # {NON_PROXIED_INSTANCE_VARIABLES} + # + # source://docile//lib/docile/fallback_context_proxy.rb#85 + def instance_variables; end + + # Proxy all methods, excluding {NON_PROXIED_METHODS}, first to `receiver` + # and then to `fallback` if not found. + # + # @api private + # + # source://docile//lib/docile/fallback_context_proxy.rb#91 + def method_missing(method, *args, **_arg2, &block); end +end + +# The set of methods which will **not** fallback from the block's context +# to the dsl object. +# +# @api private +# +# source://docile//lib/docile/fallback_context_proxy.rb#30 +Docile::FallbackContextProxy::NON_FALLBACK_METHODS = T.let(T.unsafe(nil), Set) + +# The set of instance variables which are local to this object and hidden. +# All other instance variables will be copied in and out of this object +# from the scope in which this proxy was created. +# +# @api private +# +# source://docile//lib/docile/fallback_context_proxy.rb#35 +Docile::FallbackContextProxy::NON_PROXIED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Set) + +# The set of methods which will **not** be proxied, but instead answered +# by this object directly. +# +# @api private +# +# source://docile//lib/docile/fallback_context_proxy.rb#23 +Docile::FallbackContextProxy::NON_PROXIED_METHODS = T.let(T.unsafe(nil), Set) + +# The current version of this library +# +# source://docile//lib/docile/version.rb#5 +Docile::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/erubi@1.12.0.rbi b/sorbet/rbi/gems/erubi@1.12.0.rbi new file mode 100644 index 0000000..c52738f --- /dev/null +++ b/sorbet/rbi/gems/erubi@1.12.0.rbi @@ -0,0 +1,145 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `erubi` gem. +# Please instead update this file by running `bin/tapioca gem erubi`. + +# source://erubi//lib/erubi.rb#3 +module Erubi + class << self + def h(_arg0); end + end +end + +# source://erubi//lib/erubi.rb#54 +class Erubi::Engine + # Initialize a new Erubi::Engine. Options: + # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). + # +:bufvar+ :: The variable name to use for the buffer variable, as a string. + # +:chain_appends+ :: Whether to chain << calls to the buffer variable. Offers better + # performance, but can cause issues when the buffer variable is reassigned during + # template rendering (default +false+). + # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar. + # +:escapefunc+ :: The function to use for escaping, as a string (default: '::Erubi.h'). + # +:escape+ :: Whether to make <%= escape by default, and <%== not escape by default. + # +:escape_html+ :: Same as +:escape+, with lower priority. + # +:filename+ :: The filename for the template. + # the resulting source code. Note this may cause problems if you are wrapping the resulting + # source code in other code, because the magic comment only has an effect at the beginning of + # the file, and having the magic comment later in the file can trigger warnings. + # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with .freeze + # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older). + # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled + # in order to improve performance. + # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default '<%'). + # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default '%>'). + # +:outvar+ :: Same as +:bufvar+, with lower priority. + # +:postamble+ :: The postamble for the template, by default returns the resulting source code. + # +:preamble+ :: The preamble for the template, by default initializes the buffer variable. + # +:regexp+ :: The regexp to use for scanning. + # +:src+ :: The initial value to use for the source code, an empty string by default. + # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. + # + # @return [Engine] a new instance of Engine + # + # source://erubi//lib/erubi.rb#94 + def initialize(input, properties = T.unsafe(nil)); end + + # The variable name used for the buffer variable. + # + # source://erubi//lib/erubi.rb#65 + def bufvar; end + + # The filename of the template, if one was given. + # + # source://erubi//lib/erubi.rb#62 + def filename; end + + # The frozen ruby source code generated from the template, which can be evaled. + # + # source://erubi//lib/erubi.rb#59 + def src; end + + private + + # Add ruby code to the template + # + # source://erubi//lib/erubi.rb#226 + def add_code(code); end + + # Add the given ruby expression result to the template, + # escaping it based on the indicator given and escape flag. + # + # source://erubi//lib/erubi.rb#235 + def add_expression(indicator, code); end + + # Add the result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#244 + def add_expression_result(code); end + + # Add the escaped result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#249 + def add_expression_result_escaped(code); end + + # Add the given postamble to the src. Can be overridden in subclasses + # to make additional changes to src that depend on the current state. + # + # source://erubi//lib/erubi.rb#255 + def add_postamble(postamble); end + + # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. + # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). + # + # source://erubi//lib/erubi.rb#213 + def add_text(text); end + + # Raise an exception, as the base engine class does not support handling other indicators. + # + # @raise [ArgumentError] + # + # source://erubi//lib/erubi.rb#261 + def handle(indicator, code, tailch, rspace, lspace); end + + # Make sure that any current expression has been terminated. + # The default is to terminate all expressions, but when + # the chain_appends option is used, expressions may not be + # terminated. + # + # source://erubi//lib/erubi.rb#289 + def terminate_expression; end + + # Make sure the buffer variable is the target of the next append + # before yielding to the block. Mark that the buffer is the target + # of the next append after the block executes. + # + # This method should only be called if the block will result in + # code where << will append to the bufvar. + # + # source://erubi//lib/erubi.rb#271 + def with_buffer; end +end + +# The default regular expression used for scanning. +# +# source://erubi//lib/erubi.rb#56 +Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://erubi//lib/erubi.rb#17 +Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#15 +Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol) + +# source://erubi//lib/erubi.rb#8 +Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#9 +Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#16 +Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#4 +Erubi::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/method_source@1.0.0.rbi b/sorbet/rbi/gems/method_source@1.0.0.rbi deleted file mode 100644 index fe08676..0000000 --- a/sorbet/rbi/gems/method_source@1.0.0.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `method_source` gem. -# Please instead update this file by running `bin/tapioca gem method_source`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/minitest@5.16.2.rbi b/sorbet/rbi/gems/minitest@5.20.0.rbi similarity index 75% rename from sorbet/rbi/gems/minitest@5.16.2.rbi rename to sorbet/rbi/gems/minitest@5.20.0.rbi index e902cc4..de27f9c 100644 --- a/sorbet/rbi/gems/minitest@5.16.2.rbi +++ b/sorbet/rbi/gems/minitest@5.20.0.rbi @@ -12,7 +12,7 @@ module Minitest # Internal run method. Responsible for telling all Runnable # sub-classes to run. # - # source://minitest//lib/minitest.rb#173 + # source://minitest//lib/minitest.rb#176 def __run(reporter, options); end # A simple hook allowing you to run a block of code after everything @@ -20,12 +20,18 @@ module Minitest # # Minitest.after_run { p $debugging_info } # - # source://minitest//lib/minitest.rb#94 + # source://minitest//lib/minitest.rb#97 def after_run(&block); end + # source://minitest//lib/minitest.rb#19 + def allow_fork; end + + # source://minitest//lib/minitest.rb#19 + def allow_fork=(_arg0); end + # Registers Minitest to run at process exit # - # source://minitest//lib/minitest.rb#66 + # source://minitest//lib/minitest.rb#69 def autorun; end # source://minitest//lib/minitest.rb#19 @@ -37,7 +43,7 @@ module Minitest # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest//lib/minitest.rb#1067 + # source://minitest//lib/minitest.rb#1102 def clock_time; end # source://minitest//lib/minitest.rb#19 @@ -46,7 +52,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest//lib/minitest.rb#264 + # source://minitest//lib/minitest.rb#267 def filter_backtrace(bt); end # source://minitest//lib/minitest.rb#19 @@ -55,10 +61,10 @@ module Minitest # source://minitest//lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest//lib/minitest.rb#98 + # source://minitest//lib/minitest.rb#101 def init_plugins(options); end - # source://minitest//lib/minitest.rb#105 + # source://minitest//lib/minitest.rb#108 def load_plugins; end # source://minitest//lib/minitest.rb#19 @@ -67,7 +73,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest//lib/minitest.rb#186 + # source://minitest//lib/minitest.rb#189 def process_args(args = T.unsafe(nil)); end # source://minitest//lib/minitest.rb#19 @@ -92,10 +98,10 @@ module Minitest # Minitest.run_one_method(klass, runnable_method) # klass.new(runnable_method).run # - # source://minitest//lib/minitest.rb#140 + # source://minitest//lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest//lib/minitest.rb#1058 + # source://minitest//lib/minitest.rb#1093 def run_one_method(klass, method_name); end # source://minitest//lib/minitest.rb#19 @@ -109,27 +115,27 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest//lib/minitest.rb#578 +# source://minitest//lib/minitest.rb#621 class Minitest::AbstractReporter include ::Mutex_m - # source://mutex_m/0.1.1/mutex_m.rb#93 + # source://mutex_m/0.1.2/mutex_m.rb#93 def lock; end - # source://mutex_m/0.1.1/mutex_m.rb#83 + # source://mutex_m/0.1.2/mutex_m.rb#83 def locked?; end # Did this run pass? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#612 + # source://minitest//lib/minitest.rb#655 def passed?; end # About to start running a test. This allows a reporter to show # that it is starting or that we are in the middle of a test run. # - # source://minitest//lib/minitest.rb#591 + # source://minitest//lib/minitest.rb#634 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -137,45 +143,45 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest//lib/minitest.rb#600 + # source://minitest//lib/minitest.rb#643 def record(result); end # Outputs the summary of the run. # - # source://minitest//lib/minitest.rb#606 + # source://minitest//lib/minitest.rb#649 def report; end # Starts reporting on the run. # - # source://minitest//lib/minitest.rb#584 + # source://minitest//lib/minitest.rb#627 def start; end - # source://mutex_m/0.1.1/mutex_m.rb#78 + # source://mutex_m/0.1.2/mutex_m.rb#78 def synchronize(&block); end - # source://mutex_m/0.1.1/mutex_m.rb#88 + # source://mutex_m/0.1.2/mutex_m.rb#88 def try_lock; end - # source://mutex_m/0.1.1/mutex_m.rb#98 + # source://mutex_m/0.1.2/mutex_m.rb#98 def unlock; end end # Represents run failures. # -# source://minitest//lib/minitest.rb#903 +# source://minitest//lib/minitest.rb#938 class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#904 + # source://minitest//lib/minitest.rb#939 def error; end # Where was this run before an assertion was raised? # - # source://minitest//lib/minitest.rb#911 + # source://minitest//lib/minitest.rb#946 def location; end - # source://minitest//lib/minitest.rb#920 + # source://minitest//lib/minitest.rb#955 def result_code; end - # source://minitest//lib/minitest.rb#924 + # source://minitest//lib/minitest.rb#959 def result_label; end end @@ -283,6 +289,24 @@ module Minitest::Assertions # source://minitest//lib/minitest/assertions.rb#355 def assert_path_exists(path, msg = T.unsafe(nil)); end + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # # fail "length mismatch (given 3, expected 1)" + # assert_pattern { [1,2,3] => [Integer] } + # + # The bare => pattern will raise a NoMatchingPatternError on failure, which would + # normally be counted as a test error. This assertion rescues NoMatchingPatternError and + # generates a test failure. Any other exception will be raised as normal and generate a test + # error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#374 + def assert_pattern; end + # For testing with predicates. Eg: # # assert_predicate str, :empty? @@ -291,7 +315,7 @@ module Minitest::Assertions # # str.must_be :empty? # - # source://minitest//lib/minitest/assertions.rb#369 + # source://minitest//lib/minitest/assertions.rb#395 def assert_predicate(o1, op, msg = T.unsafe(nil)); end # Fails unless the block raises one of +exp+. Returns the @@ -315,36 +339,36 @@ module Minitest::Assertions # # assert_equal 'This is really bad', error.message # - # source://minitest//lib/minitest/assertions.rb#396 + # source://minitest//lib/minitest/assertions.rb#422 def assert_raises(*exp); end # Fails unless +obj+ responds to +meth+. # - # source://minitest//lib/minitest/assertions.rb#427 + # source://minitest//lib/minitest/assertions.rb#453 def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end # Fails unless +exp+ and +act+ are #equal? # - # source://minitest//lib/minitest/assertions.rb#437 + # source://minitest//lib/minitest/assertions.rb#463 def assert_same(exp, act, msg = T.unsafe(nil)); end # +send_ary+ is a receiver, message and arguments. # # Fails unless the call returns a true value # - # source://minitest//lib/minitest/assertions.rb#450 + # source://minitest//lib/minitest/assertions.rb#476 def assert_send(send_ary, m = T.unsafe(nil)); end # Fails if the block outputs anything to stderr or stdout. # # See also: #assert_output # - # source://minitest//lib/minitest/assertions.rb#466 + # source://minitest//lib/minitest/assertions.rb#492 def assert_silent; end # Fails unless the block throws +sym+ # - # source://minitest//lib/minitest/assertions.rb#475 + # source://minitest//lib/minitest/assertions.rb#501 def assert_throws(sym, msg = T.unsafe(nil)); end # Captures $stdout and $stderr into strings: @@ -361,7 +385,7 @@ module Minitest::Assertions # capture IO for subprocesses. Use #capture_subprocess_io for # that. # - # source://minitest//lib/minitest/assertions.rb#516 + # source://minitest//lib/minitest/assertions.rb#542 def capture_io; end # Captures $stdout and $stderr into strings, using Tempfile to @@ -378,7 +402,7 @@ module Minitest::Assertions # NOTE: This method is approximately 10x slower than #capture_io so # only use it when you need to test the output of a subprocess. # - # source://minitest//lib/minitest/assertions.rb#549 + # source://minitest//lib/minitest/assertions.rb#575 def capture_subprocess_io; end # Returns a diff between +exp+ and +act+. If there is no known @@ -393,24 +417,24 @@ module Minitest::Assertions # Returns details for exception +e+ # - # source://minitest//lib/minitest/assertions.rb#581 + # source://minitest//lib/minitest/assertions.rb#607 def exception_details(e, msg); end # Fails after a given date (in the local time zone). This allows # you to put time-bombs in your tests if you need to keep # something around until a later date lest you forget about it. # - # source://minitest//lib/minitest/assertions.rb#597 + # source://minitest//lib/minitest/assertions.rb#623 def fail_after(y, m, d, msg); end # Fails with +msg+. # - # source://minitest//lib/minitest/assertions.rb#604 + # source://minitest//lib/minitest/assertions.rb#630 def flunk(msg = T.unsafe(nil)); end # Returns a proc that will output +msg+ along with the default message. # - # source://minitest//lib/minitest/assertions.rb#612 + # source://minitest//lib/minitest/assertions.rb#638 def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end # This returns a human-readable version of +obj+. By default @@ -432,62 +456,62 @@ module Minitest::Assertions # used for counting assertions # - # source://minitest//lib/minitest/assertions.rb#623 + # source://minitest//lib/minitest/assertions.rb#649 def pass(_msg = T.unsafe(nil)); end # Fails if +test+ is truthy. # - # source://minitest//lib/minitest/assertions.rb#630 + # source://minitest//lib/minitest/assertions.rb#656 def refute(test, msg = T.unsafe(nil)); end # Fails if +obj+ is empty. # - # source://minitest//lib/minitest/assertions.rb#638 + # source://minitest//lib/minitest/assertions.rb#664 def refute_empty(obj, msg = T.unsafe(nil)); end # Fails if exp == act. # # For floats use refute_in_delta. # - # source://minitest//lib/minitest/assertions.rb#649 + # source://minitest//lib/minitest/assertions.rb#675 def refute_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. # # refute_in_delta Math::PI, (22.0 / 7.0) # - # source://minitest//lib/minitest/assertions.rb#661 + # source://minitest//lib/minitest/assertions.rb#687 def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ and +act+ have a relative error # less than +epsilon+. # - # source://minitest//lib/minitest/assertions.rb#673 + # source://minitest//lib/minitest/assertions.rb#699 def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +collection+ includes +obj+. # - # source://minitest//lib/minitest/assertions.rb#680 + # source://minitest//lib/minitest/assertions.rb#706 def refute_includes(collection, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#691 + # source://minitest//lib/minitest/assertions.rb#717 def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is a kind of +cls+. # - # source://minitest//lib/minitest/assertions.rb#701 + # source://minitest//lib/minitest/assertions.rb#727 def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#709 + # source://minitest//lib/minitest/assertions.rb#735 def refute_match(matcher, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is nil. # - # source://minitest//lib/minitest/assertions.rb#719 + # source://minitest//lib/minitest/assertions.rb#745 def refute_nil(obj, msg = T.unsafe(nil)); end # Fails if +o1+ is not +op+ +o2+. Eg: @@ -495,14 +519,30 @@ module Minitest::Assertions # refute_operator 1, :>, 2 #=> pass # refute_operator 1, :<, 2 #=> fail # - # source://minitest//lib/minitest/assertions.rb#730 + # source://minitest//lib/minitest/assertions.rb#780 def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#739 + # source://minitest//lib/minitest/assertions.rb#789 def refute_path_exists(path, msg = T.unsafe(nil)); end + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # refute_pattern { [1,2,3] => [String] } + # + # # fail "NoMatchingPatternError expected, but nothing was raised." + # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any + # other exceptions will be raised as normal and generate a test error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#762 + def refute_pattern; end + # For testing with predicates. # # refute_predicate str, :empty? @@ -511,17 +551,17 @@ module Minitest::Assertions # # str.wont_be :empty? # - # source://minitest//lib/minitest/assertions.rb#753 + # source://minitest//lib/minitest/assertions.rb#803 def refute_predicate(o1, op, msg = T.unsafe(nil)); end # Fails if +obj+ responds to the message +meth+. # - # source://minitest//lib/minitest/assertions.rb#761 + # source://minitest//lib/minitest/assertions.rb#811 def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end # Fails if +exp+ is the same (by object identity) as +act+. # - # source://minitest//lib/minitest/assertions.rb#770 + # source://minitest//lib/minitest/assertions.rb#820 def refute_same(exp, act, msg = T.unsafe(nil)); end # Skips the current run. If run in verbose-mode, the skipped run @@ -530,7 +570,7 @@ module Minitest::Assertions # # @raise [Minitest::Skip] # - # source://minitest//lib/minitest/assertions.rb#783 + # source://minitest//lib/minitest/assertions.rb#833 def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end # Skips the current run until a given date (in the local time @@ -538,14 +578,14 @@ module Minitest::Assertions # date, but still holds you accountable and prevents you from # forgetting it. # - # source://minitest//lib/minitest/assertions.rb#795 + # source://minitest//lib/minitest/assertions.rb#845 def skip_until(y, m, d, msg); end # Was this testcase skipped? Meant for #teardown. # # @return [Boolean] # - # source://minitest//lib/minitest/assertions.rb#804 + # source://minitest//lib/minitest/assertions.rb#854 def skipped?; end # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. @@ -584,60 +624,60 @@ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # # See Minitest.backtrace_filter=. # -# source://minitest//lib/minitest.rb#1035 +# source://minitest//lib/minitest.rb#1070 class Minitest::BacktraceFilter # Filter +bt+ to something useful. Returns the whole thing if # $DEBUG (ruby) or $MT_DEBUG (env). # - # source://minitest//lib/minitest.rb#1043 + # source://minitest//lib/minitest.rb#1078 def filter(bt); end end -# source://minitest//lib/minitest.rb#1037 +# source://minitest//lib/minitest.rb#1072 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest//lib/minitest.rb#854 +# source://minitest//lib/minitest.rb#887 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest//lib/minitest.rb#858 + # source://minitest//lib/minitest.rb#893 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest//lib/minitest.rb#870 + # source://minitest//lib/minitest.rb#905 def <<(reporter); end - # source://minitest//lib/minitest.rb#863 + # source://minitest//lib/minitest.rb#898 def io; end # @return [Boolean] # - # source://minitest//lib/minitest.rb#874 + # source://minitest//lib/minitest.rb#909 def passed?; end - # source://minitest//lib/minitest.rb#882 + # source://minitest//lib/minitest.rb#917 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#889 + # source://minitest//lib/minitest.rb#924 def record(result); end - # source://minitest//lib/minitest.rb#895 + # source://minitest//lib/minitest.rb#930 def report; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#856 + # source://minitest//lib/minitest.rb#891 def reporters; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#856 + # source://minitest//lib/minitest.rb#891 def reporters=(_arg0); end - # source://minitest//lib/minitest.rb#878 + # source://minitest//lib/minitest.rb#913 def start; end end @@ -655,48 +695,48 @@ end # # ... lots of test methods ... # end # -# source://minitest//lib/minitest.rb#979 +# source://minitest//lib/minitest.rb#1014 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#984 + # source://minitest//lib/minitest.rb#1019 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#991 + # source://minitest//lib/minitest.rb#1026 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1001 + # source://minitest//lib/minitest.rb#1036 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1008 + # source://minitest//lib/minitest.rb#1043 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1015 + # source://minitest//lib/minitest.rb#1050 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1025 + # source://minitest//lib/minitest.rb#1060 def windows?(platform = T.unsafe(nil)); end end @@ -759,36 +799,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#643 +# source://minitest//lib/minitest.rb#686 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#644 + # source://minitest//lib/minitest.rb#687 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#651 + # source://minitest//lib/minitest.rb#694 def record(result); end end # Shared code for anything that can get passed to a Reporter. See # Minitest::Test & Minitest::Result. # -# source://minitest//lib/minitest.rb#475 +# source://minitest//lib/minitest.rb#517 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#495 + # source://minitest//lib/minitest.rb#537 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#516 + # source://minitest//lib/minitest.rb#558 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest//lib/minitest.rb#490 + # source://minitest//lib/minitest.rb#532 def location; end # Did this run pass? @@ -798,47 +838,47 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest//lib/minitest.rb#482 + # source://minitest//lib/minitest.rb#524 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest//lib/minitest.rb#502 + # source://minitest//lib/minitest.rb#544 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#509 + # source://minitest//lib/minitest.rb#551 def skipped?; end end -# source://minitest//lib/minitest.rb#619 +# source://minitest//lib/minitest.rb#662 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest//lib/minitest.rb#628 + # source://minitest//lib/minitest.rb#671 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest//lib/minitest.rb#621 + # source://minitest//lib/minitest.rb#664 def io; end # The IO used to report. # - # source://minitest//lib/minitest.rb#621 + # source://minitest//lib/minitest.rb#664 def io=(_arg0); end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#626 + # source://minitest//lib/minitest.rb#669 def options; end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#626 + # source://minitest//lib/minitest.rb#669 def options=(_arg0); end end @@ -848,90 +888,112 @@ end # blow up. By using Result.from(a_test) you can be reasonably sure # that the test result can be marshalled. # -# source://minitest//lib/minitest.rb#528 +# source://minitest//lib/minitest.rb#570 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest//lib/minitest.rb#561 + # source://minitest//lib/minitest.rb#604 def class_name; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#537 + # source://minitest//lib/minitest.rb#579 def klass; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#537 + # source://minitest//lib/minitest.rb#579 def klass=(_arg0); end # The location of the test method. # - # source://minitest//lib/minitest.rb#542 + # source://minitest//lib/minitest.rb#584 def source_location; end # The location of the test method. # - # source://minitest//lib/minitest.rb#542 + # source://minitest//lib/minitest.rb#584 def source_location=(_arg0); end - # source://minitest//lib/minitest.rb#565 + # source://minitest//lib/minitest.rb#608 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest//lib/minitest.rb#547 + # source://minitest//lib/minitest.rb#589 def from(runnable); end end end # re-open # -# source://minitest//lib/minitest.rb#277 +# source://minitest//lib/minitest.rb#280 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest//lib/minitest.rb#431 + # source://minitest//lib/minitest.rb#448 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#284 def assertions; end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#284 def assertions=(_arg0); end - # source://minitest//lib/minitest.rb#427 + # source://minitest//lib/minitest.rb#444 def failure; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#289 def failures; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#289 def failures=(_arg0); end - # source://minitest//lib/minitest.rb#413 + # source://minitest//lib/minitest.rb#430 def marshal_dump; end - # source://minitest//lib/minitest.rb#423 + # source://minitest//lib/minitest.rb#440 def marshal_load(ary); end + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # source://minitest//lib/minitest.rb#463 + def metadata; end + + # Sets metadata, mainly used for +Result.from+. + # + # source://minitest//lib/minitest.rb#470 + def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#475 + def metadata?; end + # Name of the run. # - # source://minitest//lib/minitest.rb#304 + # source://minitest//lib/minitest.rb#307 def name; end # Set the name of the run. # - # source://minitest//lib/minitest.rb#311 + # source://minitest//lib/minitest.rb#314 def name=(o); end # Did this run pass? @@ -942,7 +1004,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#450 + # source://minitest//lib/minitest.rb#492 def passed?; end # Returns a single character string to print based on the result @@ -951,14 +1013,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#459 + # source://minitest//lib/minitest.rb#501 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#440 + # source://minitest//lib/minitest.rb#482 def run; end # Was this run skipped? See #passed? for more information. @@ -966,42 +1028,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#466 + # source://minitest//lib/minitest.rb#508 def skipped?; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#294 def time; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#294 def time=(_arg0); end - # source://minitest//lib/minitest.rb#293 + # source://minitest//lib/minitest.rb#296 def time_it; end class << self - # source://minitest//lib/minitest.rb#1077 + # source://minitest//lib/minitest.rb#1112 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest//lib/minitest.rb#318 + # source://minitest//lib/minitest.rb#321 def methods_matching(re); end - # source://minitest//lib/minitest.rb#383 + # source://minitest//lib/minitest.rb#400 def on_signal(name, action); end - # source://minitest//lib/minitest.rb#322 + # source://minitest//lib/minitest.rb#325 def reset; end # Responsible for running all runnable methods in a given class, # each in its own instance. Each instance is passed to the # reporter to record. # - # source://minitest//lib/minitest.rb#333 + # source://minitest//lib/minitest.rb#336 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1009,7 +1071,7 @@ class Minitest::Runnable # that subclasses can specialize the running of an individual # test. See Minitest::ParallelTest::ClassMethods for an example. # - # source://minitest//lib/minitest.rb#363 + # source://minitest//lib/minitest.rb#372 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1017,27 +1079,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#400 + # source://minitest//lib/minitest.rb#417 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest//lib/minitest.rb#407 + # source://minitest//lib/minitest.rb#424 def runnables; end - # source://minitest//lib/minitest.rb#368 + # Defines the order to run tests (:random by default). Override + # this or use a convenience method to change it for your tests. + # + # source://minitest//lib/minitest.rb#381 + def test_order; end + + # source://minitest//lib/minitest.rb#385 def with_info_handler(reporter, &block); end end end -# source://minitest//lib/minitest.rb#381 +# source://minitest//lib/minitest.rb#398 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest//lib/minitest.rb#932 +# source://minitest//lib/minitest.rb#967 class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#933 + # source://minitest//lib/minitest.rb#968 def result_label; end end @@ -1061,113 +1129,113 @@ end # end # end # -# source://minitest//lib/minitest.rb#681 +# source://minitest//lib/minitest.rb#722 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest//lib/minitest.rb#723 + # source://minitest//lib/minitest.rb#766 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest//lib/minitest.rb#683 + # source://minitest//lib/minitest.rb#726 def assertions; end # Total number of assertions. # - # source://minitest//lib/minitest.rb#683 + # source://minitest//lib/minitest.rb#726 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#731 def count; end # Total number of test cases. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#731 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#716 + # source://minitest//lib/minitest.rb#759 def errors; end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#716 + # source://minitest//lib/minitest.rb#759 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#711 + # source://minitest//lib/minitest.rb#754 def failures; end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#711 + # source://minitest//lib/minitest.rb#754 def failures=(_arg0); end # @return [Boolean] # - # source://minitest//lib/minitest.rb#736 + # source://minitest//lib/minitest.rb#779 def passed?; end - # source://minitest//lib/minitest.rb#744 + # source://minitest//lib/minitest.rb#787 def record(result); end # Report on the tracked statistics. # - # source://minitest//lib/minitest.rb#754 + # source://minitest//lib/minitest.rb#797 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#736 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#736 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#721 + # source://minitest//lib/minitest.rb#764 def skips; end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#721 + # source://minitest//lib/minitest.rb#764 def skips=(_arg0); end - # source://minitest//lib/minitest.rb#740 + # source://minitest//lib/minitest.rb#783 def start; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#700 + # source://minitest//lib/minitest.rb#743 def start_time; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#700 + # source://minitest//lib/minitest.rb#743 def start_time=(_arg0); end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#706 + # source://minitest//lib/minitest.rb#749 def total_time; end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#706 + # source://minitest//lib/minitest.rb#749 def total_time=(_arg0); end end @@ -1179,54 +1247,49 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#775 +# source://minitest//lib/minitest.rb#817 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest//lib/minitest.rb#809 + # source://minitest//lib/minitest.rb#852 def aggregated_results(io); end # Returns the value of attribute old_sync. # - # source://minitest//lib/minitest.rb#777 + # source://minitest//lib/minitest.rb#820 def old_sync; end # Sets the attribute old_sync # # @param value the value to set the attribute old_sync to. # - # source://minitest//lib/minitest.rb#777 + # source://minitest//lib/minitest.rb#820 def old_sync=(_arg0); end - # source://minitest//lib/minitest.rb#792 + # source://minitest//lib/minitest.rb#835 def report; end # :startdoc: # - # source://minitest//lib/minitest.rb#780 + # source://minitest//lib/minitest.rb#823 def start; end - # source://minitest//lib/minitest.rb#804 + # source://minitest//lib/minitest.rb#847 def statistics; end - # source://minitest//lib/minitest.rb#829 + # source://minitest//lib/minitest.rb#872 def summary; end # :stopdoc: # - # source://minitest//lib/minitest.rb#776 + # source://minitest//lib/minitest.rb#819 def sync; end # :stopdoc: # - # source://minitest//lib/minitest.rb#776 + # source://minitest//lib/minitest.rb#819 def sync=(_arg0); end - # source://minitest//lib/minitest.rb#825 + # source://minitest//lib/minitest.rb#868 def to_s; end - - private - - # source://minitest//lib/minitest.rb#843 - def binary_string; end end # Subclass Test to create your own tests. Typically you'll want a @@ -1244,27 +1307,27 @@ class Minitest::Test < ::Minitest::Runnable # LifecycleHooks # - # source://minitest//lib/minitest/test.rb#194 + # source://minitest//lib/minitest/test.rb#190 def capture_exceptions; end # source://minitest//lib/minitest/test.rb#15 def class_name; end - # source://minitest//lib/minitest/test.rb#211 + # source://minitest//lib/minitest/test.rb#207 def neuter_exception(e); end - # source://minitest//lib/minitest/test.rb#222 + # source://minitest//lib/minitest/test.rb#218 def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end # Runs a single test with setup/teardown hooks. # - # source://minitest//lib/minitest/test.rb#92 + # source://minitest//lib/minitest/test.rb#86 def run; end - # source://minitest//lib/minitest/test.rb#204 + # source://minitest//lib/minitest/test.rb#200 def sanitize_exception(e); end - # source://minitest//lib/minitest/test.rb#236 + # source://minitest//lib/minitest/test.rb#232 def with_info_handler(&block); end class << self @@ -1272,19 +1335,19 @@ class Minitest::Test < ::Minitest::Runnable # positively need to have ordered tests. In doing so, you're # admitting that you suck and your tests are weak. # - # source://minitest//lib/minitest/test.rb#31 + # source://minitest//lib/minitest/test.rb#35 def i_suck_and_my_tests_are_order_dependent!; end # Returns the value of attribute io_lock. # - # source://minitest//lib/minitest/test.rb#22 + # source://minitest//lib/minitest/test.rb#26 def io_lock; end # Sets the attribute io_lock # # @param value the value to set the attribute io_lock to. # - # source://minitest//lib/minitest/test.rb#22 + # source://minitest//lib/minitest/test.rb#26 def io_lock=(_arg0); end # Make diffs for this Test use #pretty_inspect so that diff @@ -1292,28 +1355,22 @@ class Minitest::Test < ::Minitest::Runnable # than the regular inspect but much more usable for complex # objects. # - # source://minitest//lib/minitest/test.rb#44 + # source://minitest//lib/minitest/test.rb#48 def make_my_diffs_pretty!; end # Call this at the top of your tests when you want to run your # tests in parallel. In doing so, you're admitting that you rule # and your tests are awesome. # - # source://minitest//lib/minitest/test.rb#55 + # source://minitest//lib/minitest/test.rb#59 def parallelize_me!; end # Returns all instance methods starting with "test_". Based on # #test_order, the methods are either sorted, randomized # (default), or run in parallel. # - # source://minitest//lib/minitest/test.rb#65 + # source://minitest//lib/minitest/test.rb#69 def runnable_methods; end - - # Defines the order to run tests (:random by default). Override - # this or use a convenience method to change it for your tests. - # - # source://minitest//lib/minitest/test.rb#83 - def test_order; end end end @@ -1321,7 +1378,7 @@ end # meant for library writers, NOT for regular test authors. See # #before_setup for an example. # -# source://minitest//lib/minitest/test.rb#117 +# source://minitest//lib/minitest/test.rb#113 module Minitest::Test::LifecycleHooks # Runs before every test, after setup. This hook is meant for # libraries to extend minitest. It is not meant to be used by @@ -1329,7 +1386,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#167 + # source://minitest//lib/minitest/test.rb#163 def after_setup; end # Runs after every test, after teardown. This hook is meant for @@ -1338,7 +1395,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#191 + # source://minitest//lib/minitest/test.rb#187 def after_teardown; end # Runs before every test, before setup. This hook is meant for @@ -1369,11 +1426,11 @@ module Minitest::Test::LifecycleHooks # end # end # - # class MiniTest::Test + # class Minitest::Test # include MyMinitestPlugin # end # - # source://minitest//lib/minitest/test.rb#152 + # source://minitest//lib/minitest/test.rb#148 def before_setup; end # Runs after every test, before teardown. This hook is meant for @@ -1382,78 +1439,59 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#176 + # source://minitest//lib/minitest/test.rb#172 def before_teardown; end # Runs before every test. Use this to set up before each test # run. # - # source://minitest//lib/minitest/test.rb#158 + # source://minitest//lib/minitest/test.rb#154 def setup; end # Runs after every test. Use this to clean up after each test # run. # - # source://minitest//lib/minitest/test.rb#182 + # source://minitest//lib/minitest/test.rb#178 def teardown; end end # source://minitest//lib/minitest/test.rb#19 Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array) -# source://minitest//lib/minitest/test.rb#87 +# source://minitest//lib/minitest/test.rb#21 +Minitest::Test::SETUP_METHODS = T.let(T.unsafe(nil), Array) + +# source://minitest//lib/minitest/test.rb#23 Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) # Assertion wrapping an unexpected error that was raised during a run. # -# source://minitest//lib/minitest.rb#942 +# source://minitest//lib/minitest.rb#976 class Minitest::UnexpectedError < ::Minitest::Assertion # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest//lib/minitest.rb#945 + # source://minitest//lib/minitest.rb#980 def initialize(error); end - # source://minitest//lib/minitest.rb#950 + # source://minitest//lib/minitest.rb#985 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#943 + # source://minitest//lib/minitest.rb#978 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#943 + # source://minitest//lib/minitest.rb#978 def error=(_arg0); end - # source://minitest//lib/minitest.rb#954 + # source://minitest//lib/minitest.rb#989 def message; end - # source://minitest//lib/minitest.rb#959 + # source://minitest//lib/minitest.rb#994 def result_label; end end -# source://minitest//lib/minitest/unit.rb#20 -class Minitest::Unit - class << self - # source://minitest//lib/minitest/unit.rb#36 - def after_tests(&b); end - - # source://minitest//lib/minitest/unit.rb#30 - def autorun; end - end -end - -# source://minitest//lib/minitest/unit.rb#22 -class Minitest::Unit::TestCase < ::Minitest::Test - class << self - # source://minitest//lib/minitest/unit.rb#23 - def inherited(klass); end - end -end - -# source://minitest//lib/minitest/unit.rb#21 -Minitest::Unit::VERSION = T.let(T.unsafe(nil), String) - # source://minitest//lib/minitest.rb#12 Minitest::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/parallel@1.22.1.rbi b/sorbet/rbi/gems/parallel@1.23.0.rbi similarity index 59% rename from sorbet/rbi/gems/parallel@1.22.1.rbi rename to sorbet/rbi/gems/parallel@1.23.0.rbi index a8633df..c8b319a 100644 --- a/sorbet/rbi/gems/parallel@1.22.1.rbi +++ b/sorbet/rbi/gems/parallel@1.23.0.rbi @@ -6,216 +6,212 @@ # source://parallel//lib/parallel/version.rb#2 module Parallel - extend ::Parallel::ProcessorCount - class << self # @return [Boolean] # - # source://parallel//lib/parallel.rb#246 + # source://parallel//lib/parallel.rb#243 def all?(*args, &block); end # @return [Boolean] # - # source://parallel//lib/parallel.rb#241 + # source://parallel//lib/parallel.rb#238 def any?(*args, &block); end - # source://parallel//lib/parallel.rb#237 + # source://parallel//lib/parallel.rb#234 def each(array, options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#251 + # source://parallel//lib/parallel.rb#248 def each_with_index(array, options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#306 + # source://parallel//lib/parallel.rb#307 + def filter_map(*args, &block); end + + # source://parallel//lib/parallel.rb#303 def flat_map(*args, &block); end - # source://parallel//lib/parallel.rb#231 + # source://parallel//lib/parallel.rb#228 def in_processes(options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#215 + # source://parallel//lib/parallel.rb#212 def in_threads(options = T.unsafe(nil)); end - # source://parallel//lib/parallel.rb#255 + # source://parallel//lib/parallel.rb#252 def map(source, options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#302 + # source://parallel//lib/parallel.rb#299 def map_with_index(array, options = T.unsafe(nil), &block); end - # source://parallel//lib/parallel.rb#310 + # Number of physical processor cores on the current system. + # + # source://parallel//lib/parallel.rb#312 + def physical_processor_count; end + + # Number of processors seen by the OS, used for process scheduling + # + # source://parallel//lib/parallel.rb#345 + def processor_count; end + + # source://parallel//lib/parallel.rb#350 def worker_number; end # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed # - # source://parallel//lib/parallel.rb#315 + # source://parallel//lib/parallel.rb#355 def worker_number=(worker_num); end private - # source://parallel//lib/parallel.rb#321 + # source://parallel//lib/parallel.rb#361 def add_progress_bar!(job_factory, options); end - # source://parallel//lib/parallel.rb#584 + # source://parallel//lib/parallel.rb#624 def call_with_index(item, index, options, &block); end - # source://parallel//lib/parallel.rb#516 + # source://parallel//lib/parallel.rb#556 def create_workers(job_factory, options, &block); end # options is either a Integer or a Hash with :count # - # source://parallel//lib/parallel.rb#574 + # source://parallel//lib/parallel.rb#614 def extract_count_from_options(options); end - # source://parallel//lib/parallel.rb#602 + # source://parallel//lib/parallel.rb#642 def instrument_finish(item, index, result, options); end - # source://parallel//lib/parallel.rb#607 + # source://parallel//lib/parallel.rb#647 def instrument_start(item, index, options); end - # source://parallel//lib/parallel.rb#550 + # source://parallel//lib/parallel.rb#590 def process_incoming_jobs(read, write, job_factory, options, &block); end - # source://parallel//lib/parallel.rb#504 + # source://parallel//lib/parallel.rb#544 def replace_worker(job_factory, workers, index, options, blk); end - # source://parallel//lib/parallel.rb#595 + # source://parallel//lib/parallel.rb#635 def with_instrumentation(item, index, options); end - # source://parallel//lib/parallel.rb#346 + # source://parallel//lib/parallel.rb#386 def work_direct(job_factory, options, &block); end - # source://parallel//lib/parallel.rb#456 + # source://parallel//lib/parallel.rb#496 def work_in_processes(job_factory, options, &blk); end - # source://parallel//lib/parallel.rb#390 + # source://parallel//lib/parallel.rb#430 def work_in_ractors(job_factory, options); end - # source://parallel//lib/parallel.rb#365 + # source://parallel//lib/parallel.rb#405 def work_in_threads(job_factory, options, &block); end - # source://parallel//lib/parallel.rb#524 + # source://parallel//lib/parallel.rb#564 def worker(job_factory, options, &block); end end end -# source://parallel//lib/parallel.rb#14 +# source://parallel//lib/parallel.rb#11 class Parallel::Break < ::StandardError # @return [Break] a new instance of Break # - # source://parallel//lib/parallel.rb#17 + # source://parallel//lib/parallel.rb#14 def initialize(value = T.unsafe(nil)); end # Returns the value of attribute value. # - # source://parallel//lib/parallel.rb#15 + # source://parallel//lib/parallel.rb#12 def value; end end -# source://parallel//lib/parallel.rb#11 +# source://parallel//lib/parallel.rb#8 class Parallel::DeadWorker < ::StandardError; end -# source://parallel//lib/parallel.rb#35 +# source://parallel//lib/parallel.rb#32 class Parallel::ExceptionWrapper # @return [ExceptionWrapper] a new instance of ExceptionWrapper # - # source://parallel//lib/parallel.rb#38 + # source://parallel//lib/parallel.rb#35 def initialize(exception); end # Returns the value of attribute exception. # - # source://parallel//lib/parallel.rb#36 + # source://parallel//lib/parallel.rb#33 def exception; end end -# source://parallel//lib/parallel.rb#101 +# source://parallel//lib/parallel.rb#98 class Parallel::JobFactory # @return [JobFactory] a new instance of JobFactory # - # source://parallel//lib/parallel.rb#102 + # source://parallel//lib/parallel.rb#99 def initialize(source, mutex); end - # source://parallel//lib/parallel.rb#110 + # source://parallel//lib/parallel.rb#107 def next; end # generate item that is sent to workers # just index is faster + less likely to blow up with unserializable errors # - # source://parallel//lib/parallel.rb#139 + # source://parallel//lib/parallel.rb#136 def pack(item, index); end - # source://parallel//lib/parallel.rb#129 + # source://parallel//lib/parallel.rb#126 def size; end # unpack item that is sent to workers # - # source://parallel//lib/parallel.rb#144 + # source://parallel//lib/parallel.rb#141 def unpack(data); end private # @return [Boolean] # - # source://parallel//lib/parallel.rb#150 + # source://parallel//lib/parallel.rb#147 def producer?; end - # source://parallel//lib/parallel.rb#154 + # source://parallel//lib/parallel.rb#151 def queue_wrapper(array); end end -# source://parallel//lib/parallel.rb#23 +# source://parallel//lib/parallel.rb#20 class Parallel::Kill < ::Parallel::Break; end -# TODO: inline this method into parallel.rb and kill physical_processor_count in next major release -# -# source://parallel//lib/parallel/processor_count.rb#4 -module Parallel::ProcessorCount - # Number of physical processor cores on the current system. - # - # source://parallel//lib/parallel/processor_count.rb#12 - def physical_processor_count; end - - # Number of processors seen by the OS, used for process scheduling - # - # source://parallel//lib/parallel/processor_count.rb#6 - def processor_count; end -end - -# source://parallel//lib/parallel.rb#9 +# source://parallel//lib/parallel.rb#6 Parallel::Stop = T.let(T.unsafe(nil), Object) -# source://parallel//lib/parallel.rb#26 +# source://parallel//lib/parallel.rb#23 class Parallel::UndumpableException < ::StandardError # @return [UndumpableException] a new instance of UndumpableException # - # source://parallel//lib/parallel.rb#29 + # source://parallel//lib/parallel.rb#26 def initialize(original); end # Returns the value of attribute backtrace. # - # source://parallel//lib/parallel.rb#27 + # source://parallel//lib/parallel.rb#24 def backtrace; end end -# source://parallel//lib/parallel.rb#159 +# source://parallel//lib/parallel.rb#156 class Parallel::UserInterruptHandler class << self - # source://parallel//lib/parallel.rb#184 + # source://parallel//lib/parallel.rb#181 def kill(thing); end # kill all these pids or threads if user presses Ctrl+c # - # source://parallel//lib/parallel.rb#164 + # source://parallel//lib/parallel.rb#161 def kill_on_ctrl_c(pids, options); end private - # source://parallel//lib/parallel.rb#208 + # source://parallel//lib/parallel.rb#205 def restore_interrupt(old, signal); end - # source://parallel//lib/parallel.rb#193 + # source://parallel//lib/parallel.rb#190 def trap_interrupt(signal); end end end -# source://parallel//lib/parallel.rb#160 +# source://parallel//lib/parallel.rb#157 Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) # source://parallel//lib/parallel/version.rb#3 @@ -224,54 +220,54 @@ Parallel::VERSION = T.let(T.unsafe(nil), String) # source://parallel//lib/parallel/version.rb#3 Parallel::Version = T.let(T.unsafe(nil), String) -# source://parallel//lib/parallel.rb#54 +# source://parallel//lib/parallel.rb#51 class Parallel::Worker # @return [Worker] a new instance of Worker # - # source://parallel//lib/parallel.rb#58 + # source://parallel//lib/parallel.rb#55 def initialize(read, write, pid); end # might be passed to started_processes and simultaneously closed by another thread # when running in isolation mode, so we have to check if it is closed before closing # - # source://parallel//lib/parallel.rb#71 + # source://parallel//lib/parallel.rb#68 def close_pipes; end # Returns the value of attribute pid. # - # source://parallel//lib/parallel.rb#55 + # source://parallel//lib/parallel.rb#52 def pid; end # Returns the value of attribute read. # - # source://parallel//lib/parallel.rb#55 + # source://parallel//lib/parallel.rb#52 def read; end - # source://parallel//lib/parallel.rb#64 + # source://parallel//lib/parallel.rb#61 def stop; end # Returns the value of attribute thread. # - # source://parallel//lib/parallel.rb#56 + # source://parallel//lib/parallel.rb#53 def thread; end # Sets the attribute thread # # @param value the value to set the attribute thread to. # - # source://parallel//lib/parallel.rb#56 + # source://parallel//lib/parallel.rb#53 def thread=(_arg0); end - # source://parallel//lib/parallel.rb#76 + # source://parallel//lib/parallel.rb#73 def work(data); end # Returns the value of attribute write. # - # source://parallel//lib/parallel.rb#55 + # source://parallel//lib/parallel.rb#52 def write; end private - # source://parallel//lib/parallel.rb#94 + # source://parallel//lib/parallel.rb#91 def wait; end end diff --git a/sorbet/rbi/gems/parser@3.1.2.1.rbi b/sorbet/rbi/gems/parser@3.1.2.1.rbi deleted file mode 100644 index fc65057..0000000 --- a/sorbet/rbi/gems/parser@3.1.2.1.rbi +++ /dev/null @@ -1,5028 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `parser` gem. -# Please instead update this file by running `bin/tapioca gem parser`. - -# @api public -# -# source://parser//lib/parser.rb#19 -module Parser; end - -# @api public -# -# source://parser//lib/parser.rb#24 -module Parser::AST; end - -# {Parser::AST::Node} contains information about a single AST node and its -# child nodes. It extends the basic [AST::Node](http://rdoc.info/gems/ast/AST/Node) -# class provided by gem [ast](http://rdoc.info/gems/ast). -# -# @api public -# -# source://parser//lib/parser/ast/node.rb#17 -class Parser::AST::Node < ::AST::Node - # Assigns various properties to this AST node. Currently only the - # location can be set. - # - # @api public - # @option properties - # @param properties [Hash] - # - # source://parser//lib/parser/ast/node.rb#30 - def assign_properties(properties); end - - # Source map for this Node. - # - # @api public - # @return [Parser::Source::Map] - # - # source://parser//lib/parser/ast/node.rb#18 - def loc; end - - # Source map for this Node. - # - # @api public - # @return [Parser::Source::Map] - # - # source://parser//lib/parser/ast/node.rb#18 - def location; end -end - -# @api public -# -# source://parser//lib/parser/ast/processor.rb#9 -class Parser::AST::Processor < ::AST::Processor - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_alias(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_and(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_and_asgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_arg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_arg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_args(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#103 - def on_argument(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_array(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_array_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_array_pattern_with_tail(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#32 - def on_back_ref(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_begin(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_block(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_block_pass(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_blockarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_blockarg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_break(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_case(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_case_match(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#87 - def on_casgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_class(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#79 - def on_const(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_const_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#176 - def on_csend(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#32 - def on_cvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#56 - def on_cvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#155 - def on_def(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_defined?(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#164 - def on_defs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_dstr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_dsym(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_eflipflop(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#283 - def on_empty_else(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_ensure(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_erange(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_find_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_for(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_forward_arg(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#32 - def on_gvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#56 - def on_gvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_hash(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_hash_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_if(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_if_guard(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_iflipflop(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_in_match(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_in_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_index(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_indexasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_irange(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#32 - def on_ivar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#56 - def on_ivasgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_kwarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_kwargs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_kwbegin(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_kwoptarg(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_kwrestarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_kwsplat(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_lambda(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#32 - def on_lvar(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#56 - def on_lvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_masgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_match_alt(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_match_as(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_match_current_line(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_match_pattern(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_match_pattern_p(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_match_rest(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#32 - def on_match_var(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_match_with_lvasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_mlhs(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_module(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_next(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_not(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#32 - def on_nth_ref(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#193 - def on_numblock(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#68 - def on_op_asgn(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_optarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_or(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_or_asgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_pair(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_pin(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_postexe(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_preexe(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#130 - def on_procarg0(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_redo(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_regexp(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_resbody(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_rescue(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_restarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_restarg_expr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_retry(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_return(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_sclass(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#176 - def on_send(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#116 - def on_shadowarg(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_splat(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_super(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_undef(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_unless_guard(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_until(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_until_post(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#27 - def on_var(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#43 - def on_vasgn(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_when(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_while(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_while_post(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_xstr(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def on_yield(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#276 - def process_argument_node(node); end - - # @api public - # - # source://parser//lib/parser/ast/processor.rb#10 - def process_regular_node(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#268 - def process_var_asgn_node(node); end - - # @api public - # @private - # - # source://parser//lib/parser/ast/processor.rb#260 - def process_variable_node(node); end -end - -# Base class for version-specific parsers. -# -# @api public -# -# source://parser//lib/parser/base.rb#29 -class Parser::Base < ::Racc::Parser - # @api public - # @param builder [Parser::Builders::Default] The AST builder to use. - # @return [Base] a new instance of Base - # - # source://parser//lib/parser/base.rb#126 - def initialize(builder = T.unsafe(nil)); end - - # @api public - # - # source://parser//lib/parser/base.rb#114 - def builder; end - - # @api public - # - # source://parser//lib/parser/base.rb#117 - def context; end - - # @api public - # - # source://parser//lib/parser/base.rb#119 - def current_arg_stack; end - - # @api public - # @return [Parser::Diagnostic::Engine] - # - # source://parser//lib/parser/base.rb#113 - def diagnostics; end - - # @api public - # - # source://parser//lib/parser/base.rb#112 - def lexer; end - - # @api public - # - # source://parser//lib/parser/base.rb#118 - def max_numparam_stack; end - - # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] The source buffer to parse. - # @return [Parser::AST::Node, nil] - # - # source://parser//lib/parser/base.rb#186 - def parse(source_buffer); end - - # Parses a source buffer and returns the AST and the source code comments. - # - # @api public - # @return [Array] - # @see #parse - # @see Parser::Source::Comment#associate - # - # source://parser//lib/parser/base.rb#204 - def parse_with_comments(source_buffer); end - - # @api public - # - # source://parser//lib/parser/base.rb#121 - def pattern_hash_keys; end - - # @api public - # - # source://parser//lib/parser/base.rb#120 - def pattern_variables; end - - # Resets the state of the parser. - # - # @api public - # - # source://parser//lib/parser/base.rb#167 - def reset; end - - # @api public - # - # source://parser//lib/parser/base.rb#116 - def source_buffer; end - - # @api public - # @return [Parser::StaticEnvironment] - # - # source://parser//lib/parser/base.rb#115 - def static_env; end - - # Parses a source buffer and returns the AST, the source code comments, - # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} - # is raised, unless `recover` is true. In case of an error - # (non-fatal or recovered), `nil` is returned instead of the AST, and - # comments as well as tokens are only returned up to the location of - # the error. - # - # Currently, token stream format returned by #tokenize is not documented, - # but is considered part of a public API and only changed according - # to Semantic Versioning. - # - # However, note that the exact token composition of various constructs - # might vary. For example, a string `"foo"` is represented equally well - # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and - # `:tSTRING "foo"`; such details must not be relied upon. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param recover [Boolean] If true, recover from syntax errors. False by default. - # @return [Array] - # - # source://parser//lib/parser/base.rb#233 - def tokenize(source_buffer, recover = T.unsafe(nil)); end - - private - - # @api public - # - # source://parser//lib/parser/base.rb#257 - def check_kwarg_name(name_t); end - - # @api public - # - # source://parser//lib/parser/base.rb#266 - def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end - - # @api public - # - # source://parser//lib/parser/base.rb#251 - def next_token; end - - # @api public - # - # source://parser//lib/parser/base.rb#282 - def on_error(error_token_id, error_value, value_stack); end - - class << self - # @api public - # @return [Parser::Base] parser with the default options set. - # - # source://parser//lib/parser/base.rb#84 - def default_parser; end - - # Parses a string of Ruby code and returns the AST. If the source - # cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @example - # Parser::Base.parse('puts "hello"') - # @param string [String] The block of code to parse. - # @param file [String] The name of the file the code originated from. - # @param line [Numeric] The initial line number. - # @return [Parser::AST::Node] - # - # source://parser//lib/parser/base.rb#30 - def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - - # Parses Ruby source code by reading it from a file. If the source - # cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @param filename [String] Path to the file to parse. - # @return [Parser::AST::Node] - # @see #parse - # - # source://parser//lib/parser/base.rb#64 - def parse_file(filename); end - - # Parses Ruby source code by reading it from a file and returns the AST and - # comments. If the source cannot be parsed, {SyntaxError} is raised and a - # diagnostic is printed to `stderr`. - # - # @api public - # @param filename [String] Path to the file to parse. - # @return [Array] - # @see #parse - # - # source://parser//lib/parser/base.rb#77 - def parse_file_with_comments(filename); end - - # Parses a string of Ruby code and returns the AST and comments. If the - # source cannot be parsed, {SyntaxError} is raised and a diagnostic is - # printed to `stderr`. - # - # @api public - # @example - # Parser::Base.parse_with_comments('puts "hello"') - # @param string [String] The block of code to parse. - # @param file [String] The name of the file the code originated from. - # @param line [Numeric] The initial line number. - # @return [Array] - # - # source://parser//lib/parser/base.rb#49 - def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - - private - - # @api public - # - # source://parser//lib/parser/base.rb#97 - def setup_source_buffer(file, line, string, encoding); end - end -end - -# @api public -# -# source://parser//lib/parser.rb#72 -module Parser::Builders; end - -# source://parser//lib/parser/builders/default.rb#8 -class Parser::Builders::Default - # source://parser//lib/parser/builders/default.rb#243 - def initialize; end - - # source://parser//lib/parser/builders/default.rb#696 - def __ENCODING__(__ENCODING__t); end - - # source://parser//lib/parser/builders/default.rb#348 - def __FILE__(__FILE__t); end - - # source://parser//lib/parser/builders/default.rb#312 - def __LINE__(__LINE__t); end - - # source://parser//lib/parser/builders/default.rb#622 - def accessible(node); end - - # source://parser//lib/parser/builders/default.rb#871 - def alias(alias_t, to, from); end - - # source://parser//lib/parser/builders/default.rb#910 - def arg(name_t); end - - # source://parser//lib/parser/builders/default.rb#1000 - def arg_expr(expr); end - - # source://parser//lib/parser/builders/default.rb#880 - def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#440 - def array(begin_t, elements, end_t); end - - # source://parser//lib/parser/builders/default.rb#1575 - def array_pattern(lbrack_t, elements, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#760 - def assign(lhs, eql_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#705 - def assignable(node); end - - # source://parser//lib/parser/builders/default.rb#540 - def associate(begin_t, pairs, end_t); end - - # source://parser//lib/parser/builders/default.rb#1156 - def attr_asgn(receiver, dot_t, selector_t); end - - # source://parser//lib/parser/builders/default.rb#612 - def back_ref(token); end - - # source://parser//lib/parser/builders/default.rb#1420 - def begin(begin_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1362 - def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1438 - def begin_keyword(begin_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1190 - def binary_op(receiver, operator_t, arg); end - - # source://parser//lib/parser/builders/default.rb#1107 - def block(method_call, begin_t, args, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1142 - def block_pass(amper_t, arg); end - - # source://parser//lib/parser/builders/default.rb#975 - def blockarg(amper_t, name_t); end - - # source://parser//lib/parser/builders/default.rb#1020 - def blockarg_expr(amper_t, expr); end - - # source://parser//lib/parser/builders/default.rb#1098 - def call_lambda(lambda_t); end - - # source://parser//lib/parser/builders/default.rb#1081 - def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1061 - def call_type_for_dot(dot_t); end - - # source://parser//lib/parser/builders/default.rb#1295 - def case(case_t, expr, when_bodies, else_t, else_body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1458 - def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end - - # source://parser//lib/parser/builders/default.rb#343 - def character(char_t); end - - # source://parser//lib/parser/builders/default.rb#284 - def complex(complex_t); end - - # source://parser//lib/parser/builders/default.rb#1408 - def compstmt(statements); end - - # source://parser//lib/parser/builders/default.rb#1271 - def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end - - # source://parser//lib/parser/builders/default.rb#1277 - def condition_mod(if_true, if_false, cond_t, cond); end - - # source://parser//lib/parser/builders/default.rb#679 - def const(name_t); end - - # source://parser//lib/parser/builders/default.rb#691 - def const_fetch(scope, t_colon2, name_t); end - - # source://parser//lib/parser/builders/default.rb#684 - def const_global(t_colon3, name_t); end - - # source://parser//lib/parser/builders/default.rb#756 - def const_op_assignable(node); end - - # source://parser//lib/parser/builders/default.rb#1605 - def const_pattern(const, ldelim_t, pattern, rdelim_t); end - - # source://parser//lib/parser/builders/default.rb#607 - def cvar(token); end - - # source://parser//lib/parser/builders/default.rb#388 - def dedent_string(node, dedent_level); end - - # source://parser//lib/parser/builders/default.rb#807 - def def_class(class_t, name, lt_t, superclass, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#838 - def def_endless_method(def_t, name_t, args, assignment_t, body); end - - # source://parser//lib/parser/builders/default.rb#856 - def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end - - # source://parser//lib/parser/builders/default.rb#830 - def def_method(def_t, name_t, args, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#820 - def def_module(module_t, name, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#814 - def def_sclass(class_t, lshft_t, expr, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#846 - def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#237 - def emit_file_line_as_literals; end - - # source://parser//lib/parser/builders/default.rb#237 - def emit_file_line_as_literals=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#265 - def false(false_t); end - - # source://parser//lib/parser/builders/default.rb#1596 - def find_pattern(lbrack_t, elements, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#276 - def float(float_t); end - - # source://parser//lib/parser/builders/default.rb#1316 - def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#906 - def forward_arg(dots_t); end - - # source://parser//lib/parser/builders/default.rb#896 - def forward_only_args(begin_t, dots_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#1077 - def forwarded_args(dots_t); end - - # source://parser//lib/parser/builders/default.rb#602 - def gvar(token); end - - # source://parser//lib/parser/builders/default.rb#1569 - def hash_pattern(lbrace_t, kwargs, rbrace_t); end - - # source://parser//lib/parser/builders/default.rb#592 - def ident(token); end - - # source://parser//lib/parser/builders/default.rb#1485 - def if_guard(if_t, if_body); end - - # source://parser//lib/parser/builders/default.rb#1464 - def in_match(lhs, in_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1479 - def in_pattern(in_t, pattern, guard, then_t, body); end - - # source://parser//lib/parser/builders/default.rb#1165 - def index(receiver, lbrack_t, indexes, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#1179 - def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#272 - def integer(integer_t); end - - # source://parser//lib/parser/builders/default.rb#597 - def ivar(token); end - - # source://parser//lib/parser/builders/default.rb#1324 - def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#937 - def kwarg(name_t); end - - # source://parser//lib/parser/builders/default.rb#963 - def kwnilarg(dstar_t, nil_t); end - - # source://parser//lib/parser/builders/default.rb#944 - def kwoptarg(name_t, value); end - - # source://parser//lib/parser/builders/default.rb#951 - def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#535 - def kwsplat(dstar_t, arg); end - - # source://parser//lib/parser/builders/default.rb#1264 - def logical_op(type, lhs, op_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1302 - def loop(type, keyword_t, cond, do_t, body, end_t); end - - # source://parser//lib/parser/builders/default.rb#1307 - def loop_mod(type, body, keyword_t, cond); end - - # source://parser//lib/parser/builders/default.rb#1619 - def match_alt(left, pipe_t, right); end - - # source://parser//lib/parser/builders/default.rb#1626 - def match_as(value, assoc_t, as); end - - # source://parser//lib/parser/builders/default.rb#1505 - def match_hash_var(name_t); end - - # source://parser//lib/parser/builders/default.rb#1519 - def match_hash_var_from_str(begin_t, strings, end_t); end - - # source://parser//lib/parser/builders/default.rb#1657 - def match_label(label_type, label); end - - # source://parser//lib/parser/builders/default.rb#1633 - def match_nil_pattern(dstar_t, nil_t); end - - # source://parser//lib/parser/builders/default.rb#1212 - def match_op(receiver, match_t, arg); end - - # source://parser//lib/parser/builders/default.rb#1638 - def match_pair(label_type, label, value); end - - # source://parser//lib/parser/builders/default.rb#1469 - def match_pattern(lhs, match_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1474 - def match_pattern_p(lhs, match_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#1558 - def match_rest(star_t, name_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1493 - def match_var(name_t); end - - # source://parser//lib/parser/builders/default.rb#1601 - def match_with_trailing_comma(match, comma_t); end - - # source://parser//lib/parser/builders/default.rb#798 - def multi_assign(lhs, eql_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#793 - def multi_lhs(begin_t, items, end_t); end - - # source://parser//lib/parser/builders/default.rb#255 - def nil(nil_t); end - - # source://parser//lib/parser/builders/default.rb#1240 - def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#617 - def nth_ref(token); end - - # source://parser//lib/parser/builders/default.rb#892 - def numargs(max_numparam); end - - # source://parser//lib/parser/builders/default.rb#1031 - def objc_kwarg(kwname_t, assoc_t, name_t); end - - # source://parser//lib/parser/builders/default.rb#1045 - def objc_restarg(star_t, name = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1147 - def objc_varargs(pair, rest_of_varargs); end - - # source://parser//lib/parser/builders/default.rb#767 - def op_assign(lhs, op_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#917 - def optarg(name_t, eql_t, value); end - - # source://parser//lib/parser/builders/default.rb#488 - def pair(key, assoc_t, value); end - - # source://parser//lib/parser/builders/default.rb#505 - def pair_keyword(key_t, value); end - - # source://parser//lib/parser/builders/default.rb#521 - def pair_label(key_t); end - - # source://parser//lib/parser/builders/default.rb#493 - def pair_list_18(list); end - - # source://parser//lib/parser/builders/default.rb#513 - def pair_quoted(begin_t, parts, end_t, value); end - - # source://parser//lib/parser/builders/default.rb#225 - def parser; end - - # source://parser//lib/parser/builders/default.rb#225 - def parser=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#1614 - def pin(pin_t, var); end - - # source://parser//lib/parser/builders/default.rb#1347 - def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end - - # source://parser//lib/parser/builders/default.rb#1342 - def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end - - # source://parser//lib/parser/builders/default.rb#985 - def procarg0(arg); end - - # source://parser//lib/parser/builders/default.rb#578 - def range_exclusive(lhs, dot3_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#573 - def range_inclusive(lhs, dot2_t, rhs); end - - # source://parser//lib/parser/builders/default.rb#280 - def rational(rational_t); end - - # source://parser//lib/parser/builders/default.rb#426 - def regexp_compose(begin_t, parts, end_t, options); end - - # source://parser//lib/parser/builders/default.rb#417 - def regexp_options(regopt_t); end - - # source://parser//lib/parser/builders/default.rb#1354 - def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end - - # source://parser//lib/parser/builders/default.rb#926 - def restarg(star_t, name_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1009 - def restarg_expr(star_t, expr = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#587 - def self(token); end - - # source://parser//lib/parser/builders/default.rb#968 - def shadowarg(name_t); end - - # source://parser//lib/parser/builders/default.rb#445 - def splat(star_t, arg = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#319 - def string(string_t); end - - # source://parser//lib/parser/builders/default.rb#329 - def string_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#324 - def string_internal(string_t); end - - # source://parser//lib/parser/builders/default.rb#355 - def symbol(symbol_t); end - - # source://parser//lib/parser/builders/default.rb#365 - def symbol_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#360 - def symbol_internal(symbol_t); end - - # source://parser//lib/parser/builders/default.rb#469 - def symbols_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#1282 - def ternary(cond, question_t, if_true, colon_t, if_false); end - - # source://parser//lib/parser/builders/default.rb#260 - def true(true_t); end - - # source://parser//lib/parser/builders/default.rb#294 - def unary_num(unary_t, numeric); end - - # source://parser//lib/parser/builders/default.rb#1228 - def unary_op(op_t, receiver); end - - # source://parser//lib/parser/builders/default.rb#866 - def undef_method(undef_t, names); end - - # source://parser//lib/parser/builders/default.rb#1489 - def unless_guard(unless_t, unless_body); end - - # source://parser//lib/parser/builders/default.rb#1289 - def when(when_t, patterns, then_t, body); end - - # source://parser//lib/parser/builders/default.rb#455 - def word(parts); end - - # source://parser//lib/parser/builders/default.rb#464 - def words_compose(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#381 - def xstring_compose(begin_t, parts, end_t); end - - private - - # source://parser//lib/parser/builders/default.rb#1796 - def arg_name_collides?(this_name, that_name); end - - # source://parser//lib/parser/builders/default.rb#1992 - def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1966 - def binary_op_map(left_e, op_t, right_e); end - - # source://parser//lib/parser/builders/default.rb#2094 - def block_map(receiver_l, begin_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#1771 - def check_assignment_to_numparam(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1673 - def check_condition(cond); end - - # source://parser//lib/parser/builders/default.rb#1742 - def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1717 - def check_duplicate_args(args, map = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1829 - def check_duplicate_pattern_key(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1819 - def check_duplicate_pattern_variable(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1811 - def check_lvar_name(name, loc); end - - # source://parser//lib/parser/builders/default.rb#1786 - def check_reserved_for_numparam(name, loc); end - - # source://parser//lib/parser/builders/default.rb#2251 - def collapse_string_parts?(parts); end - - # source://parser//lib/parser/builders/default.rb#1917 - def collection_map(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#2121 - def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end - - # source://parser//lib/parser/builders/default.rb#1952 - def constant_map(scope, colon2_t, name_t); end - - # source://parser//lib/parser/builders/default.rb#2025 - def definition_map(keyword_t, operator_t, name_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#1858 - def delimited_string_map(string_t); end - - # source://parser//lib/parser/builders/default.rb#2273 - def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#2165 - def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end - - # source://parser//lib/parser/builders/default.rb#2031 - def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end - - # source://parser//lib/parser/builders/default.rb#1913 - def expr_map(loc); end - - # source://parser//lib/parser/builders/default.rb#2146 - def for_map(keyword_t, in_t, begin_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#2193 - def guard_map(keyword_t, guard_body_e); end - - # source://parser//lib/parser/builders/default.rb#2083 - def index_map(receiver_e, lbrack_t, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#1849 - def join_exprs(left_expr, right_expr); end - - # source://parser//lib/parser/builders/default.rb#2099 - def keyword_map(keyword_t, begin_t, args, end_t); end - - # source://parser//lib/parser/builders/default.rb#2116 - def keyword_mod_map(pre_e, keyword_t, post_e); end - - # source://parser//lib/parser/builders/default.rb#2002 - def kwarg_map(name_t, value_e = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#2304 - def kwargs?(node); end - - # source://parser//lib/parser/builders/default.rb#2268 - def loc(token); end - - # source://parser//lib/parser/builders/default.rb#2015 - def module_definition_map(keyword_t, name_e, operator_t, end_t); end - - # source://parser//lib/parser/builders/default.rb#1841 - def n(type, children, source_map); end - - # source://parser//lib/parser/builders/default.rb#1845 - def n0(type, source_map); end - - # source://parser//lib/parser/builders/default.rb#288 - def numeric(kind, token); end - - # source://parser//lib/parser/builders/default.rb#1883 - def pair_keyword_map(key_t, value_e); end - - # source://parser//lib/parser/builders/default.rb#1898 - def pair_quoted_map(begin_t, end_t, value_e); end - - # source://parser//lib/parser/builders/default.rb#1869 - def prefix_string_map(symbol); end - - # source://parser//lib/parser/builders/default.rb#1980 - def range_map(start_e, op_t, end_e); end - - # source://parser//lib/parser/builders/default.rb#1947 - def regexp_map(begin_t, end_t, options_e); end - - # source://parser//lib/parser/builders/default.rb#2152 - def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end - - # source://parser//lib/parser/builders/default.rb#2294 - def rewrite_hash_args_to_kwargs(args); end - - # source://parser//lib/parser/builders/default.rb#2065 - def send_binary_op_map(lhs_e, selector_t, rhs_e); end - - # source://parser//lib/parser/builders/default.rb#2088 - def send_index_map(receiver_e, lbrack_t, rbrack_t); end - - # source://parser//lib/parser/builders/default.rb#2039 - def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#2071 - def send_unary_op_map(selector_t, arg_e); end - - # source://parser//lib/parser/builders/default.rb#2224 - def static_regexp(parts, options); end - - # source://parser//lib/parser/builders/default.rb#2244 - def static_regexp_node(node); end - - # source://parser//lib/parser/builders/default.rb#2207 - def static_string(nodes); end - - # source://parser//lib/parser/builders/default.rb#1933 - def string_map(begin_t, parts, end_t); end - - # source://parser//lib/parser/builders/default.rb#2260 - def string_value(token); end - - # source://parser//lib/parser/builders/default.rb#2141 - def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end - - # source://parser//lib/parser/builders/default.rb#1854 - def token_map(token); end - - # source://parser//lib/parser/builders/default.rb#1970 - def unary_op_map(op_t, arg_e = T.unsafe(nil)); end - - # source://parser//lib/parser/builders/default.rb#1878 - def unquoted_map(token); end - - # source://parser//lib/parser/builders/default.rb#2282 - def validate_definee(definee); end - - # source://parser//lib/parser/builders/default.rb#1756 - def validate_no_forward_arg_after_restarg(args); end - - # source://parser//lib/parser/builders/default.rb#2256 - def value(token); end - - # source://parser//lib/parser/builders/default.rb#2059 - def var_send_map(variable_e); end - - # source://parser//lib/parser/builders/default.rb#1962 - def variable_map(name_t); end - - class << self - # source://parser//lib/parser/builders/default.rb#97 - def emit_arg_inside_procarg0; end - - # source://parser//lib/parser/builders/default.rb#97 - def emit_arg_inside_procarg0=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#58 - def emit_encoding; end - - # source://parser//lib/parser/builders/default.rb#58 - def emit_encoding=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#126 - def emit_forward_arg; end - - # source://parser//lib/parser/builders/default.rb#126 - def emit_forward_arg=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#80 - def emit_index; end - - # source://parser//lib/parser/builders/default.rb#80 - def emit_index=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#174 - def emit_kwargs; end - - # source://parser//lib/parser/builders/default.rb#174 - def emit_kwargs=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#22 - def emit_lambda; end - - # source://parser//lib/parser/builders/default.rb#22 - def emit_lambda=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#203 - def emit_match_pattern; end - - # source://parser//lib/parser/builders/default.rb#203 - def emit_match_pattern=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#40 - def emit_procarg0; end - - # source://parser//lib/parser/builders/default.rb#40 - def emit_procarg0=(_arg0); end - - # source://parser//lib/parser/builders/default.rb#211 - def modernize; end - end -end - -# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} -# detects a clobbering rewrite action. This class inherits {RuntimeError} -# rather than {StandardError} for backward compatibility. -# -# @api public -# -# source://parser//lib/parser/clobbering_error.rb#11 -class Parser::ClobberingError < ::RuntimeError; end - -# Context of parsing that is represented by a stack of scopes. -# -# Supported states: -# + :class - in the class body (class A; end) -# + :module - in the module body (module M; end) -# + :sclass - in the singleton class body (class << obj; end) -# + :def - in the method body (def m; end) -# + :defs - in the singleton method body (def self.m; end) -# + :def_open_args - in the arglist of the method definition -# keep in mind that it's set **only** after reducing the first argument, -# if you need to handle the first argument check `lex_state == expr_fname` -# + :block - in the block body (tap {}) -# + :lambda - in the lambda body (-> {}) -# -# source://parser//lib/parser/context.rb#18 -class Parser::Context - # @return [Context] a new instance of Context - # - # source://parser//lib/parser/context.rb#29 - def initialize; end - - # source://parser//lib/parser/context.rb#43 - def in_argdef; end - - # source://parser//lib/parser/context.rb#43 - def in_argdef=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_block; end - - # source://parser//lib/parser/context.rb#43 - def in_block=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_class; end - - # source://parser//lib/parser/context.rb#43 - def in_class=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_def; end - - # source://parser//lib/parser/context.rb#43 - def in_def=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_defined; end - - # source://parser//lib/parser/context.rb#43 - def in_defined=(_arg0); end - - # @return [Boolean] - # - # source://parser//lib/parser/context.rb#45 - def in_dynamic_block?; end - - # source://parser//lib/parser/context.rb#43 - def in_kwarg; end - - # source://parser//lib/parser/context.rb#43 - def in_kwarg=(_arg0); end - - # source://parser//lib/parser/context.rb#43 - def in_lambda; end - - # source://parser//lib/parser/context.rb#43 - def in_lambda=(_arg0); end - - # source://parser//lib/parser/context.rb#33 - def reset; end -end - -# source://parser//lib/parser/context.rb#19 -Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) - -# Stack that holds names of current arguments, -# i.e. while parsing -# def m1(a = (def m2(b = def m3(c = 1); end); end)); end -# ^ -# stack is [:a, :b, :c] -# -# Emulates `p->cur_arg` in MRI's parse.y -# -# @api private -# -# source://parser//lib/parser/current_arg_stack.rb#14 -class Parser::CurrentArgStack - # @api private - # @return [CurrentArgStack] a new instance of CurrentArgStack - # - # source://parser//lib/parser/current_arg_stack.rb#17 - def initialize; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/current_arg_stack.rb#22 - def empty?; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#34 - def pop; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#26 - def push(value); end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#38 - def reset; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#30 - def set(value); end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#15 - def stack; end - - # @api private - # - # source://parser//lib/parser/current_arg_stack.rb#42 - def top; end -end - -# @api private -# -# source://parser//lib/parser/deprecation.rb#7 -module Parser::Deprecation - # @api private - # - # source://parser//lib/parser/deprecation.rb#9 - def warn_of_deprecation; end - - # @api private - # - # source://parser//lib/parser/deprecation.rb#8 - def warned_of_deprecation=(_arg0); end -end - -# @api public -# -# source://parser//lib/parser/diagnostic.rb#31 -class Parser::Diagnostic - # @api public - # @param level [Symbol] - # @param reason [Symbol] - # @param arguments [Hash] - # @param location [Parser::Source::Range] - # @param highlights [Array] - # @return [Diagnostic] a new instance of Diagnostic - # - # source://parser//lib/parser/diagnostic.rb#49 - def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end - - # @api public - # @return [Symbol] extended arguments that describe the error - # @see Parser::MESSAGES - # - # source://parser//lib/parser/diagnostic.rb#39 - def arguments; end - - # Supplementary error-related source ranges. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#40 - def highlights; end - - # @api public - # @return [Symbol] diagnostic level - # @see LEVELS - # - # source://parser//lib/parser/diagnostic.rb#39 - def level; end - - # Main error-related source range. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#40 - def location; end - - # @api public - # @return [String] the rendered message. - # - # source://parser//lib/parser/diagnostic.rb#69 - def message; end - - # @api public - # @return [Symbol] reason for error - # @see Parser::MESSAGES - # - # source://parser//lib/parser/diagnostic.rb#39 - def reason; end - - # Renders the diagnostic message as a clang-like diagnostic. - # - # @api public - # @example - # diagnostic.render # => - # # [ - # # "(fragment:0):1:5: error: unexpected token $end", - # # "foo +", - # # " ^" - # # ] - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#86 - def render; end - - private - - # If necessary, shrink a `Range` so as to include only the first line. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#142 - def first_line_only(range); end - - # If necessary, shrink a `Range` so as to include only the last line. - # - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/diagnostic.rb#155 - def last_line_only(range); end - - # Renders one source line in clang diagnostic style, with highlights. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/diagnostic.rb#110 - def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end -end - -# source://parser//lib/parser/diagnostic/engine.rb#36 -class Parser::Diagnostic::Engine - # source://parser//lib/parser/diagnostic/engine.rb#45 - def initialize(consumer = T.unsafe(nil)); end - - # source://parser//lib/parser/diagnostic/engine.rb#39 - def all_errors_are_fatal; end - - # source://parser//lib/parser/diagnostic/engine.rb#39 - def all_errors_are_fatal=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#37 - def consumer; end - - # source://parser//lib/parser/diagnostic/engine.rb#37 - def consumer=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#40 - def ignore_warnings; end - - # source://parser//lib/parser/diagnostic/engine.rb#40 - def ignore_warnings=(_arg0); end - - # source://parser//lib/parser/diagnostic/engine.rb#64 - def process(diagnostic); end - - protected - - # source://parser//lib/parser/diagnostic/engine.rb#86 - def ignore?(diagnostic); end - - # source://parser//lib/parser/diagnostic/engine.rb#97 - def raise?(diagnostic); end -end - -# Collection of the available diagnostic levels. -# -# @api public -# @return [Array] -# -# source://parser//lib/parser/diagnostic.rb#37 -Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) - -# line 3 "lib/parser/lexer.rl" -# -# === BEFORE YOU START === -# -# Read the Ruby Hacking Guide chapter 11, available in English at -# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ -# -# Remember two things about Ragel scanners: -# -# 1) Longest match wins. -# -# 2) If two matches have the same length, the first -# in source code wins. -# -# General rules of making Ragel and Bison happy: -# -# * `p` (position) and `@te` contain the index of the character -# they're pointing to ("current"), plus one. `@ts` contains the index -# of the corresponding character. The code for extracting matched token is: -# -# @source_buffer.slice(@ts...@te) -# -# * If your input is `foooooooobar` and the rule is: -# -# 'f' 'o'+ -# -# the result will be: -# -# foooooooobar -# ^ ts=0 ^ p=te=9 -# -# * A Ragel lexer action should not emit more than one token, unless -# you know what you are doing. -# -# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. -# -# * If an action emits the token and transitions to another state, use -# these Ragel commands: -# -# emit($whatever) -# fnext $next_state; fbreak; -# -# If you perform `fgoto` in an action which does not emit a token nor -# rewinds the stream pointer, the parser's side-effectful, -# context-sensitive lookahead actions will break in a hard to detect -# and debug way. -# -# * If an action does not emit a token: -# -# fgoto $next_state; -# -# * If an action features lookbehind, i.e. matches characters with the -# intent of passing them to another action: -# -# p = @ts - 1 -# fgoto $next_state; -# -# or, if the lookbehind consists of a single character: -# -# fhold; fgoto $next_state; -# -# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and -# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result -# _will_ invoke the action `act`. -# -# e_something stands for "something with **e**mbedded action". -# -# * EOF is explicit and is matched by `c_eof`. If you want to introspect -# the state of the lexer, add this rule to the state: -# -# c_eof => do_eof; -# -# * If you proceed past EOF, the lexer will complain: -# -# NoMethodError: undefined method `ord' for nil:NilClass -# -# source://parser//lib/parser/lexer.rb#82 -class Parser::Lexer - # @return [Lexer] a new instance of Lexer - # - # source://parser//lib/parser/lexer.rb#11148 - def initialize(version); end - - # Return next token: [type, value]. - # - # source://parser//lib/parser/lexer.rb#11303 - def advance; end - - # Returns the value of attribute cmdarg. - # - # source://parser//lib/parser/lexer.rb#11142 - def cmdarg; end - - # Sets the attribute cmdarg - # - # @param value the value to set the attribute cmdarg to. - # - # source://parser//lib/parser/lexer.rb#11142 - def cmdarg=(_arg0); end - - # Returns the value of attribute cmdarg_stack. - # - # source://parser//lib/parser/lexer.rb#11146 - def cmdarg_stack; end - - # Returns the value of attribute command_start. - # - # source://parser//lib/parser/lexer.rb#11142 - def command_start; end - - # Sets the attribute command_start - # - # @param value the value to set the attribute command_start to. - # - # source://parser//lib/parser/lexer.rb#11142 - def command_start=(_arg0); end - - # Returns the value of attribute comments. - # - # source://parser//lib/parser/lexer.rb#11144 - def comments; end - - # Sets the attribute comments - # - # @param value the value to set the attribute comments to. - # - # source://parser//lib/parser/lexer.rb#11144 - def comments=(_arg0); end - - # Returns the value of attribute cond. - # - # source://parser//lib/parser/lexer.rb#11142 - def cond; end - - # Sets the attribute cond - # - # @param value the value to set the attribute cond to. - # - # source://parser//lib/parser/lexer.rb#11142 - def cond=(_arg0); end - - # Returns the value of attribute cond_stack. - # - # source://parser//lib/parser/lexer.rb#11146 - def cond_stack; end - - # Returns the value of attribute context. - # - # source://parser//lib/parser/lexer.rb#11142 - def context; end - - # Sets the attribute context - # - # @param value the value to set the attribute context to. - # - # source://parser//lib/parser/lexer.rb#11142 - def context=(_arg0); end - - # source://parser//lib/parser/lexer.rb#11295 - def dedent_level; end - - # Returns the value of attribute diagnostics. - # - # source://parser//lib/parser/lexer.rb#11138 - def diagnostics; end - - # Sets the attribute diagnostics - # - # @param value the value to set the attribute diagnostics to. - # - # source://parser//lib/parser/lexer.rb#11138 - def diagnostics=(_arg0); end - - # source://parser//lib/parser/lexer.rb#11245 - def encoding; end - - # Returns the value of attribute force_utf32. - # - # source://parser//lib/parser/lexer.rb#11140 - def force_utf32; end - - # Sets the attribute force_utf32 - # - # @param value the value to set the attribute force_utf32 to. - # - # source://parser//lib/parser/lexer.rb#11140 - def force_utf32=(_arg0); end - - # Returns the value of attribute lambda_stack. - # - # source://parser//lib/parser/lexer.rb#11146 - def lambda_stack; end - - # Returns the value of attribute paren_nest. - # - # source://parser//lib/parser/lexer.rb#11146 - def paren_nest; end - - # source://parser//lib/parser/lexer.rb#11282 - def pop_cmdarg; end - - # source://parser//lib/parser/lexer.rb#11291 - def pop_cond; end - - # source://parser//lib/parser/lexer.rb#11277 - def push_cmdarg; end - - # source://parser//lib/parser/lexer.rb#11286 - def push_cond; end - - # source://parser//lib/parser/lexer.rb#11159 - def reset(reset_state = T.unsafe(nil)); end - - # Returns the value of attribute source_buffer. - # - # source://parser//lib/parser/lexer.rb#11136 - def source_buffer; end - - # source://parser//lib/parser/lexer.rb#11224 - def source_buffer=(source_buffer); end - - # source://parser//lib/parser/lexer.rb#11269 - def state; end - - # source://parser//lib/parser/lexer.rb#11273 - def state=(state); end - - # Returns the value of attribute static_env. - # - # source://parser//lib/parser/lexer.rb#11139 - def static_env; end - - # Sets the attribute static_env - # - # @param value the value to set the attribute static_env to. - # - # source://parser//lib/parser/lexer.rb#11139 - def static_env=(_arg0); end - - # Returns the value of attribute tokens. - # - # source://parser//lib/parser/lexer.rb#11144 - def tokens; end - - # Sets the attribute tokens - # - # @param value the value to set the attribute tokens to. - # - # source://parser//lib/parser/lexer.rb#11144 - def tokens=(_arg0); end - - protected - - # source://parser//lib/parser/lexer.rb#24883 - def arg_or_cmdarg(cmd_state); end - - # source://parser//lib/parser/lexer.rb#24903 - def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer.rb#24857 - def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer.rb#24891 - def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer.rb#24873 - def emit_do(do_block = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer.rb#24867 - def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer.rb#24845 - def encode_escape(ord); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer.rb#24832 - def eof_codepoint?(point); end - - # source://parser//lib/parser/lexer.rb#24946 - def literal; end - - # source://parser//lib/parser/lexer.rb#24918 - def next_state_for_literal(literal); end - - # source://parser//lib/parser/lexer.rb#24950 - def pop_literal; end - - # === LITERAL STACK === - # - # source://parser//lib/parser/lexer.rb#24912 - def push_literal(*args); end - - # source://parser//lib/parser/lexer.rb#24853 - def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer.rb#24840 - def stack_pop; end - - # source://parser//lib/parser/lexer.rb#24849 - def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://parser//lib/parser/lexer.rb#24836 - def version?(*versions); end - - class << self - # Returns the value of attribute lex_en_expr_arg. - # - # source://parser//lib/parser/lexer.rb#11080 - def lex_en_expr_arg; end - - # Sets the attribute lex_en_expr_arg - # - # @param value the value to set the attribute lex_en_expr_arg to. - # - # source://parser//lib/parser/lexer.rb#11080 - def lex_en_expr_arg=(_arg0); end - - # Returns the value of attribute lex_en_expr_beg. - # - # source://parser//lib/parser/lexer.rb#11096 - def lex_en_expr_beg; end - - # Sets the attribute lex_en_expr_beg - # - # @param value the value to set the attribute lex_en_expr_beg to. - # - # source://parser//lib/parser/lexer.rb#11096 - def lex_en_expr_beg=(_arg0); end - - # Returns the value of attribute lex_en_expr_cmdarg. - # - # source://parser//lib/parser/lexer.rb#11084 - def lex_en_expr_cmdarg; end - - # Sets the attribute lex_en_expr_cmdarg - # - # @param value the value to set the attribute lex_en_expr_cmdarg to. - # - # source://parser//lib/parser/lexer.rb#11084 - def lex_en_expr_cmdarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_dot. - # - # source://parser//lib/parser/lexer.rb#11076 - def lex_en_expr_dot; end - - # Sets the attribute lex_en_expr_dot - # - # @param value the value to set the attribute lex_en_expr_dot to. - # - # source://parser//lib/parser/lexer.rb#11076 - def lex_en_expr_dot=(_arg0); end - - # Returns the value of attribute lex_en_expr_end. - # - # source://parser//lib/parser/lexer.rb#11108 - def lex_en_expr_end; end - - # Sets the attribute lex_en_expr_end - # - # @param value the value to set the attribute lex_en_expr_end to. - # - # source://parser//lib/parser/lexer.rb#11108 - def lex_en_expr_end=(_arg0); end - - # Returns the value of attribute lex_en_expr_endarg. - # - # source://parser//lib/parser/lexer.rb#11088 - def lex_en_expr_endarg; end - - # Sets the attribute lex_en_expr_endarg - # - # @param value the value to set the attribute lex_en_expr_endarg to. - # - # source://parser//lib/parser/lexer.rb#11088 - def lex_en_expr_endarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_endfn. - # - # source://parser//lib/parser/lexer.rb#11072 - def lex_en_expr_endfn; end - - # Sets the attribute lex_en_expr_endfn - # - # @param value the value to set the attribute lex_en_expr_endfn to. - # - # source://parser//lib/parser/lexer.rb#11072 - def lex_en_expr_endfn=(_arg0); end - - # Returns the value of attribute lex_en_expr_fname. - # - # source://parser//lib/parser/lexer.rb#11068 - def lex_en_expr_fname; end - - # Sets the attribute lex_en_expr_fname - # - # @param value the value to set the attribute lex_en_expr_fname to. - # - # source://parser//lib/parser/lexer.rb#11068 - def lex_en_expr_fname=(_arg0); end - - # Returns the value of attribute lex_en_expr_labelarg. - # - # source://parser//lib/parser/lexer.rb#11100 - def lex_en_expr_labelarg; end - - # Sets the attribute lex_en_expr_labelarg - # - # @param value the value to set the attribute lex_en_expr_labelarg to. - # - # source://parser//lib/parser/lexer.rb#11100 - def lex_en_expr_labelarg=(_arg0); end - - # Returns the value of attribute lex_en_expr_mid. - # - # source://parser//lib/parser/lexer.rb#11092 - def lex_en_expr_mid; end - - # Sets the attribute lex_en_expr_mid - # - # @param value the value to set the attribute lex_en_expr_mid to. - # - # source://parser//lib/parser/lexer.rb#11092 - def lex_en_expr_mid=(_arg0); end - - # Returns the value of attribute lex_en_expr_value. - # - # source://parser//lib/parser/lexer.rb#11104 - def lex_en_expr_value; end - - # Sets the attribute lex_en_expr_value - # - # @param value the value to set the attribute lex_en_expr_value to. - # - # source://parser//lib/parser/lexer.rb#11104 - def lex_en_expr_value=(_arg0); end - - # Returns the value of attribute lex_en_expr_variable. - # - # source://parser//lib/parser/lexer.rb#11064 - def lex_en_expr_variable; end - - # Sets the attribute lex_en_expr_variable - # - # @param value the value to set the attribute lex_en_expr_variable to. - # - # source://parser//lib/parser/lexer.rb#11064 - def lex_en_expr_variable=(_arg0); end - - # Returns the value of attribute lex_en_interp_backslash_delimited. - # - # source://parser//lib/parser/lexer.rb#11044 - def lex_en_interp_backslash_delimited; end - - # Sets the attribute lex_en_interp_backslash_delimited - # - # @param value the value to set the attribute lex_en_interp_backslash_delimited to. - # - # source://parser//lib/parser/lexer.rb#11044 - def lex_en_interp_backslash_delimited=(_arg0); end - - # Returns the value of attribute lex_en_interp_backslash_delimited_words. - # - # source://parser//lib/parser/lexer.rb#11052 - def lex_en_interp_backslash_delimited_words; end - - # Sets the attribute lex_en_interp_backslash_delimited_words - # - # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. - # - # source://parser//lib/parser/lexer.rb#11052 - def lex_en_interp_backslash_delimited_words=(_arg0); end - - # Returns the value of attribute lex_en_interp_string. - # - # source://parser//lib/parser/lexer.rb#11032 - def lex_en_interp_string; end - - # Sets the attribute lex_en_interp_string - # - # @param value the value to set the attribute lex_en_interp_string to. - # - # source://parser//lib/parser/lexer.rb#11032 - def lex_en_interp_string=(_arg0); end - - # Returns the value of attribute lex_en_interp_words. - # - # source://parser//lib/parser/lexer.rb#11028 - def lex_en_interp_words; end - - # Sets the attribute lex_en_interp_words - # - # @param value the value to set the attribute lex_en_interp_words to. - # - # source://parser//lib/parser/lexer.rb#11028 - def lex_en_interp_words=(_arg0); end - - # Returns the value of attribute lex_en_leading_dot. - # - # source://parser//lib/parser/lexer.rb#11112 - def lex_en_leading_dot; end - - # Sets the attribute lex_en_leading_dot - # - # @param value the value to set the attribute lex_en_leading_dot to. - # - # source://parser//lib/parser/lexer.rb#11112 - def lex_en_leading_dot=(_arg0); end - - # Returns the value of attribute lex_en_line_begin. - # - # source://parser//lib/parser/lexer.rb#11120 - def lex_en_line_begin; end - - # Sets the attribute lex_en_line_begin - # - # @param value the value to set the attribute lex_en_line_begin to. - # - # source://parser//lib/parser/lexer.rb#11120 - def lex_en_line_begin=(_arg0); end - - # Returns the value of attribute lex_en_line_comment. - # - # source://parser//lib/parser/lexer.rb#11116 - def lex_en_line_comment; end - - # Sets the attribute lex_en_line_comment - # - # @param value the value to set the attribute lex_en_line_comment to. - # - # source://parser//lib/parser/lexer.rb#11116 - def lex_en_line_comment=(_arg0); end - - # Returns the value of attribute lex_en_plain_backslash_delimited. - # - # source://parser//lib/parser/lexer.rb#11048 - def lex_en_plain_backslash_delimited; end - - # Sets the attribute lex_en_plain_backslash_delimited - # - # @param value the value to set the attribute lex_en_plain_backslash_delimited to. - # - # source://parser//lib/parser/lexer.rb#11048 - def lex_en_plain_backslash_delimited=(_arg0); end - - # Returns the value of attribute lex_en_plain_backslash_delimited_words. - # - # source://parser//lib/parser/lexer.rb#11056 - def lex_en_plain_backslash_delimited_words; end - - # Sets the attribute lex_en_plain_backslash_delimited_words - # - # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. - # - # source://parser//lib/parser/lexer.rb#11056 - def lex_en_plain_backslash_delimited_words=(_arg0); end - - # Returns the value of attribute lex_en_plain_string. - # - # source://parser//lib/parser/lexer.rb#11040 - def lex_en_plain_string; end - - # Sets the attribute lex_en_plain_string - # - # @param value the value to set the attribute lex_en_plain_string to. - # - # source://parser//lib/parser/lexer.rb#11040 - def lex_en_plain_string=(_arg0); end - - # Returns the value of attribute lex_en_plain_words. - # - # source://parser//lib/parser/lexer.rb#11036 - def lex_en_plain_words; end - - # Sets the attribute lex_en_plain_words - # - # @param value the value to set the attribute lex_en_plain_words to. - # - # source://parser//lib/parser/lexer.rb#11036 - def lex_en_plain_words=(_arg0); end - - # Returns the value of attribute lex_en_regexp_modifiers. - # - # source://parser//lib/parser/lexer.rb#11060 - def lex_en_regexp_modifiers; end - - # Sets the attribute lex_en_regexp_modifiers - # - # @param value the value to set the attribute lex_en_regexp_modifiers to. - # - # source://parser//lib/parser/lexer.rb#11060 - def lex_en_regexp_modifiers=(_arg0); end - - # Returns the value of attribute lex_error. - # - # source://parser//lib/parser/lexer.rb#11023 - def lex_error; end - - # Sets the attribute lex_error - # - # @param value the value to set the attribute lex_error to. - # - # source://parser//lib/parser/lexer.rb#11023 - def lex_error=(_arg0); end - - # Returns the value of attribute lex_start. - # - # source://parser//lib/parser/lexer.rb#11019 - def lex_start; end - - # Sets the attribute lex_start - # - # @param value the value to set the attribute lex_start to. - # - # source://parser//lib/parser/lexer.rb#11019 - def lex_start=(_arg0); end - - private - - # Returns the value of attribute _lex_eof_trans. - # - # source://parser//lib/parser/lexer.rb#10886 - def _lex_eof_trans; end - - # Sets the attribute _lex_eof_trans - # - # @param value the value to set the attribute _lex_eof_trans to. - # - # source://parser//lib/parser/lexer.rb#10886 - def _lex_eof_trans=(_arg0); end - - # Returns the value of attribute _lex_from_state_actions. - # - # source://parser//lib/parser/lexer.rb#10753 - def _lex_from_state_actions; end - - # Sets the attribute _lex_from_state_actions - # - # @param value the value to set the attribute _lex_from_state_actions to. - # - # source://parser//lib/parser/lexer.rb#10753 - def _lex_from_state_actions=(_arg0); end - - # Returns the value of attribute _lex_index_offsets. - # - # source://parser//lib/parser/lexer.rb#604 - def _lex_index_offsets; end - - # Sets the attribute _lex_index_offsets - # - # @param value the value to set the attribute _lex_index_offsets to. - # - # source://parser//lib/parser/lexer.rb#604 - def _lex_index_offsets=(_arg0); end - - # Returns the value of attribute _lex_indicies. - # - # source://parser//lib/parser/lexer.rb#737 - def _lex_indicies; end - - # Sets the attribute _lex_indicies - # - # @param value the value to set the attribute _lex_indicies to. - # - # source://parser//lib/parser/lexer.rb#737 - def _lex_indicies=(_arg0); end - - # Returns the value of attribute _lex_key_spans. - # - # source://parser//lib/parser/lexer.rb#471 - def _lex_key_spans; end - - # Sets the attribute _lex_key_spans - # - # @param value the value to set the attribute _lex_key_spans to. - # - # source://parser//lib/parser/lexer.rb#471 - def _lex_key_spans=(_arg0); end - - # Returns the value of attribute _lex_to_state_actions. - # - # source://parser//lib/parser/lexer.rb#10620 - def _lex_to_state_actions; end - - # Sets the attribute _lex_to_state_actions - # - # @param value the value to set the attribute _lex_to_state_actions to. - # - # source://parser//lib/parser/lexer.rb#10620 - def _lex_to_state_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_actions. - # - # source://parser//lib/parser/lexer.rb#10420 - def _lex_trans_actions; end - - # Sets the attribute _lex_trans_actions - # - # @param value the value to set the attribute _lex_trans_actions to. - # - # source://parser//lib/parser/lexer.rb#10420 - def _lex_trans_actions=(_arg0); end - - # Returns the value of attribute _lex_trans_keys. - # - # source://parser//lib/parser/lexer.rb#87 - def _lex_trans_keys; end - - # Sets the attribute _lex_trans_keys - # - # @param value the value to set the attribute _lex_trans_keys to. - # - # source://parser//lib/parser/lexer.rb#87 - def _lex_trans_keys=(_arg0); end - - # Returns the value of attribute _lex_trans_targs. - # - # source://parser//lib/parser/lexer.rb#10220 - def _lex_trans_targs; end - - # Sets the attribute _lex_trans_targs - # - # @param value the value to set the attribute _lex_trans_targs to. - # - # source://parser//lib/parser/lexer.rb#10220 - def _lex_trans_targs=(_arg0); end - end -end - -# source://parser//lib/parser/lexer/dedenter.rb#5 -class Parser::Lexer::Dedenter - # source://parser//lib/parser/lexer/dedenter.rb#9 - def initialize(dedent_level); end - - # source://parser//lib/parser/lexer/dedenter.rb#36 - def dedent(string); end - - # source://parser//lib/parser/lexer/dedenter.rb#83 - def interrupt; end -end - -# source://parser//lib/parser/lexer/dedenter.rb#7 -Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) - -# % -# -# source://parser//lib/parser/lexer.rb#11128 -Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer.rb#24991 -Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer.rb#24998 -Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer.rb#11249 -Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer/literal.rb#6 -class Parser::Lexer::Literal - # source://parser//lib/parser/lexer/literal.rb#40 - def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer/literal.rb#114 - def backslash_delimited?; end - - # source://parser//lib/parser/lexer/literal.rb#37 - def dedent_level; end - - # source://parser//lib/parser/lexer/literal.rb#189 - def end_interp_brace_and_try_closing; end - - # source://parser//lib/parser/lexer/literal.rb#216 - def extend_content; end - - # source://parser//lib/parser/lexer/literal.rb#220 - def extend_space(ts, te); end - - # source://parser//lib/parser/lexer/literal.rb#195 - def extend_string(string, ts, te); end - - # source://parser//lib/parser/lexer/literal.rb#202 - def flush_string; end - - # source://parser//lib/parser/lexer/literal.rb#102 - def heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#37 - def heredoc_e; end - - # source://parser//lib/parser/lexer/literal.rb#166 - def infer_indent_level(line); end - - # source://parser//lib/parser/lexer/literal.rb#89 - def interpolate?; end - - # source://parser//lib/parser/lexer/literal.rb#122 - def munge_escape?(character); end - - # source://parser//lib/parser/lexer/literal.rb#132 - def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end - - # source://parser//lib/parser/lexer/literal.rb#106 - def plain_heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#98 - def regexp?; end - - # source://parser//lib/parser/lexer/literal.rb#38 - def saved_herebody_s; end - - # source://parser//lib/parser/lexer/literal.rb#38 - def saved_herebody_s=(_arg0); end - - # source://parser//lib/parser/lexer/literal.rb#110 - def squiggly_heredoc?; end - - # source://parser//lib/parser/lexer/literal.rb#185 - def start_interp_brace; end - - # source://parser//lib/parser/lexer/literal.rb#37 - def str_s; end - - # source://parser//lib/parser/lexer/literal.rb#230 - def supports_line_continuation_via_slash?; end - - # source://parser//lib/parser/lexer/literal.rb#118 - def type; end - - # source://parser//lib/parser/lexer/literal.rb#93 - def words?; end - - protected - - # source://parser//lib/parser/lexer/literal.rb#248 - def clear_buffer; end - - # source://parser//lib/parser/lexer/literal.rb#244 - def coerce_encoding(string); end - - # source://parser//lib/parser/lexer/literal.rb#236 - def delimiter?(delimiter); end - - # source://parser//lib/parser/lexer/literal.rb#264 - def emit(token, type, s, e); end - - # source://parser//lib/parser/lexer/literal.rb#259 - def emit_start_tok; end -end - -# source://parser//lib/parser/lexer/literal.rb#7 -Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer/literal.rb#9 -Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) - -# Mapping of strings to parser tokens. -# -# source://parser//lib/parser/lexer.rb#24965 -Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer.rb#24985 -Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/lexer.rb#11134 -Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) - -# source://parser//lib/parser/lexer/stack_state.rb#5 -class Parser::Lexer::StackState - # source://parser//lib/parser/lexer/stack_state.rb#6 - def initialize(name); end - - # source://parser//lib/parser/lexer/stack_state.rb#34 - def active?; end - - # source://parser//lib/parser/lexer/stack_state.rb#11 - def clear; end - - # source://parser//lib/parser/lexer/stack_state.rb#38 - def empty?; end - - # source://parser//lib/parser/lexer/stack_state.rb#42 - def inspect; end - - # source://parser//lib/parser/lexer/stack_state.rb#29 - def lexpop; end - - # source://parser//lib/parser/lexer/stack_state.rb#22 - def pop; end - - # source://parser//lib/parser/lexer/stack_state.rb#15 - def push(bit); end - - # source://parser//lib/parser/lexer/stack_state.rb#42 - def to_s; end -end - -# Diagnostic messages (errors, warnings and notices) that can be generated. -# -# @api public -# @see Diagnostic -# -# source://parser//lib/parser/messages.rb#11 -Parser::MESSAGES = T.let(T.unsafe(nil), Hash) - -# Holds p->max_numparam from parse.y -# -# @api private -# -# source://parser//lib/parser/max_numparam_stack.rb#8 -class Parser::MaxNumparamStack - # @api private - # @return [MaxNumparamStack] a new instance of MaxNumparamStack - # - # source://parser//lib/parser/max_numparam_stack.rb#13 - def initialize; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#17 - def empty?; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#29 - def has_numparams?; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#21 - def has_ordinary_params!; end - - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#25 - def has_ordinary_params?; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#45 - def pop; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#41 - def push(static:); end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#33 - def register(numparam); end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#9 - def stack; end - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#37 - def top; end - - private - - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#51 - def set(value); end -end - -# @api private -# -# source://parser//lib/parser/max_numparam_stack.rb#11 -Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) - -# @api private -# -# source://parser//lib/parser/messages.rb#105 -module Parser::Messages - class << self - # Formats the message, returns a raw template if there's nothing to interpolate - # - # Code like `format("", {})` gives a warning, and so this method tries interpolating - # only if `arguments` hash is not empty. - # - # @api private - # - # source://parser//lib/parser/messages.rb#112 - def compile(reason, arguments); end - end -end - -# Parser metadata -# -# source://parser//lib/parser/meta.rb#5 -module Parser::Meta; end - -# All node types that parser can produce. Not all parser versions -# will be able to produce every possible node. -# -# source://parser//lib/parser/meta.rb#9 -Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) - -# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. -# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} -# instead of {Parser::Source::Rewriter}. -# Please check the documentation for {Parser::Source::Rewriter} for details. -# -# @api public -# @deprecated Use {Parser::TreeRewriter} -# -# source://parser//lib/parser/rewriter.rb#22 -class Parser::Rewriter < ::Parser::AST::Processor - extend ::Parser::Deprecation - - # @api public - # @return [Rewriter] a new instance of Rewriter - # - # source://parser//lib/parser/rewriter.rb#98 - def initialize(*_arg0); end - - # Returns `true` if the specified node is an assignment node, returns false - # otherwise. - # - # @api public - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://parser//lib/parser/rewriter.rb#38 - def assignment?(node); end - - # Inserts new code after the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#77 - def insert_after(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#67 - def insert_before(range, content); end - - # Removes the source range. - # - # @api public - # @param range [Parser::Source::Range] - # - # source://parser//lib/parser/rewriter.rb#47 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#87 - def replace(range, content); end - - # Rewrites the AST/source buffer and returns a String containing the new - # version. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param ast [Parser::AST::Node] - # @return [String] - # - # source://parser//lib/parser/rewriter.rb#23 - def rewrite(source_buffer, ast); end - - # Wraps the given source range with the given values. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/rewriter.rb#57 - def wrap(range, before, after); end -end - -# @api public -# -# source://parser//lib/parser/rewriter.rb#91 -Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# @api public -# -# source://parser//lib/parser.rb#30 -module Parser::Source; end - -# A buffer with source code. {Buffer} contains the source code itself, -# associated location information (name and first line), and takes care -# of encoding. -# -# A source buffer is immutable once populated. -# -# @api public -# -# source://parser//lib/parser/source/buffer.rb#25 -class Parser::Source::Buffer - # @api public - # @return [Buffer] a new instance of Buffer - # - # source://parser//lib/parser/source/buffer.rb#105 - def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end - - # Convert a character index into the source to a column number. - # - # @api private - # @param position [Integer] - # @return [Integer] column - # - # source://parser//lib/parser/source/buffer.rb#233 - def column_for_position(position); end - - # Convert a character index into the source to a `[line, column]` tuple. - # - # @api public - # @param position [Integer] - # @return [[Integer, Integer]] `[line, column]` - # - # source://parser//lib/parser/source/buffer.rb#208 - def decompose_position(position); end - - # First line of the buffer, 1 by default. - # - # @api public - # @return [Integer] first line - # - # source://parser//lib/parser/source/buffer.rb#26 - def first_line; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#303 - def freeze; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#309 - def inspect; end - - # Number of last line in the buffer - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/buffer.rb#298 - def last_line; end - - # Convert a character index into the source to a line number. - # - # @api private - # @param position [Integer] - # @return [Integer] line - # - # source://parser//lib/parser/source/buffer.rb#222 - def line_for_position(position); end - - # Extract line `lineno` as a new `Range`, taking `first_line` into account. - # - # @api public - # @param lineno [Integer] - # @raise [IndexError] if `lineno` is out of bounds - # @return [Range] - # - # source://parser//lib/parser/source/buffer.rb#275 - def line_range(lineno); end - - # Buffer name. If the buffer was created from a file, the name corresponds - # to relative path to the file. - # - # @api public - # @return [String] buffer name - # - # source://parser//lib/parser/source/buffer.rb#26 - def name; end - - # Populate this buffer from a string without encoding autodetection. - # - # @api public - # @param input [String] - # @raise [ArgumentError] if already populated - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#180 - def raw_source=(input); end - - # Populate this buffer from correspondingly named file. - # - # @api public - # @example - # Parser::Source::Buffer.new('foo/bar.rb').read - # @raise [ArgumentError] if already populated - # @return [Buffer] self - # - # source://parser//lib/parser/source/buffer.rb#131 - def read; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#194 - def slice(range); end - - # Source code contained in this buffer. - # - # @api public - # @raise [RuntimeError] if buffer is not populated yet - # @return [String] source code - # - # source://parser//lib/parser/source/buffer.rb#145 - def source; end - - # Populate this buffer from a string with encoding autodetection. - # `input` is mutated if not frozen. - # - # @api public - # @param input [String] - # @raise [ArgumentError] if already populated - # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#162 - def source=(input); end - - # Extract line `lineno` from source, taking `first_line` into account. - # - # @api public - # @param lineno [Integer] - # @raise [IndexError] if `lineno` is out of bounds - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#264 - def source_line(lineno); end - - # Return an `Array` of source code lines. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/source/buffer.rb#243 - def source_lines; end - - # @api public - # @return [Range] A range covering the whole source - # - # source://parser//lib/parser/source/buffer.rb#289 - def source_range; end - - private - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#339 - def bsearch(line_begins, position); end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#316 - def line_begins; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#330 - def line_index_for_position(position); end - - class << self - # Try to recognize encoding of `string` as Ruby would, i.e. by looking for - # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. - # - # @api public - # @param string [String] - # @return [String, nil] encoding name, if recognized - # - # source://parser//lib/parser/source/buffer.rb#51 - def recognize_encoding(string); end - - # Recognize encoding of `input` and process it so it could be lexed. - # - # * If `input` does not contain BOM or magic encoding comment, it is - # kept in the original encoding. - # * If the detected encoding is binary, `input` is kept in binary. - # * Otherwise, `input` is re-encoded into UTF-8 and returned as a - # new string. - # - # This method mutates the encoding of `input`, but not its content. - # - # @api public - # @param input [String] - # @raise [EncodingError] - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#90 - def reencode_string(input); end - end -end - -# @api private -# -# source://parser//lib/parser/source/buffer.rb#31 -Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) - -# A comment in the source code. -# -# @api public -# -# source://parser//lib/parser/source/comment.rb#17 -class Parser::Source::Comment - # @api public - # @param range [Parser::Source::Range] - # @return [Comment] a new instance of Comment - # - # source://parser//lib/parser/source/comment.rb#67 - def initialize(range); end - - # Compares comments. Two comments are equal if they - # correspond to the same source range. - # - # @api public - # @param other [Object] - # @return [Boolean] - # - # source://parser//lib/parser/source/comment.rb#120 - def ==(other); end - - # @api public - # @return [Boolean] true if this is a block comment. - # @see #type - # - # source://parser//lib/parser/source/comment.rb#109 - def document?; end - - # @api public - # @return [Boolean] true if this is an inline comment. - # @see #type - # - # source://parser//lib/parser/source/comment.rb#101 - def inline?; end - - # @api public - # @return [String] a human-readable representation of this comment - # - # source://parser//lib/parser/source/comment.rb#128 - def inspect; end - - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/source/comment.rb#20 - def loc; end - - # @api public - # @return [Parser::Source::Range] - # - # source://parser//lib/parser/source/comment.rb#20 - def location; end - - # @api public - # @return [String] - # - # source://parser//lib/parser/source/comment.rb#18 - def text; end - - # Type of this comment. - # - # * Inline comments correspond to `:inline`: - # - # # whatever - # - # * Block comments correspond to `:document`: - # - # =begin - # hi i am a document - # =end - # - # @api public - # @return [Symbol] - # - # source://parser//lib/parser/source/comment.rb#89 - def type; end - - class << self - # Associate `comments` with `ast` nodes by their corresponding node. - # - # @api public - # @deprecated Use {associate_locations}. - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate - # - # source://parser//lib/parser/source/comment.rb#32 - def associate(ast, comments); end - - # Associate `comments` with `ast` nodes using identity. - # - # @api public - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate_by_identity - # - # source://parser//lib/parser/source/comment.rb#59 - def associate_by_identity(ast, comments); end - - # Associate `comments` with `ast` nodes by their location in the - # source. - # - # @api public - # @param ast [Parser::AST::Node] - # @param comments [Array] - # @return [Hash>] - # @see Parser::Source::Comment::Associator#associate_locations - # - # source://parser//lib/parser/source/comment.rb#46 - def associate_locations(ast, comments); end - end -end - -# source://parser//lib/parser/source/comment/associator.rb#45 -class Parser::Source::Comment::Associator - # source://parser//lib/parser/source/comment/associator.rb#51 - def initialize(ast, comments); end - - # source://parser//lib/parser/source/comment/associator.rb#92 - def associate; end - - # source://parser//lib/parser/source/comment/associator.rb#115 - def associate_by_identity; end - - # source://parser//lib/parser/source/comment/associator.rb#103 - def associate_locations; end - - # source://parser//lib/parser/source/comment/associator.rb#46 - def skip_directives; end - - # source://parser//lib/parser/source/comment/associator.rb#46 - def skip_directives=(_arg0); end - - private - - # source://parser//lib/parser/source/comment/associator.rb#182 - def advance_comment; end - - # source://parser//lib/parser/source/comment/associator.rb#214 - def advance_through_directives; end - - # source://parser//lib/parser/source/comment/associator.rb#206 - def associate_and_advance_comment(node); end - - # source://parser//lib/parser/source/comment/associator.rb#123 - def children_in_source_order(node); end - - # source://parser//lib/parser/source/comment/associator.rb#187 - def current_comment_before?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#194 - def current_comment_before_end?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#201 - def current_comment_decorates?(node); end - - # source://parser//lib/parser/source/comment/associator.rb#135 - def do_associate; end - - # source://parser//lib/parser/source/comment/associator.rb#166 - def process_leading_comments(node); end - - # source://parser//lib/parser/source/comment/associator.rb#173 - def process_trailing_comments(node); end - - # source://parser//lib/parser/source/comment/associator.rb#148 - def visit(node); end -end - -# source://parser//lib/parser/source/comment/associator.rb#212 -Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) - -# source://parser//lib/parser/source/comment/associator.rb#122 -Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) - -# {Map} relates AST nodes to the source code they were parsed from. -# More specifically, a {Map} or its subclass contains a set of ranges: -# -# * `expression`: smallest range which includes all source corresponding -# to the node and all `expression` ranges of its children. -# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges -# pointing to various interesting tokens corresponding to the node. -# -# Note that the {Map::Heredoc} map is the only one whose `expression` does -# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc -# # => > -# -# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source -# code tokens. For example, the entry -# -# (array (int 1) (int 2)) -# -# "[1, 2]" -# ^ begin -# ^ end -# ~~~~~~ expression -# -# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, -# then `node.loc` responds to `begin`, `end` and `expression`, and -# `node.loc.begin` returns a range pointing at the opening bracket, and so on. -# -# If you want to write code polymorphic by the source map (i.e. accepting -# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to -# check whether the map features the range you need. Concrete {Map} -# subclasses may not be preserved between versions, but their interfaces -# will be kept compatible. -# -# You can visualize the source maps with `ruby-parse -E` command-line tool. -# -# @api public -# @example -# require 'parser/current' -# -# p Parser::CurrentRuby.parse('[1, 2]').loc -# # => #, -# # @begin=#, -# # @expression=#> -# -# source://parser//lib/parser/source/map.rb#70 -class Parser::Source::Map - # @api public - # @param expression [Range] - # @return [Map] a new instance of Map - # - # source://parser//lib/parser/source/map.rb#76 - def initialize(expression); end - - # Compares source maps. - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/map.rb#140 - def ==(other); end - - # A shortcut for `self.expression.column`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#109 - def column; end - - # @api public - # @return [Range] - # - # source://parser//lib/parser/source/map.rb#72 - def expression; end - - # A shortcut for `self.expression.line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#99 - def first_line; end - - # A shortcut for `self.expression.last_column`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#125 - def last_column; end - - # A shortcut for `self.expression.last_line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#117 - def last_line; end - - # A shortcut for `self.expression.line`. - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/map.rb#99 - def line; end - - # The node that is described by this map. Nodes and maps have 1:1 correspondence. - # - # @api public - # @return [Parser::AST::Node] - # - # source://parser//lib/parser/source/map.rb#71 - def node; end - - # @api private - # - # source://parser//lib/parser/source/map.rb#89 - def node=(node); end - - # Converts this source map to a hash with keys corresponding to - # ranges. For example, if called on an instance of {Collection}, - # which adds the `begin` and `end` ranges, the resulting hash - # will contain keys `:expression`, `:begin` and `:end`. - # - # @api public - # @example - # require 'parser/current' - # - # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash - # # => { - # # :begin => #, - # # :end => #, - # # :expression => # - # # } - # @return [Hash] - # - # source://parser//lib/parser/source/map.rb#166 - def to_hash; end - - # @api private - # - # source://parser//lib/parser/source/map.rb#132 - def with_expression(expression_l); end - - protected - - # @api public - # - # source://parser//lib/parser/source/map.rb#180 - def update_expression(expression_l); end - - # @api public - # - # source://parser//lib/parser/source/map.rb#176 - def with(&block); end - - private - - # @api private - # - # source://parser//lib/parser/source/map.rb#82 - def initialize_copy(other); end -end - -# source://parser//lib/parser/source/map/collection.rb#6 -class Parser::Source::Map::Collection < ::Parser::Source::Map - # source://parser//lib/parser/source/map/collection.rb#10 - def initialize(begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/collection.rb#7 - def begin; end - - # source://parser//lib/parser/source/map/collection.rb#8 - def end; end -end - -# source://parser//lib/parser/source/map/condition.rb#6 -class Parser::Source::Map::Condition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/condition.rb#12 - def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/condition.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/condition.rb#9 - def else; end - - # source://parser//lib/parser/source/map/condition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/condition.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/constant.rb#6 -class Parser::Source::Map::Constant < ::Parser::Source::Map - # source://parser//lib/parser/source/map/constant.rb#11 - def initialize(double_colon, name, expression); end - - # source://parser//lib/parser/source/map/constant.rb#7 - def double_colon; end - - # source://parser//lib/parser/source/map/constant.rb#8 - def name; end - - # source://parser//lib/parser/source/map/constant.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/constant.rb#20 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/constant.rb#26 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/definition.rb#6 -class Parser::Source::Map::Definition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/definition.rb#12 - def initialize(keyword_l, operator_l, name_l, end_l); end - - # source://parser//lib/parser/source/map/definition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/definition.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/definition.rb#9 - def name; end - - # source://parser//lib/parser/source/map/definition.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/for.rb#6 -class Parser::Source::Map::For < ::Parser::Source::Map - # source://parser//lib/parser/source/map/for.rb#10 - def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/for.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/for.rb#8 - def end; end - - # source://parser//lib/parser/source/map/for.rb#7 - def in; end - - # source://parser//lib/parser/source/map/for.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/heredoc.rb#6 -class Parser::Source::Map::Heredoc < ::Parser::Source::Map - # source://parser//lib/parser/source/map/heredoc.rb#10 - def initialize(begin_l, body_l, end_l); end - - # source://parser//lib/parser/source/map/heredoc.rb#7 - def heredoc_body; end - - # source://parser//lib/parser/source/map/heredoc.rb#8 - def heredoc_end; end -end - -# source://parser//lib/parser/source/map/index.rb#6 -class Parser::Source::Map::Index < ::Parser::Source::Map - # source://parser//lib/parser/source/map/index.rb#11 - def initialize(begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/index.rb#7 - def begin; end - - # source://parser//lib/parser/source/map/index.rb#8 - def end; end - - # source://parser//lib/parser/source/map/index.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/index.rb#21 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/index.rb#27 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/keyword.rb#6 -class Parser::Source::Map::Keyword < ::Parser::Source::Map - # source://parser//lib/parser/source/map/keyword.rb#11 - def initialize(keyword_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/keyword.rb#8 - def begin; end - - # source://parser//lib/parser/source/map/keyword.rb#9 - def end; end - - # source://parser//lib/parser/source/map/keyword.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/method_definition.rb#6 -class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map - # source://parser//lib/parser/source/map/method_definition.rb#13 - def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end - - # source://parser//lib/parser/source/map/method_definition.rb#11 - def assignment; end - - # source://parser//lib/parser/source/map/method_definition.rb#10 - def end; end - - # source://parser//lib/parser/source/map/method_definition.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/method_definition.rb#9 - def name; end - - # source://parser//lib/parser/source/map/method_definition.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/objc_kwarg.rb#6 -class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map - # source://parser//lib/parser/source/map/objc_kwarg.rb#11 - def initialize(keyword_l, operator_l, argument_l, expression_l); end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#9 - def argument; end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#7 - def keyword; end - - # source://parser//lib/parser/source/map/objc_kwarg.rb#8 - def operator; end -end - -# source://parser//lib/parser/source/map/operator.rb#6 -class Parser::Source::Map::Operator < ::Parser::Source::Map - # source://parser//lib/parser/source/map/operator.rb#9 - def initialize(operator, expression); end - - # source://parser//lib/parser/source/map/operator.rb#7 - def operator; end -end - -# source://parser//lib/parser/source/map/rescue_body.rb#6 -class Parser::Source::Map::RescueBody < ::Parser::Source::Map - # source://parser//lib/parser/source/map/rescue_body.rb#11 - def initialize(keyword_l, assoc_l, begin_l, expression_l); end - - # source://parser//lib/parser/source/map/rescue_body.rb#8 - def assoc; end - - # source://parser//lib/parser/source/map/rescue_body.rb#9 - def begin; end - - # source://parser//lib/parser/source/map/rescue_body.rb#7 - def keyword; end -end - -# source://parser//lib/parser/source/map/send.rb#6 -class Parser::Source::Map::Send < ::Parser::Source::Map - # source://parser//lib/parser/source/map/send.rb#13 - def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end - - # source://parser//lib/parser/source/map/send.rb#10 - def begin; end - - # source://parser//lib/parser/source/map/send.rb#7 - def dot; end - - # source://parser//lib/parser/source/map/send.rb#11 - def end; end - - # source://parser//lib/parser/source/map/send.rb#9 - def operator; end - - # source://parser//lib/parser/source/map/send.rb#8 - def selector; end - - # source://parser//lib/parser/source/map/send.rb#24 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/send.rb#30 - def update_operator(operator_l); end -end - -# source://parser//lib/parser/source/map/ternary.rb#6 -class Parser::Source::Map::Ternary < ::Parser::Source::Map - # source://parser//lib/parser/source/map/ternary.rb#10 - def initialize(question_l, colon_l, expression_l); end - - # source://parser//lib/parser/source/map/ternary.rb#8 - def colon; end - - # source://parser//lib/parser/source/map/ternary.rb#7 - def question; end -end - -# source://parser//lib/parser/source/map/variable.rb#6 -class Parser::Source::Map::Variable < ::Parser::Source::Map - # source://parser//lib/parser/source/map/variable.rb#10 - def initialize(name_l, expression_l = T.unsafe(nil)); end - - # source://parser//lib/parser/source/map/variable.rb#7 - def name; end - - # source://parser//lib/parser/source/map/variable.rb#8 - def operator; end - - # source://parser//lib/parser/source/map/variable.rb#19 - def with_operator(operator_l); end - - protected - - # source://parser//lib/parser/source/map/variable.rb#25 - def update_operator(operator_l); end -end - -# A range of characters in a particular source buffer. -# -# The range is always exclusive, i.e. a range with `begin_pos` of 3 and -# `end_pos` of 5 will contain the following characters: -# -# example -# ^^ -# -# @api public -# -# source://parser//lib/parser/source/range.rb#26 -class Parser::Source::Range - include ::Comparable - - # @api public - # @param source_buffer [Buffer] - # @param begin_pos [Integer] - # @param end_pos [Integer] - # @return [Range] a new instance of Range - # - # source://parser//lib/parser/source/range.rb#37 - def initialize(source_buffer, begin_pos, end_pos); end - - # Compare ranges, first by begin_pos, then by end_pos. - # - # @api public - # - # source://parser//lib/parser/source/range.rb#301 - def <=>(other); end - - # by the given amount(s) - # - # @api public - # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos - # @return [Range] the same range as this range but with the given end point(s) adjusted - # - # source://parser//lib/parser/source/range.rb#193 - def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - - # @api public - # @return [Range] a zero-length range located just before the beginning - # of this range. - # - # source://parser//lib/parser/source/range.rb#55 - def begin; end - - # @api public - # @return [Integer] index of the first character in the range - # - # source://parser//lib/parser/source/range.rb#30 - def begin_pos; end - - # @api public - # @return [Integer] zero-based column number of the beginning of this range. - # - # source://parser//lib/parser/source/range.rb#92 - def column; end - - # @api public - # @raise RangeError - # @return [::Range] a range of columns spanned by this range. - # - # source://parser//lib/parser/source/range.rb#114 - def column_range; end - - # Return `other.contains?(self)` - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#274 - def contained?(other); end - - # Returns true iff this range contains (strictly) `other`. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#262 - def contains?(other); end - - # Returns true iff both ranges intersect and also have different elements from one another. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#286 - def crossing?(other); end - - # Return `true` iff this range and `other` are disjoint. - # - # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? - # - # @api public - # @param other [Range] - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#236 - def disjoint?(other); end - - # Checks if a range is empty; if it contains no characters - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#294 - def empty?; end - - # @api public - # @return [Range] a zero-length range located just after the end - # of this range. - # - # source://parser//lib/parser/source/range.rb#63 - def end; end - - # @api public - # @return [Integer] index of the character after the last character in the range - # - # source://parser//lib/parser/source/range.rb#30 - def end_pos; end - - # @api public - def eql?(_arg0); end - - # Line number of the beginning of this range. By default, the first line - # of a buffer is 1; as such, line numbers are most commonly one-based. - # - # @api public - # @return [Integer] line number of the beginning of this range. - # @see Buffer - # - # source://parser//lib/parser/source/range.rb#83 - def first_line; end - - # Support for Ranges be used in as Hash indices and in Sets. - # - # @api public - # - # source://parser//lib/parser/source/range.rb#313 - def hash; end - - # @api public - # @return [String] a human-readable representation of this range. - # - # source://parser//lib/parser/source/range.rb#320 - def inspect; end - - # @api public - # @param other [Range] - # @return [Range] overlapping region of this range and `other`, or `nil` - # if they do not overlap - # - # source://parser//lib/parser/source/range.rb#220 - def intersect(other); end - - # `is?` provides a concise way to compare the source corresponding to this range. - # For example, `r.source == '(' || r.source == 'begin'` is equivalent to - # `r.is?('(', 'begin')`. - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/range.rb#141 - def is?(*what); end - - # @api public - # @param other [Range] - # @return [Range] smallest possible range spanning both this range and `other`. - # - # source://parser//lib/parser/source/range.rb#209 - def join(other); end - - # @api public - # @return [Integer] zero-based column number of the end of this range. - # - # source://parser//lib/parser/source/range.rb#106 - def last_column; end - - # @api public - # @return [Integer] line number of the end of this range. - # - # source://parser//lib/parser/source/range.rb#99 - def last_line; end - - # @api public - # @return [Integer] amount of characters included in this range. - # - # source://parser//lib/parser/source/range.rb#70 - def length; end - - # Line number of the beginning of this range. By default, the first line - # of a buffer is 1; as such, line numbers are most commonly one-based. - # - # @api public - # @return [Integer] line number of the beginning of this range. - # @see Buffer - # - # source://parser//lib/parser/source/range.rb#83 - def line; end - - # Return `true` iff this range is not disjoint from `other`. - # - # @api public - # @param other [Range] - # @return [Boolean] `true` if this range and `other` overlap - # - # source://parser//lib/parser/source/range.rb#250 - def overlaps?(other); end - - # @api public - # @param new_size [Integer] - # @return [Range] a range beginning at the same point as this range and length `new_size`. - # - # source://parser//lib/parser/source/range.rb#201 - def resize(new_size); end - - # @api public - # @return [Integer] amount of characters included in this range. - # - # source://parser//lib/parser/source/range.rb#70 - def size; end - - # @api public - # @return [String] all source code covered by this range. - # - # source://parser//lib/parser/source/range.rb#132 - def source; end - - # @api public - # @return [Parser::Source::Buffer] - # - # source://parser//lib/parser/source/range.rb#29 - def source_buffer; end - - # @api public - # @return [String] a line of source code containing the beginning of this range. - # - # source://parser//lib/parser/source/range.rb#125 - def source_line; end - - # @api public - # @return [Array] a set of character indexes contained in this range. - # - # source://parser//lib/parser/source/range.rb#148 - def to_a; end - - # @api public - # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` - # - # source://parser//lib/parser/source/range.rb#155 - def to_range; end - - # Composes a GNU/Clang-style string representation of the beginning of this - # range. - # - # For example, for the following range in file `foo.rb`, - # - # def foo - # ^^^ - # - # `to_s` will return `foo.rb:1:5`. - # Note that the column index is one-based. - # - # @api public - # @return [String] - # - # source://parser//lib/parser/source/range.rb#173 - def to_s; end - - # to the given value(s). - # - # @api public - # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos - # @return [Range] the same range as this range but with the given end point(s) changed - # - # source://parser//lib/parser/source/range.rb#184 - def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end -end - -# {Rewriter} is deprecated. Use {TreeRewriter} instead. -# -# TreeRewriter has simplified semantics, and customizable policies -# with regards to clobbering. Please read the documentation. -# -# Keep in mind: -# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, -# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. -# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while -# Rewriter would raise clobbering errors if the non '_multi' version was called. -# - The TreeRewriter policy closest to Rewriter's behavior is: -# different_replacements: :raise, -# swallowed_insertions: :raise, -# crossing_deletions: :accept -# -# @api public -# @deprecated Use {TreeRewriter} -# -# source://parser//lib/parser/source/rewriter.rb#31 -class Parser::Source::Rewriter - extend ::Parser::Deprecation - - # @api public - # @deprecated Use {TreeRewriter} - # @param source_buffer [Source::Buffer] - # @return [Rewriter] a new instance of Rewriter - # - # source://parser//lib/parser/source/rewriter.rb#39 - def initialize(source_buffer); end - - # @api public - # @return [Diagnostic::Engine] - # - # source://parser//lib/parser/source/rewriter.rb#33 - def diagnostics; end - - # Inserts new code after the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#insert_after} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#131 - def insert_after(range, content); end - - # Inserts new code after the given source range by allowing other - # insertions at the same position. - # Note that an insertion with latter invocation comes _after_ earlier - # insertion at the same position in the rewritten source. - # - # @api public - # @deprecated Use {TreeRewriter#insert_after} - # @example Inserting ')]' - # rewriter. - # insert_after_multi(range, ')'). - # insert_after_multi(range, ']'). - # process - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#153 - def insert_after_multi(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#insert_before} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#80 - def insert_before(range, content); end - - # Inserts new code before the given source range by allowing other - # insertions at the same position. - # Note that an insertion with latter invocation comes _before_ earlier - # insertion at the same position in the rewritten source. - # - # @api public - # @deprecated Use {TreeRewriter#insert_before} - # @example Inserting '[(' - # rewriter. - # insert_before_multi(range, '('). - # insert_before_multi(range, '['). - # process - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#117 - def insert_before_multi(range, content); end - - # Applies all scheduled changes to the `source_buffer` and returns - # modified source as a new string. - # - # @api public - # @deprecated Use {TreeRewriter#process} - # @return [String] - # - # source://parser//lib/parser/source/rewriter.rb#178 - def process; end - - # Removes the source range. - # - # @api public - # @deprecated Use {TreeRewriter#remove} - # @param range [Range] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#67 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @deprecated Use {TreeRewriter#replace} - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#167 - def replace(range, content); end - - # @api public - # @return [Source::Buffer] - # - # source://parser//lib/parser/source/rewriter.rb#32 - def source_buffer; end - - # Provides a protected block where a sequence of multiple rewrite actions - # are handled atomically. If any of the actions failed by clobbering, - # all the actions are rolled back. - # - # @api public - # @deprecated Use {TreeRewriter#transaction} - # @example - # begin - # rewriter.transaction do - # rewriter.insert_before(range_of_something, '(') - # rewriter.insert_after(range_of_something, ')') - # end - # rescue Parser::ClobberingError - # end - # @raise [RuntimeError] when no block is passed - # @raise [RuntimeError] when already in a transaction - # - # source://parser//lib/parser/source/rewriter.rb#216 - def transaction; end - - # Inserts new code before and after the given source range. - # - # @api public - # @deprecated Use {TreeRewriter#wrap} - # @param range [Range] - # @param before [String] - # @param after [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/rewriter.rb#94 - def wrap(range, before, after); end - - private - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#476 - def active_clobber; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#484 - def active_clobber=(value); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#480 - def active_insertions; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#492 - def active_insertions=(value); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#472 - def active_queue; end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#500 - def adjacent?(range1, range2); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#351 - def adjacent_insertion_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#366 - def adjacent_insertions?(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#347 - def adjacent_position_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#377 - def adjacent_updates?(range); end - - # Schedule a code update. If it overlaps with another update, check - # whether they conflict, and raise a clobbering error if they do. - # (As a special case, zero-length ranges at the same position are - # considered to "overlap".) Otherwise, merge them. - # - # Updates which are adjacent to each other, but do not overlap, are also - # merged. - # - # RULES: - # - # - Insertion ("replacing" a zero-length range): - # - Two insertions at the same point conflict. This is true even - # if the earlier insertion has already been merged with an adjacent - # update, and even if they are both inserting the same text. - # - An insertion never conflicts with a replace or remove operation - # on its right or left side, which does not overlap it (in other - # words, which does not update BOTH its right and left sides). - # - An insertion always conflicts with a remove operation which spans - # both its sides. - # - An insertion conflicts with a replace operation which spans both its - # sides, unless the replacement text is longer than the replaced text - # by the size of the insertion (or more), and the portion of - # replacement text immediately after the insertion position is - # identical to the inserted text. - # - # - Removal operations never conflict with each other. - # - # - Replacement operations: - # - Take the portion of each replacement text which falls within: - # - The other operation's replaced region - # - The other operation's replacement text, if it extends past the - # end of its own replaced region (in other words, if the replacement - # text is longer than the text it replaces) - # - If and only if the taken texts are identical for both operations, - # they do not conflict. - # - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#280 - def append(action); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#389 - def can_merge?(action, existing); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#355 - def clobbered_insertion?(insertion); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#343 - def clobbered_position_mask(range); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#468 - def in_transaction?; end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#410 - def merge_actions(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#419 - def merge_actions!(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#425 - def merge_replacements(actions); end - - # @api public - # @raise [ClobberingError] - # - # source://parser//lib/parser/source/rewriter.rb#450 - def raise_clobber_error(action, existing); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#335 - def record_insertion(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#339 - def record_replace(range); end - - # @api public - # - # source://parser//lib/parser/source/rewriter.rb#445 - def replace_actions(old, updated); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/rewriter.rb#383 - def replace_compatible_with_insertion?(replace, insertion); end -end - -# source://parser//lib/parser/source/rewriter/action.rb#9 -class Parser::Source::Rewriter::Action - include ::Comparable - - # source://parser//lib/parser/source/rewriter/action.rb#15 - def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end - - # source://parser//lib/parser/source/rewriter/action.rb#24 - def <=>(other); end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def allow_multiple_insertions; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def allow_multiple_insertions?; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def order; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def range; end - - # source://parser//lib/parser/source/rewriter/action.rb#12 - def replacement; end - - # source://parser//lib/parser/source/rewriter/action.rb#30 - def to_s; end -end - -# @api public -# -# source://parser//lib/parser/source/rewriter.rb#504 -Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# {TreeRewriter} performs the heavy lifting in the source rewriting process. -# It schedules code updates to be performed in the correct order. -# -# For simple cases, the resulting source will be obvious. -# -# Examples for more complex cases follow. Assume these examples are acting on -# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. -# receive a Range as first argument; for clarity, examples below use english -# sentences and a string of raw code instead. -# -# ## Overlapping ranges: -# -# Any two rewriting actions on overlapping ranges will fail and raise -# a `ClobberingError`, unless they are both deletions (covered next). -# -# * wrap ':hello, ' with '(' and ')' -# * wrap ', :world' with '(' and ')' -# => CloberringError -# -# ## Overlapping deletions: -# -# * remove ':hello, ' -# * remove ', :world' -# -# The overlapping ranges are merged and `':hello, :world'` will be removed. -# This policy can be changed. `:crossing_deletions` defaults to `:accept` -# but can be set to `:warn` or `:raise`. -# -# ## Multiple actions at the same end points: -# -# Results will always be independent on the order they were given. -# Exception: rewriting actions done on exactly the same range (covered next). -# -# Example: -# * replace ', ' by ' => ' -# * wrap ':hello, :world' with '{' and '}' -# * replace ':world' with ':everybody' -# * wrap ':world' with '[', ']' -# -# The resulting string will be `'puts({:hello => [:everybody]})'` -# and this result is independent on the order the instructions were given in. -# -# Note that if the two "replace" were given as a single replacement of ', :world' -# for ' => :everybody', the result would be a `ClobberingError` because of the wrap -# in square brackets. -# -# ## Multiple wraps on same range: -# * wrap ':hello' with '(' and ')' -# * wrap ':hello' with '[' and ']' -# -# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. -# -# ## Multiple replacements on same range: -# * replace ':hello' by ':hi', then -# * replace ':hello' by ':hey' -# -# The replacements are made in the order given, so the latter replacement -# supersedes the former and ':hello' will be replaced by ':hey'. -# -# This policy can be changed. `:different_replacements` defaults to `:accept` -# but can be set to `:warn` or `:raise`. -# -# ## Swallowed insertions: -# wrap 'world' by '__', '__' -# replace ':hello, :world' with ':hi' -# -# A containing replacement will swallow the contained rewriting actions -# and `':hello, :world'` will be replaced by `':hi'`. -# -# This policy can be changed for swallowed insertions. `:swallowed_insertions` -# defaults to `:accept` but can be set to `:warn` or `:raise` -# -# ## Implementation -# The updates are organized in a tree, according to the ranges they act on -# (where children are strictly contained by their parent), hence the name. -# -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#91 -class Parser::Source::TreeRewriter - extend ::Parser::Deprecation - - # @api public - # @param source_buffer [Source::Buffer] - # @return [TreeRewriter] a new instance of TreeRewriter - # - # source://parser//lib/parser/source/tree_rewriter.rb#98 - def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end - - # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. - # - # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], - # [:wrap, 2...6, '', '!'], # aka "insert_after" - # [:replace, 2...4, 'foo'], - # [:replace, 5...6, ''], # aka "removal" - # ], - # - # Contrary to `as_replacements`, this representation is sufficient to recreate exactly - # the rewriter. - # - # @api public - # @return [Array<(Symbol, Range, String{, String})>] - # - # source://parser//lib/parser/source/tree_rewriter.rb#299 - def as_nested_actions; end - - # Returns a representation of the rewriter as an ordered list of replacements. - # - # rewriter.as_replacements # => [ [1...1, '('], - # [2...4, 'foo'], - # [5...6, ''], - # [6...6, '!'], - # [10...10, ')'], - # ] - # - # This representation is sufficient to recreate the result of `process` but it is - # not sufficient to recreate completely the rewriter for further merging/actions. - # See `as_nested_actions` - # - # @api public - # @return [Array] an ordered list of pairs of range & replacement - # - # source://parser//lib/parser/source/tree_rewriter.rb#281 - def as_replacements; end - - # @api public - # @return [Diagnostic::Engine] - # - # source://parser//lib/parser/source/tree_rewriter.rb#93 - def diagnostics; end - - # Returns true iff no (non trivial) update has been recorded - # - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/tree_rewriter.rb#125 - def empty?; end - - # For special cases where one needs to merge a rewriter attached to a different source_buffer - # or that needs to be offset. Policies of the receiver are used. - # - # @api public - # @param rewriter [TreeRewriter] from different source_buffer - # @param offset [Integer] - # @raise [IndexError] if action ranges (once offset) don't fit the current buffer - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#168 - def import!(foreign_rewriter, offset: T.unsafe(nil)); end - - # @api public - # @return [Boolean] - # - # source://parser//lib/parser/source/tree_rewriter.rb#329 - def in_transaction?; end - - # Shortcut for `wrap(range, nil, content)` - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#242 - def insert_after(range, content); end - - # @api private - # @deprecated Use insert_after or wrap - # - # source://parser//lib/parser/source/tree_rewriter.rb#351 - def insert_after_multi(range, text); end - - # Shortcut for `wrap(range, content, nil)` - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#230 - def insert_before(range, content); end - - # @api private - # @deprecated Use insert_after or wrap - # - # source://parser//lib/parser/source/tree_rewriter.rb#342 - def insert_before_multi(range, text); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#334 - def inspect; end - - # Returns a new rewriter that consists of the updates of the received - # and the given argument. Policies of the receiver are used. - # - # @api public - # @param with [Rewriter] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] merge of receiver and argument - # - # source://parser//lib/parser/source/tree_rewriter.rb#155 - def merge(with); end - - # Merges the updates of argument with the receiver. - # Policies of the receiver are used. - # This action is atomic in that it won't change the receiver - # unless it succeeds. - # - # @api public - # @param with [Rewriter] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#139 - def merge!(with); end - - # Applies all scheduled changes to the `source_buffer` and returns - # modified source as a new string. - # - # @api public - # @return [String] - # - # source://parser//lib/parser/source/tree_rewriter.rb#252 - def process; end - - # Shortcut for `replace(range, '')` - # - # @api public - # @param range [Range] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#217 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Range] - # @param content [String] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#193 - def replace(range, content); end - - # @api public - # @return [Source::Buffer] - # - # source://parser//lib/parser/source/tree_rewriter.rb#92 - def source_buffer; end - - # Provides a protected block where a sequence of multiple rewrite actions - # are handled atomically. If any of the actions failed by clobbering, - # all the actions are rolled back. Transactions can be nested. - # - # @api public - # @raise [RuntimeError] when no block is passed - # - # source://parser//lib/parser/source/tree_rewriter.rb#310 - def transaction; end - - # Inserts the given strings before and after the given range. - # - # @api public - # @param range [Range] - # @param insert_before [String, nil] - # @param insert_after [String, nil] - # @raise [ClobberingError] when clobbering is detected - # @return [Rewriter] self - # - # source://parser//lib/parser/source/tree_rewriter.rb#206 - def wrap(range, insert_before, insert_after); end - - protected - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#365 - def action_root; end - - private - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#369 - def action_summary; end - - # @api public - # @raise [ArgumentError] - # - # source://parser//lib/parser/source/tree_rewriter.rb#392 - def check_policy_validity; end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#404 - def check_range_validity(range); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#397 - def combine(range, attributes); end - - # @api public - # - # source://parser//lib/parser/source/tree_rewriter.rb#411 - def enforce_policy(event); end - - # @api public - # @raise [Parser::ClobberingError] - # - # source://parser//lib/parser/source/tree_rewriter.rb#418 - def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end -end - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#391 -Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) - -# source://parser//lib/parser/source/tree_rewriter/action.rb#13 -class Parser::Source::TreeRewriter::Action - # source://parser//lib/parser/source/tree_rewriter/action.rb#16 - def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#28 - def combine(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#67 - def contract; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#33 - def empty?; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 - def insert_after; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 - def insert_before; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#57 - def insertion?; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#80 - def moved(source_buffer, offset); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#49 - def nested_actions; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#40 - def ordered_replacements; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 - def range; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 - def replacement; end - - protected - - # source://parser//lib/parser/source/tree_rewriter/action.rb#158 - def analyse_hierarchy(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#145 - def bsearch_child_index(from = T.unsafe(nil)); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#224 - def call_enforcer_for_merge(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#204 - def check_fusible(action, *fusible); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#94 - def children; end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#129 - def combine_children(more_children); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#102 - def do_combine(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#135 - def fuse_deletions(action, fusible, other_sibblings); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#215 - def merge(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#110 - def place_in_hierarchy(action); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#232 - def swallow(children); end - - # source://parser//lib/parser/source/tree_rewriter/action.rb#96 - def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end -end - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#356 -Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# @api public -# -# source://parser//lib/parser/source/tree_rewriter.rb#417 -Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) - -# source://parser//lib/parser/static_environment.rb#5 -class Parser::StaticEnvironment - # @return [StaticEnvironment] a new instance of StaticEnvironment - # - # source://parser//lib/parser/static_environment.rb#9 - def initialize; end - - # source://parser//lib/parser/static_environment.rb#38 - def declare(name); end - - # source://parser//lib/parser/static_environment.rb#56 - def declare_anonymous_blockarg; end - - # source://parser//lib/parser/static_environment.rb#48 - def declare_forward_args; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#44 - def declared?(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#60 - def declared_anonymous_blockarg?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#52 - def declared_forward_args?; end - - # @return [Boolean] - # - # source://parser//lib/parser/static_environment.rb#64 - def empty?; end - - # source://parser//lib/parser/static_environment.rb#25 - def extend_dynamic; end - - # source://parser//lib/parser/static_environment.rb#18 - def extend_static; end - - # source://parser//lib/parser/static_environment.rb#13 - def reset; end - - # source://parser//lib/parser/static_environment.rb#32 - def unextend; end -end - -# source://parser//lib/parser/static_environment.rb#7 -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) - -# source://parser//lib/parser/static_environment.rb#6 -Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) - -# {Parser::SyntaxError} is raised whenever parser detects a syntax error, -# similar to the standard SyntaxError class. -# -# @api public -# -# source://parser//lib/parser/syntax_error.rb#13 -class Parser::SyntaxError < ::StandardError - # @api public - # @return [SyntaxError] a new instance of SyntaxError - # - # source://parser//lib/parser/syntax_error.rb#16 - def initialize(diagnostic); end - - # @api public - # @return [Parser::Diagnostic] - # - # source://parser//lib/parser/syntax_error.rb#14 - def diagnostic; end -end - -# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite -# existing ASTs. It's built on top of {Parser::AST::Processor} and -# {Parser::Source::TreeRewriter} -# -# For example, assume you want to remove `do` tokens from a while statement. -# You can do this as following: -# -# require 'parser/current' -# -# class RemoveDo < Parser::TreeRewriter -# def on_while(node) -# # Check if the statement starts with "do" -# if node.location.begin.is?('do') -# remove(node.location.begin) -# end -# end -# end -# -# code = <<-EOF -# while true do -# puts 'hello' -# end -# EOF -# -# ast = Parser::CurrentRuby.parse code -# buffer = Parser::Source::Buffer.new('(example)', source: code) -# rewriter = RemoveDo.new -# -# # Rewrite the AST, returns a String with the new form. -# puts rewriter.rewrite(buffer, ast) -# -# This would result in the following Ruby code: -# -# while true -# puts 'hello' -# end -# -# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when -# inserting/replacing code so you'll have to do this yourself. -# -# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) -# describing rewriters in greater detail. -# -# @api public -# -# source://parser//lib/parser/tree_rewriter.rb#61 -class Parser::TreeRewriter < ::Parser::AST::Processor - # Returns `true` if the specified node is an assignment node, returns false - # otherwise. - # - # @api public - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://parser//lib/parser/tree_rewriter.rb#79 - def assignment?(node); end - - # Inserts new code after the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#118 - def insert_after(range, content); end - - # Inserts new code before the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#108 - def insert_before(range, content); end - - # Removes the source range. - # - # @api public - # @param range [Parser::Source::Range] - # - # source://parser//lib/parser/tree_rewriter.rb#88 - def remove(range); end - - # Replaces the code of the source range `range` with `content`. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#128 - def replace(range, content); end - - # Rewrites the AST/source buffer and returns a String containing the new - # version. - # - # @api public - # @param source_buffer [Parser::Source::Buffer] - # @param ast [Parser::AST::Node] - # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: - # policy arguments for TreeRewriter (optional) - # @return [String] - # - # source://parser//lib/parser/tree_rewriter.rb#62 - def rewrite(source_buffer, ast, **policy); end - - # Wraps the given source range with the given values. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] - # - # source://parser//lib/parser/tree_rewriter.rb#98 - def wrap(range, before, after); end -end - -# source://parser//lib/parser/version.rb#4 -Parser::VERSION = T.let(T.unsafe(nil), String) - -# source://parser//lib/parser/variables_stack.rb#5 -class Parser::VariablesStack - # @return [VariablesStack] a new instance of VariablesStack - # - # source://parser//lib/parser/variables_stack.rb#6 - def initialize; end - - # source://parser//lib/parser/variables_stack.rb#27 - def declare(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/variables_stack.rb#31 - def declared?(name); end - - # @return [Boolean] - # - # source://parser//lib/parser/variables_stack.rb#11 - def empty?; end - - # source://parser//lib/parser/variables_stack.rb#19 - def pop; end - - # source://parser//lib/parser/variables_stack.rb#15 - def push; end - - # source://parser//lib/parser/variables_stack.rb#23 - def reset; end -end diff --git a/sorbet/rbi/gems/pdf-reader@2.10.0.rbi b/sorbet/rbi/gems/pdf-reader@2.11.0.rbi similarity index 81% rename from sorbet/rbi/gems/pdf-reader@2.10.0.rbi rename to sorbet/rbi/gems/pdf-reader@2.11.0.rbi index 2b828bc..6de0f5c 100644 --- a/sorbet/rbi/gems/pdf-reader@2.10.0.rbi +++ b/sorbet/rbi/gems/pdf-reader@2.11.0.rbi @@ -91,6 +91,7 @@ class PDF::Reader # @return [Reader] a new instance of Reader # # source://pdf-reader//lib/pdf/reader.rb#118 + sig { params(input: T.any(String, Tempfile, IO), opts: T::Hash[T.untyped, T.untyped]).void } def initialize(input, opts = T.unsafe(nil)); end # Return a Hash with some basic information about the PDF file @@ -99,11 +100,11 @@ class PDF::Reader sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } def info; end - # Return a Hash with extra metadata provided by the author of the PDF file. Not + # Return a String with extra XML metadata provided by the author of the PDF file. Not # always present. # # source://pdf-reader//lib/pdf/reader.rb#134 - sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + sig { returns(T.nilable(String)) } def metadata; end # lowlevel hash-like access to all objects in the underlying PDF @@ -124,6 +125,7 @@ class PDF::Reader # methods available on each page # # source://pdf-reader//lib/pdf/reader.rb#216 + sig { params(num: Integer).returns(PDF::Reader::Page) } def page(num); end # To number of pages in this PDF @@ -139,7 +141,7 @@ class PDF::Reader # # reader.pages.each do |page| # puts page.fonts - # puts page.images + # puts page.rectangles # puts page.text # end # @@ -161,16 +163,19 @@ class PDF::Reader # recursively convert strings from outside a content stream into UTF-8 # # source://pdf-reader//lib/pdf/reader.rb#228 + sig { params(obj: T.untyped).returns(T.untyped) } def doc_strings_to_utf8(obj); end # @return [Boolean] # # source://pdf-reader//lib/pdf/reader.rb#249 + sig { params(str: String).returns(T::Boolean) } def has_utf16_bom?(str); end # TODO find a PDF I can use to spec this behaviour # # source://pdf-reader//lib/pdf/reader.rb#259 + sig { params(obj: String).returns(String) } def pdfdoc_to_utf8(obj); end # source://pdf-reader//lib/pdf/reader.rb#274 @@ -181,6 +186,7 @@ class PDF::Reader # String#encode # # source://pdf-reader//lib/pdf/reader.rb#267 + sig { params(obj: String).returns(String) } def utf16_to_utf8(obj); end class << self @@ -200,6 +206,13 @@ class PDF::Reader # @yield [PDF::Reader.new(input, opts)] # # source://pdf-reader//lib/pdf/reader.rb#174 + sig do + params( + input: T.any(String, Tempfile, IO), + opts: T::Hash[T.untyped, T.untyped], + block: T.proc.params(arg0: PDF::Reader).void + ).returns(T.untyped) + end def open(input, opts = T.unsafe(nil), &block); end end end @@ -212,6 +225,7 @@ class PDF::Reader::AesV2SecurityHandler # @return [AesV2SecurityHandler] a new instance of AesV2SecurityHandler # # source://pdf-reader//lib/pdf/reader/aes_v2_security_handler.rb#14 + sig { params(key: String).void } def initialize(key); end # 7.6.2 General Encryption Algorithm @@ -224,6 +238,7 @@ class PDF::Reader::AesV2SecurityHandler # ref - a PDF::Reader::Reference for the object to decrypt # # source://pdf-reader//lib/pdf/reader/aes_v2_security_handler.rb#27 + sig { params(buf: String, ref: PDF::Reader::Reference).returns(String) } def decrypt(buf, ref); end end @@ -235,6 +250,7 @@ class PDF::Reader::AesV3SecurityHandler # @return [AesV3SecurityHandler] a new instance of AesV3SecurityHandler # # source://pdf-reader//lib/pdf/reader/aes_v3_security_handler.rb#15 + sig { params(key: String).void } def initialize(key); end # 7.6.2 General Encryption Algorithm @@ -247,6 +263,7 @@ class PDF::Reader::AesV3SecurityHandler # ref - a PDF::Reader::Reference for the object to decrypt # # source://pdf-reader//lib/pdf/reader/aes_v3_security_handler.rb#29 + sig { params(buf: String, ref: PDF::Reader::Reference).returns(String) } def decrypt(buf, ref); end end @@ -257,6 +274,12 @@ end class PDF::Reader::BoundingRectangleRunsFilter class << self # source://pdf-reader//lib/pdf/reader/bounding_rectangle_runs_filter.rb#11 + sig do + params( + runs: T::Array[PDF::Reader::TextRun], + rect: PDF::Reader::Rectangle + ).returns(T::Array[PDF::Reader::TextRun]) + end def runs_within_rect(runs, rect); end end end @@ -286,6 +309,7 @@ class PDF::Reader::Buffer # @return [Buffer] a new instance of Buffer # # source://pdf-reader//lib/pdf/reader/buffer.rb#79 + sig { params(io: T.any(StringIO, Tempfile, IO), opts: T::Hash[Symbol, T.untyped]).void } def initialize(io, opts = T.unsafe(nil)); end # return true if there are no more tokens left @@ -323,6 +347,7 @@ class PDF::Reader::Buffer # However we check for CRLF first, so the ambiguity is avoided. # # source://pdf-reader//lib/pdf/reader/buffer.rb#108 + sig { params(bytes: Integer, opts: T::Hash[Symbol, T.untyped]).returns(T.nilable(String)) } def read(bytes, opts = T.unsafe(nil)); end # return the next token from the source. Returns a string if a token @@ -493,6 +518,7 @@ class PDF::Reader::CMap # @return [CMap] a new instance of CMap # # source://pdf-reader//lib/pdf/reader/cmap.rb#51 + sig { params(data: String).void } def initialize(data); end # Convert a glyph code into one or more Codepoints. @@ -500,6 +526,7 @@ class PDF::Reader::CMap # Returns an array of Integers. # # source://pdf-reader//lib/pdf/reader/cmap.rb#64 + sig { params(c: Integer).returns(T::Array[Integer]) } def decode(c); end # Returns the value of attribute map. @@ -514,21 +541,27 @@ class PDF::Reader::CMap private # source://pdf-reader//lib/pdf/reader/cmap.rb#158 + sig { params(start_code: String, end_code: String, dst: String).void } def bfrange_type_one(start_code, end_code, dst); end # source://pdf-reader//lib/pdf/reader/cmap.rb#171 + sig { params(start_code: String, end_code: String, dst: T::Array[String]).void } def bfrange_type_two(start_code, end_code, dst); end # source://pdf-reader//lib/pdf/reader/cmap.rb#99 + sig { params(instructions: String).returns(PDF::Reader::Parser) } def build_parser(instructions); end # source://pdf-reader//lib/pdf/reader/cmap.rb#136 + sig { params(instructions: T::Array[String]).void } def process_bfchar_instructions(instructions); end # source://pdf-reader//lib/pdf/reader/cmap.rb#146 + sig { params(instructions: T::Array[T.any(T::Array[String], String)]).void } def process_bfrange_instructions(instructions); end # source://pdf-reader//lib/pdf/reader/cmap.rb#70 + sig { params(data: String, initial_mode: Symbol).void } def process_data(data, initial_mode = T.unsafe(nil)); end # The following includes some manual decoding of UTF-16BE strings into unicode codepoints. In @@ -540,6 +573,7 @@ class PDF::Reader::CMap # exception when we try converting broken UTF-16 to UTF-8 # # source://pdf-reader//lib/pdf/reader/cmap.rb#112 + sig { params(str: String).returns(T::Array[Integer]) } def str_to_int(str); end end @@ -561,30 +595,32 @@ class PDF::Reader::CidWidths # @return [CidWidths] a new instance of CidWidths # # source://pdf-reader//lib/pdf/reader/cid_widths.rb#21 + sig { params(default: Numeric, array: T::Array[Numeric]).void } def initialize(default, array); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def [](*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fetch(*args, **_arg1, &block); end private # source://pdf-reader//lib/pdf/reader/cid_widths.rb#27 + sig { params(default: Numeric, array: T::Array[Numeric]).returns(T::Hash[Numeric, Numeric]) } def parse_array(default, array); end # this is the form 10 [234 63 234 346 47 234] where width of index 10 is # 234, index 11 is 63, etc # # source://pdf-reader//lib/pdf/reader/cid_widths.rb#46 + sig { params(first: Integer, widths: T::Array[Numeric]).returns(T::Hash[Numeric, Numeric]) } def parse_first_form(first, widths); end # this is the form 10 20 123 where all index between 10 and 20 have width 123 # - # @raise [MalformedPDFError] - # # source://pdf-reader//lib/pdf/reader/cid_widths.rb#54 + sig { params(first: Integer, final: Integer, width: Numeric).returns(T::Hash[Numeric, Numeric]) } def parse_second_form(first, final, width); end end @@ -596,10 +632,11 @@ class PDF::Reader::Encoding # @return [Encoding] a new instance of Encoding # # source://pdf-reader//lib/pdf/reader/encoding.rb#40 + sig { params(enc: T.untyped).void } def initialize(enc); end # source://pdf-reader//lib/pdf/reader/encoding.rb#88 - sig { returns(T.untyped) } + sig { returns(T::Hash[Integer, Integer]) } def differences; end # set the differences table for this encoding. should be an array in the following format: @@ -613,6 +650,7 @@ class PDF::Reader::Encoding # [25, :A, :B] # # source://pdf-reader//lib/pdf/reader/encoding.rb#71 + sig { params(diff: T::Array[T.any(Integer, Symbol)]).returns(T::Hash[Integer, Integer]) } def differences=(diff); end # convert an integer glyph code into an Adobe glyph name. @@ -621,9 +659,11 @@ class PDF::Reader::Encoding # => [:A] # # source://pdf-reader//lib/pdf/reader/encoding.rb#121 + sig { params(glyph_code: Integer).returns(T::Array[Symbol]) } def int_to_name(glyph_code); end # source://pdf-reader//lib/pdf/reader/encoding.rb#112 + sig { params(glyph_code: Integer).returns(String) } def int_to_utf8_string(glyph_code); end # convert the specified string to utf8 @@ -638,6 +678,7 @@ class PDF::Reader::Encoding # * mark the string as utf-8 if we're running on a M17N aware VM # # source://pdf-reader//lib/pdf/reader/encoding.rb#104 + sig { params(str: String).returns(String) } def to_utf8(str); end # Returns the value of attribute unpack. @@ -648,6 +689,7 @@ class PDF::Reader::Encoding private # source://pdf-reader//lib/pdf/reader/encoding.rb#169 + sig { params(str: String).returns(String) } def convert_to_utf8(str); end # returns a hash that: @@ -657,32 +699,37 @@ class PDF::Reader::Encoding # Each specific encoding will change this default as required for their glyphs # # source://pdf-reader//lib/pdf/reader/encoding.rb#140 - sig { returns(T.untyped) } + sig { returns(T::Hash[Integer, Integer]) } def default_mapping; end # source://pdf-reader//lib/pdf/reader/encoding.rb#184 + sig { params(enc: T.untyped).returns(T.nilable(String)) } def get_mapping_file(enc); end # source://pdf-reader//lib/pdf/reader/encoding.rb#175 + sig { params(enc: T.untyped).returns(String) } def get_unpack(enc); end # source://pdf-reader//lib/pdf/reader/encoding.rb#205 - sig { returns(T.untyped) } + sig { returns(PDF::Reader::GlyphHash) } def glyphlist; end # source://pdf-reader//lib/pdf/reader/encoding.rb#150 + sig { params(glyph_code: Integer).returns(String) } def internal_int_to_utf8_string(glyph_code); end # source://pdf-reader//lib/pdf/reader/encoding.rb#162 + sig { params(times: Integer).returns(String) } def little_boxes(times); end # source://pdf-reader//lib/pdf/reader/encoding.rb#209 + sig { params(file: String).void } def load_mapping(file); end # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/encoding.rb#158 - sig { returns(T.untyped) } + sig { returns(T::Boolean) } def utf8_conversion_impossible?; end end @@ -709,31 +756,37 @@ class PDF::Reader::Error # @raise [MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/error.rb#46 + sig { params(lvalue: T.untyped, rvalue: T.untyped).returns(T.untyped) } def assert_equal(lvalue, rvalue); end # @raise [MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/error.rb#34 + sig { params(lvalue: T.untyped, rvalue: T.untyped, chars: T.untyped).returns(T.untyped) } def str_assert(lvalue, rvalue, chars = T.unsafe(nil)); end # @raise [MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/error.rb#40 + sig { params(lvalue: T.untyped, rvalue: T.untyped, chars: T.untyped).returns(T.untyped) } def str_assert_not(lvalue, rvalue, chars = T.unsafe(nil)); end # @raise [ArgumentError] # # source://pdf-reader//lib/pdf/reader/error.rb#58 + sig { params(object: Object, name: String).void } def validate_not_nil(object, name); end # @raise [ArgumentError] # # source://pdf-reader//lib/pdf/reader/error.rb#50 + sig { params(object: Object, name: String, klass: Module).void } def validate_type(object, name, klass); end # @raise [MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/error.rb#54 + sig { params(object: Object, name: String, klass: Module).void } def validate_type_as_malformed(object, name, klass); end end end @@ -746,6 +799,7 @@ class PDF::Reader::EventPoint # @return [EventPoint] a new instance of EventPoint # # source://pdf-reader//lib/pdf/reader/overlapping_runs_filter.rb#62 + sig { params(x: Numeric, run: PDF::Reader::TextRun).void } def initialize(x, run); end # Returns the value of attribute run. @@ -778,6 +832,7 @@ module PDF::Reader::Filter # returned untouched. At this stage PDF::Reader has no need to decode images. # # source://pdf-reader//lib/pdf/reader/filter.rb#44 + sig { params(name: Symbol, options: T::Hash[T.untyped, T.untyped]).returns(T.untyped) } def with(name, options = T.unsafe(nil)); end end end @@ -789,12 +844,14 @@ class PDF::Reader::Filter::Ascii85 # @return [Ascii85] a new instance of Ascii85 # # source://pdf-reader//lib/pdf/reader/filter/ascii85.rb#12 + sig { params(options: T::Hash[T.untyped, T.untyped]).void } def initialize(options = T.unsafe(nil)); end # Decode the specified data using the Ascii85 algorithm. Relies on the AScii85 # rubygem. # # source://pdf-reader//lib/pdf/reader/filter/ascii85.rb#20 + sig { params(data: String).returns(String) } def filter(data); end end @@ -805,11 +862,13 @@ class PDF::Reader::Filter::AsciiHex # @return [AsciiHex] a new instance of AsciiHex # # source://pdf-reader//lib/pdf/reader/filter/ascii_hex.rb#11 + sig { params(options: T::Hash[T.untyped, T.untyped]).void } def initialize(options = T.unsafe(nil)); end # Decode the specified data using the AsciiHex algorithm. # # source://pdf-reader//lib/pdf/reader/filter/ascii_hex.rb#18 + sig { params(data: String).returns(String) } def filter(data); end end @@ -821,20 +880,24 @@ class PDF::Reader::Filter::Depredict # @return [Depredict] a new instance of Depredict # # source://pdf-reader//lib/pdf/reader/filter/depredict.rb#11 + sig { params(options: T::Hash[T.untyped, T.untyped]).void } def initialize(options = T.unsafe(nil)); end # Streams can be preprocessed to improve compression. This reverses the # preprocessing # # source://pdf-reader//lib/pdf/reader/filter/depredict.rb#19 + sig { params(data: String).returns(String) } def filter(data); end private # source://pdf-reader//lib/pdf/reader/filter/depredict.rb#63 + sig { params(data: T.untyped).returns(T.untyped) } def png_depredict(data); end # source://pdf-reader//lib/pdf/reader/filter/depredict.rb#37 + sig { params(data: T.untyped).returns(T.untyped) } def tiff_depredict(data); end end @@ -845,16 +908,19 @@ class PDF::Reader::Filter::Flate # @return [Flate] a new instance of Flate # # source://pdf-reader//lib/pdf/reader/filter/flate.rb#16 + sig { params(options: T::Hash[T.untyped, T.untyped]).void } def initialize(options = T.unsafe(nil)); end # Decode the specified data with the Zlib compression algorithm # # source://pdf-reader//lib/pdf/reader/filter/flate.rb#22 + sig { params(data: String).returns(String) } def filter(data); end private # source://pdf-reader//lib/pdf/reader/filter/flate.rb#34 + sig { params(data: T.untyped).returns(T.untyped) } def zlib_inflate(data); end end @@ -875,11 +941,13 @@ class PDF::Reader::Filter::Lzw # @return [Lzw] a new instance of Lzw # # source://pdf-reader//lib/pdf/reader/filter/lzw.rb#11 + sig { params(options: T::Hash[T.untyped, T.untyped]).void } def initialize(options = T.unsafe(nil)); end # Decode the specified data with the LZW compression algorithm # # source://pdf-reader//lib/pdf/reader/filter/lzw.rb#17 + sig { params(data: String).returns(String) } def filter(data); end end @@ -890,9 +958,11 @@ class PDF::Reader::Filter::Null # @return [Null] a new instance of Null # # source://pdf-reader//lib/pdf/reader/filter/null.rb#9 + sig { params(options: T::Hash[T.untyped, T.untyped]).void } def initialize(options = T.unsafe(nil)); end # source://pdf-reader//lib/pdf/reader/filter/null.rb#13 + sig { params(data: T.untyped).returns(T.untyped) } def filter(data); end end @@ -903,11 +973,13 @@ class PDF::Reader::Filter::RunLength # @return [RunLength] a new instance of RunLength # # source://pdf-reader//lib/pdf/reader/filter/run_length.rb#11 + sig { params(options: T::Hash[T.untyped, T.untyped]).void } def initialize(options = T.unsafe(nil)); end # Decode the specified data with the RunLengthDecode compression algorithm # # source://pdf-reader//lib/pdf/reader/filter/run_length.rb#17 + sig { params(data: String).returns(String) } def filter(data); end end @@ -919,6 +991,7 @@ class PDF::Reader::Font # @return [Font] a new instance of Font # # source://pdf-reader//lib/pdf/reader/font.rb#41 + sig { params(ohash: PDF::Reader::ObjectHash, obj: T::Hash[Symbol, T.untyped]).void } def initialize(ohash, obj); end # Returns the value of attribute basefont. @@ -974,6 +1047,7 @@ class PDF::Reader::Font # glyph space, which is 1000 glyph units = 1 text space unit # # source://pdf-reader//lib/pdf/reader/font.rb#68 + sig { params(code_point: T.any(String, Integer)).returns(T.untyped) } def glyph_width(code_point); end # In most cases glyph width is converted into text space with a simple divide by 1000. @@ -1001,6 +1075,7 @@ class PDF::Reader::Font def subtype=(_arg0); end # source://pdf-reader//lib/pdf/reader/font.rb#54 + sig { params(params: T.any(Integer, String, T::Array[T.untyped])).returns(String) } def to_utf8(params); end # Returns the value of attribute tounicode. @@ -1016,6 +1091,7 @@ class PDF::Reader::Font def tounicode=(_arg0); end # source://pdf-reader//lib/pdf/reader/font.rb#62 + sig { params(data: String).returns(T::Array[T.nilable(T.any(Numeric, String))]) } def unpack(data); end # Returns the value of attribute widths. @@ -1030,20 +1106,30 @@ class PDF::Reader::Font # source://pdf-reader//lib/pdf/reader/font.rb#126 sig do - returns(T.any(PDF::Reader::WidthCalculator::BuiltIn, PDF::Reader::WidthCalculator::Composite, PDF::Reader::WidthCalculator::TrueType, PDF::Reader::WidthCalculator::TypeOneOrThree, PDF::Reader::WidthCalculator::TypeZero)) + returns(T.any( + PDF::Reader::WidthCalculator::BuiltIn, + PDF::Reader::WidthCalculator::Composite, + PDF::Reader::WidthCalculator::TrueType, + PDF::Reader::WidthCalculator::TypeOneOrThree, + PDF::Reader::WidthCalculator::TypeZero, + )) end def build_width_calculator; end # source://pdf-reader//lib/pdf/reader/font.rb#115 + sig { params(font_name: Symbol).returns(PDF::Reader::Encoding) } def default_encoding(font_name); end # source://pdf-reader//lib/pdf/reader/font.rb#166 + sig { params(obj: T.untyped).void } def extract_base_info(obj); end # source://pdf-reader//lib/pdf/reader/font.rb#207 + sig { params(obj: T.untyped).void } def extract_descendants(obj); end # source://pdf-reader//lib/pdf/reader/font.rb#196 + sig { params(obj: T.untyped).void } def extract_descriptor(obj); end # source://pdf-reader//lib/pdf/reader/font.rb#188 @@ -1055,9 +1141,11 @@ class PDF::Reader::Font def font_matrix_transform(x, y); end # source://pdf-reader//lib/pdf/reader/font.rb#221 + sig { params(params: T.any(Integer, String, T::Array[T.untyped])).returns(String) } def to_utf8_via_cmap(params); end # source://pdf-reader//lib/pdf/reader/font.rb#236 + sig { params(params: T.any(Integer, String, T::Array[T.untyped])).returns(String) } def to_utf8_via_encoding(params); end end @@ -1068,6 +1156,7 @@ class PDF::Reader::FontDescriptor # @return [FontDescriptor] a new instance of FontDescriptor # # source://pdf-reader//lib/pdf/reader/font_descriptor.rb#17 + sig { params(ohash: PDF::Reader::ObjectHash, fd_hash: T::Hash[T.untyped, T.untyped]).void } def initialize(ohash, fd_hash); end # Returns the value of attribute ascent. @@ -1128,6 +1217,7 @@ class PDF::Reader::FontDescriptor def glyph_to_pdf_scale_factor; end # source://pdf-reader//lib/pdf/reader/font_descriptor.rb#50 + sig { params(char_code: Integer).returns(Numeric) } def glyph_width(char_code); end # Returns the value of attribute italic_angle. @@ -1181,9 +1271,10 @@ class PDF::Reader::FormXObject # @return [FormXObject] a new instance of FormXObject # # source://pdf-reader//lib/pdf/reader/form_xobject.rb#31 + sig { params(page: T.untyped, xobject: T.untyped, options: T.untyped).void } def initialize(page, xobject, options = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def color_spaces(*args, **_arg1, &block); end # return a hash of fonts used on this form. @@ -1197,19 +1288,19 @@ class PDF::Reader::FormXObject sig { returns(T.untyped) } def font_objects; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fonts(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def graphic_states(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def patterns(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def procedure_sets(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def properties(*args, **_arg1, &block); end # returns the raw content stream for this page. This is plumbing, nothing to @@ -1219,7 +1310,7 @@ class PDF::Reader::FormXObject sig { returns(T.untyped) } def raw_content; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def shadings(*args, **_arg1, &block); end # processes the raw content stream for this form in sequential order and @@ -1236,7 +1327,7 @@ class PDF::Reader::FormXObject # source://pdf-reader//lib/pdf/reader/form_xobject.rb#20 def xobject; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def xobjects(*args, **_arg1, &block); end private @@ -1246,9 +1337,11 @@ class PDF::Reader::FormXObject def cached_tokens_key; end # source://pdf-reader//lib/pdf/reader/form_xobject.rb#79 + sig { params(receivers: T.untyped, name: T.untyped, params: T.untyped).returns(T.untyped) } def callback(receivers, name, params = T.unsafe(nil)); end # source://pdf-reader//lib/pdf/reader/form_xobject.rb#105 + sig { params(receivers: T.untyped, instructions: T.untyped).returns(T.untyped) } def content_stream(receivers, instructions); end # source://pdf-reader//lib/pdf/reader/form_xobject.rb#85 @@ -1271,6 +1364,9 @@ end # # source://pdf-reader//lib/pdf/reader/glyph_hash.rb#34 class PDF::Reader::GlyphHash + let T.unsafe(nil), T.nilable(T::Hash[Symbol, Integer]) + let T.unsafe(nil), T.nilable(T::Hash[Integer, T::Array[Symbol]]) + # @return [GlyphHash] a new instance of GlyphHash # # source://pdf-reader//lib/pdf/reader/glyph_hash.rb#35 @@ -1297,7 +1393,8 @@ class PDF::Reader::GlyphHash # h.name_to_unicode(:34) # => 34 # - # source://pdf-reader//lib/pdf/reader/glyph_hash.rb#62 + # source://pdf-reader//lib/pdf/reader/glyph_hash.rb#70 + sig { params(name: T.nilable(Symbol)).returns(T.nilable(Integer)) } def name_to_unicode(name); end # attempt to convert a Unicode code point to the equivilant PDF Name. Returns nil @@ -1314,7 +1411,8 @@ class PDF::Reader::GlyphHash # h.unicode_to_name(34) # => [:34] # - # source://pdf-reader//lib/pdf/reader/glyph_hash.rb#99 + # source://pdf-reader//lib/pdf/reader/glyph_hash.rb#107 + sig { params(codepoint: T.nilable(Integer)).returns(T::Array[Symbol]) } def unicode_to_name(codepoint); end private @@ -1323,8 +1421,8 @@ class PDF::Reader::GlyphHash # a text file supplied by Adobe at: # https://github.com/adobe-type-tools/agl-aglfn # - # source://pdf-reader//lib/pdf/reader/glyph_hash.rb#108 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/glyph_hash.rb#116 + sig { returns([T::Hash[Symbol, Integer], T::Hash[Integer, T::Array[Symbol]]]) } def load_adobe_glyph_mapping; end end @@ -1350,6 +1448,7 @@ class PDF::Reader::KeyBuilderV5 # @return [KeyBuilderV5] a new instance of KeyBuilderV5 # # source://pdf-reader//lib/pdf/reader/key_builder_v5.rb#19 + sig { params(opts: T::Hash[Symbol, String]).void } def initialize(opts = T.unsafe(nil)); end # Takes a string containing a user provided password. @@ -1361,6 +1460,7 @@ class PDF::Reader::KeyBuilderV5 # @raise [PDF::Reader::EncryptedPDFError] # # source://pdf-reader//lib/pdf/reader/key_builder_v5.rb#41 + sig { params(pass: String).returns(String) } def key(pass); end private @@ -1372,24 +1472,30 @@ class PDF::Reader::KeyBuilderV5 # if the string is a valid user/owner password, this will return the decryption key # # source://pdf-reader//lib/pdf/reader/key_builder_v5.rb#61 + sig { params(password: T.untyped).returns(T.untyped) } def auth_owner_pass(password); end # source://pdf-reader//lib/pdf/reader/key_builder_v5.rb#83 + sig { params(password: String).returns(T.nilable(String)) } def auth_owner_pass_r6(password); end # source://pdf-reader//lib/pdf/reader/key_builder_v5.rb#72 + sig { params(password: T.untyped).returns(T.untyped) } def auth_user_pass(password); end # source://pdf-reader//lib/pdf/reader/key_builder_v5.rb#94 + sig { params(password: String).returns(T.nilable(String)) } def auth_user_pass_r6(password); end # PDF 2.0 spec, 7.6.4.3.4 # Algorithm 2.B: Computing a hash (revision 6 and later) # # source://pdf-reader//lib/pdf/reader/key_builder_v5.rb#107 + sig { params(password: String, salt: String, user_key: String).returns(String) } def r6_digest(password, salt, user_key = T.unsafe(nil)); end # source://pdf-reader//lib/pdf/reader/key_builder_v5.rb#131 + sig { params(str: String).returns(Integer) } def unpack_128bit_bigendian_int(str); end end @@ -1410,6 +1516,7 @@ class PDF::Reader::LZW # Decompresses a LZW compressed string. # # source://pdf-reader//lib/pdf/reader/lzw.rb#91 + sig { params(data: String).returns(String) } def decode(data); end private @@ -1417,6 +1524,13 @@ class PDF::Reader::LZW # @raise [MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/lzw.rb#128 + sig do + params( + string_table: PDF::Reader::LZW::StringTable, + some_code: T.nilable(Integer), + other_code: T.nilable(Integer) + ).returns(String) + end def create_new_string(string_table, some_code, other_code); end end end @@ -1428,6 +1542,7 @@ class PDF::Reader::LZW::BitStream # @return [BitStream] a new instance of BitStream # # source://pdf-reader//lib/pdf/reader/lzw.rb#25 + sig { params(data: String, bits_in_chunk: Integer).void } def initialize(data, bits_in_chunk); end # source://pdf-reader//lib/pdf/reader/lzw.rb#39 @@ -1437,6 +1552,7 @@ class PDF::Reader::LZW::BitStream # @raise [MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/lzw.rb#33 + sig { params(bits_in_chunk: Integer).void } def set_bits_in_chunk(bits_in_chunk); end end @@ -1463,9 +1579,11 @@ class PDF::Reader::LZW::StringTable # if code less than 258 return fixed string # # source://pdf-reader//lib/pdf/reader/lzw.rb#75 + sig { params(key: Integer).returns(T.nilable(String)) } def [](key); end # source://pdf-reader//lib/pdf/reader/lzw.rb#83 + sig { params(string: String).void } def add(string); end # Returns the value of attribute string_table_pos. @@ -1480,11 +1598,23 @@ end # source://pdf-reader//lib/pdf/reader/error.rb#66 class PDF::Reader::MalformedPDFError < ::RuntimeError; end +# There's no point rendering zero-width characters +# +# source://pdf-reader//lib/pdf/reader/no_text_filter.rb#7 +class PDF::Reader::NoTextFilter + class << self + # source://pdf-reader//lib/pdf/reader/no_text_filter.rb#9 + sig { params(runs: T::Array[PDF::Reader::TextRun]).returns(T::Array[PDF::Reader::TextRun]) } + def exclude_empty_strings(runs); end + end +end + # A null object security handler. Used when a PDF is unencrypted. # # source://pdf-reader//lib/pdf/reader/null_security_handler.rb#8 class PDF::Reader::NullSecurityHandler # source://pdf-reader//lib/pdf/reader/null_security_handler.rb#10 + sig { params(buf: T.untyped, _ref: T.untyped).returns(T.untyped) } def decrypt(buf, _ref); end end @@ -1497,12 +1627,15 @@ class PDF::Reader::ObjectCache # @return [ObjectCache] a new instance of ObjectCache # # source://pdf-reader//lib/pdf/reader/object_cache.rb#22 + sig { params(lru_size: T.untyped).void } def initialize(lru_size = T.unsafe(nil)); end # source://pdf-reader//lib/pdf/reader/object_cache.rb#29 + sig { params(key: T.untyped).returns(T.untyped) } def [](key); end # source://pdf-reader//lib/pdf/reader/object_cache.rb#34 + sig { params(key: T.untyped, value: T.untyped).returns(T.untyped) } def []=(key, value); end # source://pdf-reader//lib/pdf/reader/object_cache.rb#47 @@ -1527,6 +1660,7 @@ class PDF::Reader::ObjectCache def empty?; end # source://pdf-reader//lib/pdf/reader/object_cache.rb#42 + sig { params(key: T.untyped, local_default: T.untyped).returns(T.untyped) } def fetch(key, local_default = T.unsafe(nil)); end # @return [Boolean] @@ -1537,6 +1671,7 @@ class PDF::Reader::ObjectCache # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/object_cache.rb#79 + sig { params(value: T.untyped).returns(T.untyped) } def has_value?(value); end # Returns the value of attribute hits. @@ -1547,6 +1682,7 @@ class PDF::Reader::ObjectCache # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/object_cache.rb#72 + sig { params(key: T.untyped).returns(T.untyped) } def include?(key); end # @return [Boolean] @@ -1588,9 +1724,11 @@ class PDF::Reader::ObjectCache # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/object_cache.rb#105 + sig { params(obj: T.untyped).returns(T.untyped) } def cacheable?(obj); end # source://pdf-reader//lib/pdf/reader/object_cache.rb#97 + sig { params(key: T.untyped).returns(T.untyped) } def update_stats(key); end end @@ -1625,7 +1763,7 @@ PDF::Reader::ObjectCache::CACHEABLE_TYPES = T.let(T.unsafe(nil), Array) # h[PDF::Reader::Reference.new(1,0)] # => 3469 # -# source://pdf-reader//lib/pdf/reader/object_hash.rb#30 +# source://pdf-reader//lib/pdf/reader/object_hash.rb#32 class PDF::Reader::ObjectHash include ::Enumerable include Enumerable @@ -1639,7 +1777,8 @@ class PDF::Reader::ObjectHash # # @return [ObjectHash] a new instance of ObjectHash # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#44 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#46 + sig { params(input: T.any(IO, Tempfile, StringIO, String), opts: T::Hash[Symbol, T.untyped]).void } def initialize(input, opts = T.unsafe(nil)); end # Access an object from the PDF. key can be an int or a PDF::Reader::Reference @@ -1651,31 +1790,33 @@ class PDF::Reader::ObjectHash # If a PDF::Reader::Reference object is used the exact ID and generation number # can be specified. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#79 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#81 + sig { params(key: T.any(Integer, PDF::Reader::Reference)).returns(T.untyped) } def [](key); end # Returns the value of attribute default. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#33 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#35 def default; end # Sets the attribute default # # @param value the value to set the attribute default to. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#33 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#35 def default=(_arg0); end # If key is a PDF::Reader::Reference object, lookup the corresponding # object in the PDF and return it. Otherwise return key untouched. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#94 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#96 def deref(key); end # Recursively dereferences the object refered to be +key+. If +key+ is not # a PDF::Reader::Reference, the key is returned unchanged. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#314 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#316 + sig { params(key: T.untyped).returns(T.untyped) } def deref!(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1685,10 +1826,12 @@ class PDF::Reader::ObjectHash # any other type then a MalformedPDFError exception will raise. Useful when # expecting an Array and no other type will do. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#105 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#107 + sig { params(key: T.untyped).returns(T.nilable(T::Array[T.untyped])) } def deref_array(key); end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#318 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#320 + sig { params(key: T.untyped).returns(T.nilable(T::Array[T.untyped])) } def deref_array!(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1702,7 +1845,8 @@ class PDF::Reader::ObjectHash # # @raise [MalformedPDFError] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#123 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#125 + sig { params(key: T.untyped).returns(T.nilable(T::Array[Numeric])) } def deref_array_of_numbers(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1712,10 +1856,12 @@ class PDF::Reader::ObjectHash # any other type then a MalformedPDFError exception will raise. Useful when # expecting an Array and no other type will do. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#149 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#151 + sig { params(key: T.untyped).returns(T.nilable(T::Hash[Symbol, T.untyped])) } def deref_hash(key); end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#326 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#328 + sig { params(key: T.untyped).returns(T.nilable(T::Hash[Symbol, T.untyped])) } def deref_hash!(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1727,7 +1873,8 @@ class PDF::Reader::ObjectHash # # Some effort to cast to an int is made when the reference points to a non-integer. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#191 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#193 + sig { params(key: T.untyped).returns(T.nilable(Integer)) } def deref_integer(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1739,7 +1886,8 @@ class PDF::Reader::ObjectHash # # Some effort to cast to a symbol is made when the reference points to a non-symbol. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#167 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#169 + sig { params(key: T.untyped).returns(T.nilable(Symbol)) } def deref_name(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1749,7 +1897,8 @@ class PDF::Reader::ObjectHash # any other type then a MalformedPDFError exception will raise. Useful when # expecting a Name or Array and no other type will do. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#281 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#283 + sig { params(key: T.untyped).returns(T.any(Symbol, T::Array[T.untyped], NilClass)) } def deref_name_or_array(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1761,7 +1910,8 @@ class PDF::Reader::ObjectHash # # Some effort to cast to a number is made when the reference points to a non-number. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#215 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#217 + sig { params(key: T.untyped).returns(T.nilable(Numeric)) } def deref_number(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1771,7 +1921,8 @@ class PDF::Reader::ObjectHash # any other type then a MalformedPDFError exception will raise. Useful when # expecting a stream and no other type will do. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#239 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#241 + sig { params(key: T.untyped).returns(T.nilable(PDF::Reader::Stream)) } def deref_stream(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1781,7 +1932,8 @@ class PDF::Reader::ObjectHash # any other type then a MalformedPDFError exception will raise. Useful when # expecting a stream or Array and no other type will do. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#299 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#301 + sig { params(key: T.untyped).returns(T.any(PDF::Reader::Stream, T::Array[T.untyped], NilClass)) } def deref_stream_or_array(key); end # If key is a PDF::Reader::Reference object, lookup the corresponding @@ -1793,29 +1945,30 @@ class PDF::Reader::ObjectHash # # Some effort to cast to a string is made when the reference points to a non-string. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#259 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#261 + sig { params(key: T.untyped).returns(T.nilable(String)) } def deref_string(key); end # iterate over each key, value. Just like a ruby hash. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#359 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#361 sig { params(block: T.untyped).returns(T.untyped) } def each(&block); end # iterate over each key. Just like a ruby hash. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#368 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#370 sig { params(block: T.untyped).returns(T.untyped) } def each_key(&block); end # iterate over each key, value. Just like a ruby hash. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#359 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#361 def each_pair(&block); end # iterate over each value. Just like a ruby hash. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#376 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#378 sig { params(block: T.untyped).returns(T.untyped) } def each_value(&block); end @@ -1823,13 +1976,13 @@ class PDF::Reader::ObjectHash # # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#391 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#393 sig { returns(T::Boolean) } def empty?; end # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#474 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#476 sig { returns(T::Boolean) } def encrypted?; end @@ -1845,7 +1998,8 @@ class PDF::Reader::ObjectHash # local_default is the object that will be returned if the requested key doesn't # exist. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#346 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#348 + sig { params(key: T.untyped, local_default: T.untyped).returns(T.untyped) } def fetch(key, local_default = T.unsafe(nil)); end # return true if the specified key exists in the file. key @@ -1853,14 +2007,16 @@ class PDF::Reader::ObjectHash # # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#398 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#400 + sig { params(check_key: T.untyped).returns(T::Boolean) } def has_key?(check_key); end # return true if the specifiedvalue exists in the file # # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#415 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#417 + sig { params(value: T.untyped).returns(T::Boolean) } def has_value?(value); end # return true if the specified key exists in the file. key @@ -1868,7 +2024,7 @@ class PDF::Reader::ObjectHash # # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#398 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#400 def include?(check_key); end # return true if the specified key exists in the file. key @@ -1876,19 +2032,19 @@ class PDF::Reader::ObjectHash # # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#398 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#400 def key?(check_key); end # return an array of all keys in the file # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#430 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#432 sig { returns(T::Array[PDF::Reader::Reference]) } def keys; end # return the number of objects in the file. An object with multiple generations # is counted once. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#384 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#386 def length; end # return true if the specified key exists in the file. key @@ -1896,18 +2052,20 @@ class PDF::Reader::ObjectHash # # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#398 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#400 def member?(check_key); end # returns the type of object a ref points to # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#59 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#61 + sig { params(ref: T.any(Integer, PDF::Reader::Reference)).returns(T.nilable(Symbol)) } def obj_type(ref); end # If key is a PDF::Reader::Reference object, lookup the corresponding # object in the PDF and return it. Otherwise return key untouched. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#94 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#96 + sig { params(key: T.untyped).returns(T.untyped) } def object(key); end # returns an array of PDF::Reader::References. Each reference in the @@ -1916,30 +2074,30 @@ class PDF::Reader::ObjectHash # # Useful for apps that want to extract data from specific pages. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#466 - sig { returns(T::Array[PDF::Reader::Reference]) } + # source://pdf-reader//lib/pdf/reader/object_hash.rb#468 + sig { returns(T::Array[T.any(PDF::Reader::Reference, T::Hash[Symbol, T.untyped])]) } def page_references; end # Returns the value of attribute pdf_version. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#34 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#36 def pdf_version; end # Returns the value of attribute sec_handler. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#35 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#37 def sec_handler; end # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#478 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#480 sig { returns(T::Boolean) } def sec_handler?; end # return the number of objects in the file. An object with multiple generations # is counted once. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#384 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#386 sig { returns(Integer) } def size; end @@ -1947,22 +2105,23 @@ class PDF::Reader::ObjectHash # # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#66 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#68 + sig { params(ref: T.any(Integer, PDF::Reader::Reference)).returns(T::Boolean) } def stream?(ref); end # return an array of arrays. Each sub array contains a key/value pair. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#452 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#454 sig { returns(T.untyped) } def to_a; end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#424 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#426 sig { returns(String) } def to_s; end # Returns the value of attribute trailer. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#34 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#36 def trailer; end # return true if the specified key exists in the file. key @@ -1970,68 +2129,80 @@ class PDF::Reader::ObjectHash # # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#398 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#400 def value?(check_key); end # return an array of all values in the file # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#438 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#440 sig { returns(T.untyped) } def values; end # return an array of all values from the specified keys # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#446 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#448 sig { params(ids: T.untyped).returns(T.untyped) } def values_at(*ids); end private - # source://pdf-reader//lib/pdf/reader/object_hash.rb#539 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#541 + sig { params(ref: T.untyped, obj: T.untyped).returns(T.untyped) } def decrypt(ref, obj); end # Private implementation of deref!, which exists to ensure the `seen` argument # isn't publicly available. It's used to avoid endless loops in the recursion, and # doesn't need to be part of the public API. # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#510 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#512 + sig { params(key: T.untyped, seen: T.untyped).returns(T.untyped) } def deref_internal!(key, seen); end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#599 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#601 + sig { params(input: T.any(IO, Tempfile, StringIO, String)).returns(T.any(IO, Tempfile, StringIO)) } def extract_io_from(input); end # parse a traditional object from the PDF, starting from the byte offset indicated # in the xref table # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#487 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#489 + sig { params(key: T.untyped).returns(T.untyped) } def fetch_object(key); end # parse a object that's embedded in an object stream in the PDF # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#496 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#498 + sig { params(key: T.untyped).returns(T.untyped) } def fetch_object_stream(key); end # returns an array of object references for all pages in this object store. The ordering of # the Array is significant and matches the page ordering of the document # - # source://pdf-reader//lib/pdf/reader/object_hash.rb#575 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#577 + sig do + params( + obj: T.any(PDF::Reader::Reference, T::Hash[Symbol, T.untyped]) + ).returns(T::Array[T.any(PDF::Reader::Reference, T::Hash[Symbol, T.untyped])]) + end def get_page_objects(obj); end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#560 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#562 + sig { params(offset: Integer).returns(PDF::Reader::Buffer) } def new_buffer(offset = T.unsafe(nil)); end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#568 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#570 sig { returns(T.untyped) } def object_streams; end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#609 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#611 + sig { params(input: String).returns(String) } def read_as_binary(input); end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#592 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#594 sig { returns(Float) } def read_version; end - # source://pdf-reader//lib/pdf/reader/object_hash.rb#564 + # source://pdf-reader//lib/pdf/reader/object_hash.rb#566 sig { returns(T.untyped) } def xref; end end @@ -2044,9 +2215,15 @@ class PDF::Reader::ObjectStream # @return [ObjectStream] a new instance of ObjectStream # # source://pdf-reader//lib/pdf/reader/object_stream.rb#11 + sig { params(stream: PDF::Reader::Stream).void } def initialize(stream); end # source://pdf-reader//lib/pdf/reader/object_stream.rb#16 + sig do + params( + objid: Integer + ).returns(T.any(PDF::Reader::Reference, PDF::Reader::Token, Numeric, String, Symbol, T::Array[T.untyped], T::Hash[T.untyped, T.untyped], NilClass)) + end def [](objid); end # source://pdf-reader//lib/pdf/reader/object_stream.rb#26 @@ -2075,9 +2252,11 @@ end class PDF::Reader::OverlappingRunsFilter class << self # source://pdf-reader//lib/pdf/reader/overlapping_runs_filter.rb#41 + sig { params(sweep_line_status: T::Array[PDF::Reader::TextRun], event_point: EventPoint).returns(T::Boolean) } def detect_intersection(sweep_line_status, event_point); end # source://pdf-reader//lib/pdf/reader/overlapping_runs_filter.rb#14 + sig { params(runs: T::Array[PDF::Reader::TextRun]).returns(T::Array[PDF::Reader::TextRun]) } def exclude_redundant_runs(runs); end end end @@ -2108,6 +2287,7 @@ class PDF::Reader::Page # @return [Page] a new instance of Page # # source://pdf-reader//lib/pdf/reader/page.rb#44 + sig { params(objects: PDF::Reader::ObjectHash, pagenum: Integer, options: T::Hash[Symbol, T.untyped]).void } def initialize(objects, pagenum, options = T.unsafe(nil)); end # Returns the attributes that accompany this page, including @@ -2133,13 +2313,13 @@ class PDF::Reader::Page # source://pdf-reader//lib/pdf/reader/page.rb#28 def cache; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def color_spaces(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def fonts(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def graphic_states(*args, **_arg1, &block); end # source://pdf-reader//lib/pdf/reader/page.rb#81 @@ -2178,13 +2358,13 @@ class PDF::Reader::Page # source://pdf-reader//lib/pdf/reader/page.rb#23 def page_object; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def patterns(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def procedure_sets(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def properties(*args, **_arg1, &block); end # returns the raw content stream for this page. This is plumbing, nothing to @@ -2208,15 +2388,17 @@ class PDF::Reader::Page def rotate; end # source://pdf-reader//lib/pdf/reader/page.rb#125 + sig { params(opts: T::Hash[Symbol, T.untyped]).returns(T::Array[PDF::Reader::TextRun]) } def runs(opts = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def shadings(*args, **_arg1, &block); end # returns the plain text content of this page encoded as UTF-8. Any # characters that can't be translated will be returned as a ▯ # # source://pdf-reader//lib/pdf/reader/page.rb#113 + sig { params(opts: T::Hash[Symbol, T.untyped]).returns(String) } def text(opts = T.unsafe(nil)); end # returns the plain text content of this page encoded as UTF-8. Any @@ -2256,23 +2438,28 @@ class PDF::Reader::Page sig { returns(Numeric) } def width; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def xobjects(*args, **_arg1, &block); end private - # source://pdf-reader//lib/pdf/reader/page.rb#276 + # source://pdf-reader//lib/pdf/reader/page.rb#293 + sig { params(origin: T.untyped).returns(T.untyped) } def ancestors(origin = T.unsafe(nil)); end # calls the name callback method on each receiver object with params as the arguments # - # source://pdf-reader//lib/pdf/reader/page.rb#266 + # The silly style here is because sorbet won't let me use splat arguments + # + # source://pdf-reader//lib/pdf/reader/page.rb#268 + sig { params(receivers: T::Array[Object], name: Symbol, params: T::Array[T.untyped]).void } def callback(receivers, name, params = T.unsafe(nil)); end # source://pdf-reader//lib/pdf/reader/page.rb#247 + sig { params(receivers: T::Array[T.untyped], instructions: String).void } def content_stream(receivers, instructions); end - # source://pdf-reader//lib/pdf/reader/page.rb#272 + # source://pdf-reader//lib/pdf/reader/page.rb#289 sig { returns(T.untyped) } def page_with_ancestors; end @@ -2290,7 +2477,8 @@ class PDF::Reader::Page # select the elements from a Pages dictionary that can be inherited by # child Page dictionaries. # - # source://pdf-reader//lib/pdf/reader/page.rb#291 + # source://pdf-reader//lib/pdf/reader/page.rb#308 + sig { params(obj: T::Hash[Symbol, T.untyped]).returns(T::Hash[Symbol, T.untyped]) } def select_inheritable(obj); end end @@ -2305,6 +2493,7 @@ class PDF::Reader::PageLayout # @return [PageLayout] a new instance of PageLayout # # source://pdf-reader//lib/pdf/reader/page_layout.rb#19 + sig { params(runs: T::Array[PDF::Reader::TextRun], mediabox: T.any(T::Array[Numeric], PDF::Reader::Rectangle)).void } def initialize(runs, mediabox); end sig { params(chars: T::Array[PDF::Reader::TextRun]).returns(T::Array[PDF::Reader::TextRun]) } @@ -2334,24 +2523,31 @@ class PDF::Reader::PageLayout # => [ "one", "two" ] # # source://pdf-reader//lib/pdf/reader/page_layout.rb#65 + sig { params(rows: T.untyped).returns(T.untyped) } def interesting_rows(rows); end # source://pdf-reader//lib/pdf/reader/page_layout.rb#108 + sig { params(haystack: T.untyped, needle: T.untyped, index: T.untyped).returns(T.untyped) } def local_string_insert(haystack, needle, index); end # source://pdf-reader//lib/pdf/reader/page_layout.rb#92 + sig { params(collection: T.untyped).returns(T.untyped) } def mean(collection); end # source://pdf-reader//lib/pdf/reader/page_layout.rb#100 + sig { params(collection: T.untyped).returns(T.untyped) } def median(collection); end # source://pdf-reader//lib/pdf/reader/page_layout.rb#55 + sig { returns(Numeric) } def page_height; end # source://pdf-reader//lib/pdf/reader/page_layout.rb#51 + sig { returns(Numeric) } def page_width; end # source://pdf-reader//lib/pdf/reader/page_layout.rb#112 + sig { params(mediabox: T.untyped).returns(T.untyped) } def process_mediabox(mediabox); end # source://pdf-reader//lib/pdf/reader/page_layout.rb#76 @@ -2377,6 +2573,7 @@ class PDF::Reader::PageState # @return [PageState] a new instance of PageState # # source://pdf-reader//lib/pdf/reader/page_state.rb#26 + sig { params(page: T.untyped).void } def initialize(page); end # Text Object Operators @@ -2403,12 +2600,14 @@ class PDF::Reader::PageState # with the new matrix to form the updated matrix. # # source://pdf-reader//lib/pdf/reader/page_state.rb#72 + sig { params(a: T.untyped, b: T.untyped, c: T.untyped, d: T.untyped, e: T.untyped, f: T.untyped).returns(T.untyped) } def concatenate_matrix(a, b, c, d, e, f); end # transform x and y co-ordinates from the current user space to the # underlying device space. # # source://pdf-reader//lib/pdf/reader/page_state.rb#227 + sig { params(x: T.untyped, y: T.untyped).returns(T.untyped) } def ctm_transform(x, y); end # source://pdf-reader//lib/pdf/reader/page_state.rb#252 @@ -2420,12 +2619,15 @@ class PDF::Reader::PageState def end_text_object; end # source://pdf-reader//lib/pdf/reader/page_state.rb#263 + sig { params(label: T.untyped).returns(T.untyped) } def find_color_space(label); end # source://pdf-reader//lib/pdf/reader/page_state.rb#256 + sig { params(label: T.untyped).returns(T.untyped) } def find_font(label); end # source://pdf-reader//lib/pdf/reader/page_state.rb#270 + sig { params(label: T.untyped).returns(T.untyped) } def find_xobject(label); end # source://pdf-reader//lib/pdf/reader/page_state.rb#117 @@ -2437,21 +2639,25 @@ class PDF::Reader::PageState # @raise [MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/page_state.rb#198 + sig { params(label: T.untyped).returns(T.untyped) } def invoke_xobject(label); end # Text Positioning Operators # # source://pdf-reader//lib/pdf/reader/page_state.rb#145 + sig { params(x: T.untyped, y: T.untyped).returns(T.untyped) } def move_text_position(x, y); end # TD # # source://pdf-reader//lib/pdf/reader/page_state.rb#158 + sig { params(x: T.untyped, y: T.untyped).returns(T.untyped) } def move_text_position_and_set_leading(x, y); end # ' # # source://pdf-reader//lib/pdf/reader/page_state.rb#185 + sig { params(str: T.untyped).returns(T.untyped) } def move_to_next_line_and_show_text(str); end # T* @@ -2483,6 +2689,7 @@ class PDF::Reader::PageState # may need to be added # # source://pdf-reader//lib/pdf/reader/page_state.rb#321 + sig { params(w0: T.untyped, tj: T.untyped, word_boundary: T.untyped).returns(T.untyped) } def process_glyph_displacement(w0, tj, word_boundary); end # Restore the state to the previous value on the stack. @@ -2502,39 +2709,49 @@ class PDF::Reader::PageState # Text State Operators # # source://pdf-reader//lib/pdf/reader/page_state.rb#104 + sig { params(char_spacing: T.untyped).returns(T.untyped) } def set_character_spacing(char_spacing); end # source://pdf-reader//lib/pdf/reader/page_state.rb#108 + sig { params(h_scaling: T.untyped).returns(T.untyped) } def set_horizontal_text_scaling(h_scaling); end # " # # source://pdf-reader//lib/pdf/reader/page_state.rb#189 + sig { params(aw: T.untyped, ac: T.untyped, string: T.untyped).returns(T.untyped) } def set_spacing_next_line_show_text(aw, ac, string); end # source://pdf-reader//lib/pdf/reader/page_state.rb#112 + sig { params(label: T.untyped, size: T.untyped).returns(T.untyped) } def set_text_font_and_size(label, size); end # source://pdf-reader//lib/pdf/reader/page_state.rb#125 + sig { params(leading: T.untyped).returns(T.untyped) } def set_text_leading(leading); end # Tm # # source://pdf-reader//lib/pdf/reader/page_state.rb#163 + sig { params(a: T.untyped, b: T.untyped, c: T.untyped, d: T.untyped, e: T.untyped, f: T.untyped).returns(T.untyped) } def set_text_matrix_and_text_line_matrix(a, b, c, d, e, f); end # source://pdf-reader//lib/pdf/reader/page_state.rb#129 + sig { params(mode: T.untyped).returns(T.untyped) } def set_text_rendering_mode(mode); end # source://pdf-reader//lib/pdf/reader/page_state.rb#133 + sig { params(rise: T.untyped).returns(T.untyped) } def set_text_rise(rise); end # source://pdf-reader//lib/pdf/reader/page_state.rb#137 + sig { params(word_spacing: T.untyped).returns(T.untyped) } def set_word_spacing(word_spacing); end # Text Showing Operators # # source://pdf-reader//lib/pdf/reader/page_state.rb#181 + sig { params(params: T.untyped).returns(T.untyped) } def show_text_with_positioning(params); end # when save_graphics_state is called, we need to push a new copy of the @@ -2552,6 +2769,7 @@ class PDF::Reader::PageState # avoid unnecessary object allocations # # source://pdf-reader//lib/pdf/reader/page_state.rb#240 + sig { params(x: T.untyped, y: T.untyped).returns(T.untyped) } def trm_transform(x, y); end private @@ -2559,6 +2777,7 @@ class PDF::Reader::PageState # wrap the raw PDF Font objects in handy ruby Font objects. # # source://pdf-reader//lib/pdf/reader/page_state.rb#391 + sig { params(raw_fonts: T.untyped).returns(T.untyped) } def build_fonts(raw_fonts); end # return the current transformation matrix @@ -2602,41 +2821,43 @@ class PDF::Reader::PageTextReceiver extend ::Forwardable extend Forwardable - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def begin_text_object(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def concatenate_matrix(*args, **_arg1, &block); end # deprecated # - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#73 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#75 sig { returns(T.untyped) } def content; end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def end_text_object(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def font_size(*args, **_arg1, &block); end # XObjects # - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#112 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#114 + sig { params(label: T.untyped).returns(T.untyped) } def invoke_xobject(label); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def move_text_position(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def move_text_position_and_set_leading(*args, **_arg1, &block); end # ' # - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#98 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#100 + sig { params(str: String).void } def move_to_next_line_and_show_text(str); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def move_to_start_of_next_line(*args, **_arg1, &block); end # Returns the value of attribute options. @@ -2647,56 +2868,61 @@ class PDF::Reader::PageTextReceiver # starting a new page # # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#43 + sig { params(page: T.untyped).returns(T.untyped) } def page=(page); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def restore_graphics_state(*args, **_arg1, &block); end # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#50 + sig { params(opts: T::Hash[Symbol, T.untyped]).returns(T::Array[PDF::Reader::TextRun]) } def runs(opts = T.unsafe(nil)); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def save_graphics_state(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def set_character_spacing(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def set_horizontal_text_scaling(*args, **_arg1, &block); end # " # - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#103 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#105 + sig { params(aw: Numeric, ac: Numeric, string: String).void } def set_spacing_next_line_show_text(aw, ac, string); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def set_text_font_and_size(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def set_text_leading(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def set_text_matrix_and_text_line_matrix(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def set_text_rendering_mode(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def set_text_rise(*args, **_arg1, &block); end - # source://forwardable/1.3.2/forwardable.rb#229 + # source://forwardable/1.3.3/forwardable.rb#231 def set_word_spacing(*args, **_arg1, &block); end # Text Showing Operators # # record text that is drawn on the page # - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#82 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#84 + sig { params(string: String).void } def show_text(string); end # TJ [(A) 120 (WA) 20 (Y)] # - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#86 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#88 + sig { params(params: T::Array[T.untyped]).void } def show_text_with_positioning(params); end # Returns the value of attribute state. @@ -2706,19 +2932,21 @@ class PDF::Reader::PageTextReceiver private - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#148 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#150 + sig { params(x: T.untyped, y: T.untyped).returns(T.untyped) } def apply_rotation(x, y); end - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#174 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#176 def group_chars_into_runs(chars); end - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#123 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#125 + sig { params(string: String).void } def internal_show_text(string); end # take a collection of TextRun objects and merge any that are in close # proximity # - # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#166 + # source://pdf-reader//lib/pdf/reader/page_text_receiver.rb#168 def merge_runs(runs); end end @@ -2820,6 +3048,7 @@ class PDF::Reader::Parser # @return [Parser] a new instance of Parser # # source://pdf-reader//lib/pdf/reader/parser.rb#65 + sig { params(buffer: PDF::Reader::Buffer, objects: T.nilable(PDF::Reader::ObjectHash)).void } def initialize(buffer, objects = T.unsafe(nil)); end # Reads an entire PDF object from the buffer and returns it as a Ruby String. @@ -2830,6 +3059,12 @@ class PDF::Reader::Parser # gen - the object revision number to return # # source://pdf-reader//lib/pdf/reader/parser.rb#98 + sig do + params( + id: Integer, + gen: Integer + ).returns(T.any(PDF::Reader::Reference, PDF::Reader::Token, PDF::Reader::Stream, Numeric, String, Symbol, T::Array[T.untyped], T::Hash[T.untyped, T.untyped], NilClass)) + end def object(id, gen); end # Reads the next token from the underlying buffer and convets it to an appropriate @@ -2838,6 +3073,11 @@ class PDF::Reader::Parser # operators - a hash of supported operators to read from the underlying buffer. # # source://pdf-reader//lib/pdf/reader/parser.rb#74 + sig do + params( + operators: T::Hash[T.any(String, PDF::Reader::Token), Symbol] + ).returns(T.any(PDF::Reader::Reference, PDF::Reader::Token, Numeric, String, Symbol, T::Array[T.untyped], T::Hash[T.untyped, T.untyped], NilClass)) + end def parse_token(operators = T.unsafe(nil)); end private @@ -2871,6 +3111,7 @@ class PDF::Reader::Parser # @raise [MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/parser.rb#215 + sig { params(dict: T::Hash[Symbol, T.untyped]).returns(PDF::Reader::Stream) } def stream(dict); end # Reads a PDF String from the buffer and converts it to a Ruby String @@ -2897,9 +3138,11 @@ class PDF::Reader::Point # @return [Point] a new instance of Point # # source://pdf-reader//lib/pdf/reader/point.rb#15 + sig { params(x: Numeric, y: Numeric).void } def initialize(x, y); end # source://pdf-reader//lib/pdf/reader/point.rb#19 + sig { params(other: PDF::Reader::Point).returns(T::Boolean) } def ==(other); end # Returns the value of attribute x. @@ -2939,11 +3182,13 @@ class PDF::Reader::PrintReceiver def callbacks=(_arg0); end # source://pdf-reader//lib/pdf/reader/print_receiver.rb#21 + sig { params(methodname: T.untyped, args: T.untyped).returns(T.untyped) } def method_missing(methodname, *args); end # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/print_receiver.rb#17 + sig { params(meth: T.untyped).returns(T.untyped) } def respond_to?(meth); end end @@ -2955,6 +3200,7 @@ class PDF::Reader::Rc4SecurityHandler # @return [Rc4SecurityHandler] a new instance of Rc4SecurityHandler # # source://pdf-reader//lib/pdf/reader/rc4_security_handler.rb#15 + sig { params(key: String).void } def initialize(key); end # 7.6.2 General Encryption Algorithm @@ -2967,6 +3213,7 @@ class PDF::Reader::Rc4SecurityHandler # ref - a PDF::Reader::Reference for the object to decrypt # # source://pdf-reader//lib/pdf/reader/rc4_security_handler.rb#28 + sig { params(buf: T.untyped, ref: T.untyped).returns(T.untyped) } def decrypt(buf, ref); end end @@ -2988,12 +3235,15 @@ class PDF::Reader::Rectangle # @return [Rectangle] a new instance of Rectangle # # source://pdf-reader//lib/pdf/reader/rectangle.rb#25 + sig { params(x1: Numeric, y1: Numeric, x2: Numeric, y2: Numeric).void } def initialize(x1, y1, x2, y2); end # source://pdf-reader//lib/pdf/reader/rectangle.rb#42 + sig { params(other: PDF::Reader::Rectangle).void } def ==(other); end # source://pdf-reader//lib/pdf/reader/rectangle.rb#69 + sig { params(degrees: Integer).void } def apply_rotation(degrees); end # Returns the value of attribute bottom_left. @@ -3011,6 +3261,7 @@ class PDF::Reader::Rectangle # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/rectangle.rb#54 + sig { params(point: PDF::Reader::Point).void } def contains?(point); end # source://pdf-reader//lib/pdf/reader/rectangle.rb#46 @@ -3042,10 +3293,12 @@ class PDF::Reader::Rectangle private # source://pdf-reader//lib/pdf/reader/rectangle.rb#93 + sig { params(x1: Numeric, y1: Numeric, x2: Numeric, y2: Numeric).void } def set_corners(x1, y1, x2, y2); end class << self # source://pdf-reader//lib/pdf/reader/rectangle.rb#29 + sig { params(arr: T::Array[Numeric]).returns(PDF::Reader::Rectangle) } def from_array(arr); end end end @@ -3058,32 +3311,34 @@ class PDF::Reader::Reference # # @return [Reference] a new instance of Reference # - # source://pdf-reader//lib/pdf/reader/reference.rb#37 + # source://pdf-reader//lib/pdf/reader/reference.rb#38 + sig { params(id: Integer, gen: Integer).void } def initialize(id, gen); end # returns true if the provided object points to the same PDF Object as the # current object # - # source://pdf-reader//lib/pdf/reader/reference.rb#53 + # source://pdf-reader//lib/pdf/reader/reference.rb#54 + sig { params(obj: Object).returns(T::Boolean) } def ==(obj); end # returns true if the provided object points to the same PDF Object as the # current object # - # source://pdf-reader//lib/pdf/reader/reference.rb#53 + # source://pdf-reader//lib/pdf/reader/reference.rb#54 def eql?(obj); end # Returns the value of attribute gen. # - # source://pdf-reader//lib/pdf/reader/reference.rb#34 + # source://pdf-reader//lib/pdf/reader/reference.rb#35 def gen; end # returns a hash based on the PDF::Reference this object points to. Two # different Reference objects that point to the same PDF Object will # return an identical hash # - # source://pdf-reader//lib/pdf/reader/reference.rb#63 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/reference.rb#64 + sig { returns(Integer) } def hash; end # Returns the value of attribute id. @@ -3093,14 +3348,14 @@ class PDF::Reader::Reference # returns the current Reference object in an array with a single element # - # source://pdf-reader//lib/pdf/reader/reference.rb#42 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/reference.rb#43 + sig { returns(T::Array[PDF::Reader::Reference]) } def to_a; end # returns the ID of this reference. Use with caution, ignores the generation id # - # source://pdf-reader//lib/pdf/reader/reference.rb#47 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/reference.rb#48 + sig { returns(Integer) } def to_i; end end @@ -3129,9 +3384,11 @@ class PDF::Reader::RegisterReceiver # return the details for every time the specified callback was fired # # source://pdf-reader//lib/pdf/reader/register_receiver.rb#45 + sig { params(methodname: T.untyped).returns(T.untyped) } def all(methodname); end # source://pdf-reader//lib/pdf/reader/register_receiver.rb#49 + sig { params(methodname: T.untyped).returns(T.untyped) } def all_args(methodname); end # Returns the value of attribute callbacks. @@ -3149,24 +3406,29 @@ class PDF::Reader::RegisterReceiver # count the number of times a callback fired # # source://pdf-reader//lib/pdf/reader/register_receiver.rb#40 + sig { params(methodname: T.untyped).returns(T.untyped) } def count(methodname); end # return the details for the final time the specified callback was fired # # source://pdf-reader//lib/pdf/reader/register_receiver.rb#59 + sig { params(methodname: T.untyped).returns(T.untyped) } def final_occurance_of(methodname); end # return the details for the first time the specified callback was fired # # source://pdf-reader//lib/pdf/reader/register_receiver.rb#54 + sig { params(methodname: T.untyped).returns(T.untyped) } def first_occurance_of(methodname); end # source://pdf-reader//lib/pdf/reader/register_receiver.rb#35 + sig { params(methodname: T.untyped, args: T.untyped).returns(T.untyped) } def method_missing(methodname, *args); end # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/register_receiver.rb#31 + sig { params(meth: T.untyped).returns(T.untyped) } def respond_to?(meth); end # return the first occurance of a particular series of callbacks @@ -3183,6 +3445,7 @@ class PDF::Reader::Resources # @return [Resources] a new instance of Resources # # source://pdf-reader//lib/pdf/reader/resources.rb#12 + sig { params(objects: PDF::Reader::ObjectHash, resources: T::Hash[T.untyped, T.untyped]).void } def initialize(objects, resources); end # Returns a Hash of color spaces that are available to this page @@ -3274,12 +3537,15 @@ end class PDF::Reader::SecurityHandlerFactory class << self # source://pdf-reader//lib/pdf/reader/security_handler_factory.rb#10 + sig { params(encrypt: T.untyped, doc_id: T.untyped, password: T.untyped).returns(T.untyped) } def build(encrypt, doc_id, password); end # source://pdf-reader//lib/pdf/reader/security_handler_factory.rb#25 + sig { params(encrypt: T.untyped, doc_id: T.untyped, password: T.untyped).returns(T.untyped) } def build_standard_handler(encrypt, doc_id, password); end # source://pdf-reader//lib/pdf/reader/security_handler_factory.rb#44 + sig { params(encrypt: T.untyped, doc_id: T.untyped, password: T.untyped).returns(T.untyped) } def build_v5_handler(encrypt, doc_id, password); end # This handler supports all encryption that follows upto PDF 1.5 spec (revision 4) @@ -3287,6 +3553,7 @@ class PDF::Reader::SecurityHandlerFactory # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/security_handler_factory.rb#55 + sig { params(encrypt: T.untyped).returns(T.untyped) } def standard?(encrypt); end # This handler supports both @@ -3296,6 +3563,7 @@ class PDF::Reader::SecurityHandlerFactory # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/security_handler_factory.rb#68 + sig { params(encrypt: T.untyped).returns(T.untyped) } def standard_v5?(encrypt); end end end @@ -3313,6 +3581,7 @@ class PDF::Reader::StandardKeyBuilder # @return [StandardKeyBuilder] a new instance of StandardKeyBuilder # # source://pdf-reader//lib/pdf/reader/standard_key_builder.rb#28 + sig { params(opts: T::Hash[Symbol, T.untyped]).void } def initialize(opts = T.unsafe(nil)); end # Takes a string containing a user provided password. @@ -3324,6 +3593,7 @@ class PDF::Reader::StandardKeyBuilder # @raise [PDF::Reader::EncryptedPDFError] # # source://pdf-reader//lib/pdf/reader/standard_key_builder.rb#50 + sig { params(pass: String).returns(String) } def key(pass); end private @@ -3341,6 +3611,7 @@ class PDF::Reader::StandardKeyBuilder # then it returns nil # # source://pdf-reader//lib/pdf/reader/standard_key_builder.rb#87 + sig { params(pass: T.untyped).returns(T.untyped) } def auth_owner_pass(pass); end # Algorithm 6 - Authenticating the User Password @@ -3354,18 +3625,22 @@ class PDF::Reader::StandardKeyBuilder # then it returns nil # # source://pdf-reader//lib/pdf/reader/standard_key_builder.rb#113 + sig { params(pass: T.untyped).returns(T.untyped) } def auth_user_pass(pass); end # source://pdf-reader//lib/pdf/reader/standard_key_builder.rb#127 + sig { params(user_pass: T.untyped).returns(T.untyped) } def make_file_key(user_pass); end # Pads supplied password to 32bytes using PassPadBytes as specified on # pp61 of spec # # source://pdf-reader//lib/pdf/reader/standard_key_builder.rb#63 + sig { params(p: T.untyped).returns(T.untyped) } def pad_pass(p = T.unsafe(nil)); end # source://pdf-reader//lib/pdf/reader/standard_key_builder.rb#71 + sig { params(buf: T.untyped, int: T.untyped).returns(T.untyped) } def xor_each_byte(buf, int); end end @@ -3389,6 +3664,7 @@ class PDF::Reader::Stream # @return [Stream] a new instance of Stream # # source://pdf-reader//lib/pdf/reader/stream.rb#42 + sig { params(hash: T::Hash[Symbol, T.untyped], data: String).void } def initialize(hash, data); end # Returns the value of attribute data. @@ -3437,9 +3713,11 @@ class PDF::Reader::SynchronizedCache def initialize; end # source://pdf-reader//lib/pdf/reader/synchronized_cache.rb#27 + sig { params(key: Object).returns(T.untyped) } def [](key); end # source://pdf-reader//lib/pdf/reader/synchronized_cache.rb#30 + sig { params(key: Object, value: T.nilable(Object)).returns(T.untyped) } def []=(key, value); end end @@ -3452,54 +3730,60 @@ class PDF::Reader::TextRun # @return [TextRun] a new instance of TextRun # - # source://pdf-reader//lib/pdf/reader/text_run.rb#14 + # source://pdf-reader//lib/pdf/reader/text_run.rb#17 + sig { params(x: Numeric, y: Numeric, width: Numeric, font_size: Numeric, text: String).void } def initialize(x, y, width, font_size, text); end # @raise [ArgumentError] # - # source://pdf-reader//lib/pdf/reader/text_run.rb#61 + # source://pdf-reader//lib/pdf/reader/text_run.rb#64 + sig { params(other: PDF::Reader::TextRun).returns(PDF::Reader::TextRun) } def +(other); end # Allows collections of TextRun objects to be sorted. They will be sorted # in order of their position on a cartesian plain - Top Left to Bottom Right # - # source://pdf-reader//lib/pdf/reader/text_run.rb#23 + # source://pdf-reader//lib/pdf/reader/text_run.rb#26 + sig { params(other: T.untyped).returns(T.untyped) } def <=>(other); end - # source://pdf-reader//lib/pdf/reader/text_run.rb#45 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/text_run.rb#48 + sig { returns(Numeric) } def endx; end - # source://pdf-reader//lib/pdf/reader/text_run.rb#49 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/text_run.rb#52 + sig { returns(Numeric) } def endy; end # Returns the value of attribute font_size. # - # source://pdf-reader//lib/pdf/reader/text_run.rb#10 + # source://pdf-reader//lib/pdf/reader/text_run.rb#12 def font_size; end - # source://pdf-reader//lib/pdf/reader/text_run.rb#71 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/text_run.rb#74 + sig { returns(String) } def inspect; end # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/text_run.rb#75 + # source://pdf-reader//lib/pdf/reader/text_run.rb#78 + sig { params(other_run: T.untyped).returns(T::Boolean) } def intersect?(other_run); end # return what percentage of this text run is overlapped by another run # - # source://pdf-reader//lib/pdf/reader/text_run.rb#81 + # source://pdf-reader//lib/pdf/reader/text_run.rb#84 + sig { params(other_run: T.untyped).returns(Numeric) } def intersection_area_percent(other_run); end - # source://pdf-reader//lib/pdf/reader/text_run.rb#53 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/text_run.rb#56 + sig { returns(Numeric) } def mean_character_width; end # @return [Boolean] # - # source://pdf-reader//lib/pdf/reader/text_run.rb#57 + # source://pdf-reader//lib/pdf/reader/text_run.rb#60 + sig { params(other: PDF::Reader::TextRun).returns(T::Boolean) } def mergable?(other); end # Returns the value of attribute origin. @@ -3509,40 +3793,42 @@ class PDF::Reader::TextRun # Returns the value of attribute text. # - # source://pdf-reader//lib/pdf/reader/text_run.rb#10 + # source://pdf-reader//lib/pdf/reader/text_run.rb#13 def text; end # Returns the value of attribute text. # - # source://pdf-reader//lib/pdf/reader/text_run.rb#10 + # source://pdf-reader//lib/pdf/reader/text_run.rb#13 def to_s; end # Returns the value of attribute width. # - # source://pdf-reader//lib/pdf/reader/text_run.rb#10 + # source://pdf-reader//lib/pdf/reader/text_run.rb#11 def width; end - # source://pdf-reader//lib/pdf/reader/text_run.rb#37 + # source://pdf-reader//lib/pdf/reader/text_run.rb#40 + sig { returns(Numeric) } def x; end - # source://pdf-reader//lib/pdf/reader/text_run.rb#41 + # source://pdf-reader//lib/pdf/reader/text_run.rb#44 + sig { returns(Numeric) } def y; end private - # source://pdf-reader//lib/pdf/reader/text_run.rb#93 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/text_run.rb#96 + sig { returns(Numeric) } def area; end # Assume string encoding is marked correctly and we can trust String#size to return a # character count # - # source://pdf-reader//lib/pdf/reader/text_run.rb#103 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/text_run.rb#106 + sig { returns(Numeric) } def character_count; end - # source://pdf-reader//lib/pdf/reader/text_run.rb#97 - sig { returns(T.untyped) } + # source://pdf-reader//lib/pdf/reader/text_run.rb#100 + sig { returns(T::Range[Numeric]) } def mergable_range; end end @@ -3557,6 +3843,7 @@ class PDF::Reader::Token < ::String # @return [Token] a new instance of Token # # source://pdf-reader//lib/pdf/reader/token.rb#38 + sig { params(val: T.untyped).void } def initialize(val); end end @@ -3576,6 +3863,7 @@ class PDF::Reader::TransformationMatrix # @return [TransformationMatrix] a new instance of TransformationMatrix # # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#19 + sig { params(a: Numeric, b: Numeric, c: Numeric, d: Numeric, e: Numeric, f: Numeric).void } def initialize(a, b, c, d, e, f); end # Returns the value of attribute a. @@ -3618,10 +3906,11 @@ class PDF::Reader::TransformationMatrix # [ 5 6 1 ] [ e2 0 1 ] # # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#93 + sig { params(e2: Numeric).void } def horizontal_displacement_multiply!(e2); end # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#23 - sig { returns(T.untyped) } + sig { returns(String) } def inspect; end # multiply this matrix with another. @@ -3646,10 +3935,20 @@ class PDF::Reader::TransformationMatrix # writing systems # # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#54 - def multiply!(a, b = T.unsafe(nil), c = T.unsafe(nil), d = T.unsafe(nil), e = T.unsafe(nil), f = T.unsafe(nil)); end + sig do + params( + a: Numeric, + b: Numeric, + c: Numeric, + d: Numeric, + e: Numeric, + f: Numeric + ).returns(PDF::Reader::TransformationMatrix) + end + def multiply!(a, b, c, d, e, f); end # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#27 - sig { returns(T.untyped) } + sig { returns(T::Array[Numeric]) } def to_a; end private @@ -3665,6 +3964,7 @@ class PDF::Reader::TransformationMatrix # [ e f 1 ] [ e f 1 ] # # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#186 + sig { params(a2: Numeric, b2: Numeric, c2: Numeric, d2: Numeric, e2: Numeric, f2: Numeric).void } def faster_multiply!(a2, b2, c2, d2, e2, f2); end # Optimised method for when the first matrix in the calculation is @@ -3677,6 +3977,7 @@ class PDF::Reader::TransformationMatrix # [ 5 0 1 ] [ 5 6 1 ] # # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#108 + sig { params(a2: Numeric, b2: Numeric, c2: Numeric, d2: Numeric, e2: Numeric, f2: Numeric).void } def horizontal_displacement_multiply_reversed!(a2, b2, c2, d2, e2, f2); end # A general solution to multiplying two 3x3 matrixes. This is correct in all cases, @@ -3690,6 +3991,7 @@ class PDF::Reader::TransformationMatrix # [ e f 1 ] [ e f 1 ] # # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#166 + sig { params(a2: Numeric, b2: Numeric, c2: Numeric, d2: Numeric, e2: Numeric, f2: Numeric).void } def regular_multiply!(a2, b2, c2, d2, e2, f2); end # Optimised method for when the second matrix in the calculation is @@ -3702,6 +4004,7 @@ class PDF::Reader::TransformationMatrix # [ 5 6 1 ] [ 0 0 1 ] # # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#127 + sig { params(a2: Numeric, b2: Numeric, c2: Numeric, d2: Numeric, e2: Numeric, f2: Numeric).void } def xy_scaling_multiply!(a2, b2, c2, d2, e2, f2); end # Optimised method for when the first matrix in the calculation is @@ -3714,6 +4017,7 @@ class PDF::Reader::TransformationMatrix # [ 0 0 1 ] [ 5 6 1 ] # # source://pdf-reader//lib/pdf/reader/transformation_matrix.rb#146 + sig { params(a2: Numeric, b2: Numeric, c2: Numeric, d2: Numeric, e2: Numeric, f2: Numeric).void } def xy_scaling_multiply_reversed!(a2, b2, c2, d2, e2, f2); end end @@ -3723,24 +4027,31 @@ end class PDF::Reader::TypeCheck class << self # source://pdf-reader//lib/pdf/reader/type_check.rb#12 + sig { params(obj: T.untyped).returns(Integer) } def cast_to_int!(obj); end # source://pdf-reader//lib/pdf/reader/type_check.rb#24 + sig { params(obj: T.untyped).returns(Numeric) } def cast_to_numeric!(obj); end # source://pdf-reader//lib/pdf/reader/type_check.rb#71 + sig { params(obj: T.untyped).returns(T::Hash[Symbol, T.untyped]) } def cast_to_pdf_dict!(obj); end # source://pdf-reader//lib/pdf/reader/type_check.rb#81 + sig { params(obj: T.untyped).returns(T::Hash[Symbol, PDF::Reader::Stream]) } def cast_to_pdf_dict_with_stream_values!(obj); end # source://pdf-reader//lib/pdf/reader/type_check.rb#38 + sig { params(string: T.untyped).returns(String) } def cast_to_string!(string); end # source://pdf-reader//lib/pdf/reader/type_check.rb#50 + sig { params(obj: T.untyped).returns(T.nilable(Symbol)) } def cast_to_symbol(obj); end # source://pdf-reader//lib/pdf/reader/type_check.rb#62 + sig { params(obj: T.untyped).returns(Symbol) } def cast_to_symbol!(obj); end end end @@ -3753,12 +4064,14 @@ class PDF::Reader::UnimplementedSecurityHandler # @raise [PDF::Reader::EncryptedPDFError] # # source://pdf-reader//lib/pdf/reader/unimplemented_security_handler.rb#14 + sig { params(buf: T.untyped, ref: T.untyped).returns(T.untyped) } def decrypt(buf, ref); end class << self # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/unimplemented_security_handler.rb#10 + sig { params(encrypt: T.untyped).returns(T.untyped) } def supports?(encrypt); end end end @@ -3784,6 +4097,7 @@ class PDF::Reader::ValidatingReceiver # @return [ValidatingReceiver] a new instance of ValidatingReceiver # # source://pdf-reader//lib/pdf/reader/validating_receiver.rb#19 + sig { params(wrapped: T.untyped).void } def initialize(wrapped); end # Inline Image Operators @@ -3823,6 +4137,7 @@ class PDF::Reader::ValidatingReceiver def invoke_xobject(*args); end # source://pdf-reader//lib/pdf/reader/validating_receiver.rb#251 + sig { params(methodname: Symbol, args: T.untyped).void } def method_missing(methodname, *args); end # Text Positioning Operators @@ -3850,6 +4165,7 @@ class PDF::Reader::ValidatingReceiver def move_to_start_of_next_line(*args); end # source://pdf-reader//lib/pdf/reader/validating_receiver.rb#23 + sig { params(page: PDF::Reader::Page).void } def page=(page); end # Final safety net for any operators that don't have type checking enabled yet @@ -3857,6 +4173,7 @@ class PDF::Reader::ValidatingReceiver # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/validating_receiver.rb#247 + sig { params(meth: T.untyped).returns(T::Boolean) } def respond_to?(meth); end # source://pdf-reader//lib/pdf/reader/validating_receiver.rb#34 @@ -3926,6 +4243,7 @@ class PDF::Reader::ValidatingReceiver private # source://pdf-reader//lib/pdf/reader/validating_receiver.rb#257 + sig { params(methodname: T.untyped, args: T.untyped).void } def call_wrapped(methodname, *args); end end @@ -3938,12 +4256,16 @@ module PDF::Reader::WidthCalculator; end # # source://pdf-reader//lib/pdf/reader/width_calculator/built_in.rb#14 class PDF::Reader::WidthCalculator::BuiltIn + let T.unsafe(nil), T.nilable(PDF::Reader::SynchronizedCache) + # @return [BuiltIn] a new instance of BuiltIn # # source://pdf-reader//lib/pdf/reader/width_calculator/built_in.rb#24 + sig { params(font: PDF::Reader::Font).void } def initialize(font); end # source://pdf-reader//lib/pdf/reader/width_calculator/built_in.rb#38 + sig { params(code_point: T.nilable(Integer)).returns(Numeric) } def glyph_width(code_point); end private @@ -3951,9 +4273,11 @@ class PDF::Reader::WidthCalculator::BuiltIn # @return [Boolean] # # source://pdf-reader//lib/pdf/reader/width_calculator/built_in.rb#55 + sig { params(code_point: Integer).returns(T::Boolean) } def control_character?(code_point); end # source://pdf-reader//lib/pdf/reader/width_calculator/built_in.rb#60 + sig { params(font_name: T.nilable(Symbol)).returns(String) } def extract_basefont(font_name); end end @@ -3972,9 +4296,11 @@ class PDF::Reader::WidthCalculator::Composite # @return [Composite] a new instance of Composite # # source://pdf-reader//lib/pdf/reader/width_calculator/composite.rb#15 + sig { params(font: PDF::Reader::Font).void } def initialize(font); end # source://pdf-reader//lib/pdf/reader/width_calculator/composite.rb#20 + sig { params(code_point: T.nilable(Integer)).returns(Numeric) } def glyph_width(code_point); end end @@ -3985,19 +4311,23 @@ class PDF::Reader::WidthCalculator::TrueType # @return [TrueType] a new instance of TrueType # # source://pdf-reader//lib/pdf/reader/width_calculator/true_type.rb#10 + sig { params(font: PDF::Reader::Font).void } def initialize(font); end # source://pdf-reader//lib/pdf/reader/width_calculator/true_type.rb#20 + sig { params(code_point: T.nilable(Integer)).returns(Numeric) } def glyph_width(code_point); end private # source://pdf-reader//lib/pdf/reader/width_calculator/true_type.rb#41 + sig { params(code_point: Integer).returns(T.nilable(Numeric)) } def glyph_width_from_descriptor(code_point); end # TODO convert Type3 units 1000 units => 1 text space unit # # source://pdf-reader//lib/pdf/reader/width_calculator/true_type.rb#28 + sig { params(code_point: Integer).returns(T.nilable(Numeric)) } def glyph_width_from_font(code_point); end end @@ -4008,9 +4338,11 @@ class PDF::Reader::WidthCalculator::TypeOneOrThree # @return [TypeOneOrThree] a new instance of TypeOneOrThree # # source://pdf-reader//lib/pdf/reader/width_calculator/type_one_or_three.rb#10 + sig { params(font: PDF::Reader::Font).void } def initialize(font); end # source://pdf-reader//lib/pdf/reader/width_calculator/type_one_or_three.rb#20 + sig { params(code_point: T.nilable(Integer)).returns(Numeric) } def glyph_width(code_point); end end @@ -4025,9 +4357,11 @@ class PDF::Reader::WidthCalculator::TypeZero # @return [TypeZero] a new instance of TypeZero # # source://pdf-reader//lib/pdf/reader/width_calculator/type_zero.rb#14 + sig { params(font: PDF::Reader::Font).void } def initialize(font); end # source://pdf-reader//lib/pdf/reader/width_calculator/type_zero.rb#18 + sig { params(code_point: T.nilable(Integer)).returns(Numeric) } def glyph_width(code_point); end end @@ -4053,6 +4387,9 @@ class PDF::Reader::XRef include ::Enumerable include Enumerable + # Provides `type_member` helper + extend T::Generic + # create a new Xref table based on the contents of the supplied io object # # io - must be an IO object, generally either a file or a StringIO @@ -4060,6 +4397,7 @@ class PDF::Reader::XRef # @return [XRef] a new instance of XRef # # source://pdf-reader//lib/pdf/reader/xref.rb#58 + sig { params(io: T.any(IO, Tempfile, StringIO)).void } def initialize(io); end # returns the byte offset for the specified PDF object. @@ -4067,6 +4405,7 @@ class PDF::Reader::XRef # ref - a PDF::Reader::Reference object containing an object ID and revision number # # source://pdf-reader//lib/pdf/reader/xref.rb#75 + sig { params(ref: T.untyped).returns(T.untyped) } def [](ref); end # iterate over each object in the xref table @@ -4099,6 +4438,7 @@ class PDF::Reader::XRef # header appear somewhere within the first 1024 bytes of the file # # source://pdf-reader//lib/pdf/reader/xref.rb#261 + sig { params(io: T.untyped).returns(T.untyped) } def calc_junk_offset(io); end # Read a xref table from the underlying buffer. @@ -4112,17 +4452,20 @@ class PDF::Reader::XRef # @raise [PDF::Reader::MalformedPDFError] # # source://pdf-reader//lib/pdf/reader/xref.rb#100 + sig { params(offset: T.untyped).returns(T.untyped) } def load_offsets(offset = T.unsafe(nil)); end # Read an XRef stream from the underlying buffer instead of a traditional xref table. # # source://pdf-reader//lib/pdf/reader/xref.rb#172 + sig { params(stream: T.untyped).returns(T.untyped) } def load_xref_stream(stream); end # Assumes the underlying buffer is positioned at the start of a traditional # Xref table and processes it into memory. # # source://pdf-reader//lib/pdf/reader/xref.rb#129 + sig { params(buf: T.untyped).returns(T.untyped) } def load_xref_table(buf); end # Wrap the io stream we're working with in a buffer that can tokenise it for us. @@ -4131,17 +4474,20 @@ class PDF::Reader::XRef # at the same time without worrying about clearing the buffers contents. # # source://pdf-reader//lib/pdf/reader/xref.rb#242 + sig { params(offset: T.untyped).returns(T.untyped) } def new_buffer(offset = T.unsafe(nil)); end # Stores an offset value for a particular PDF object ID and revision number # # source://pdf-reader//lib/pdf/reader/xref.rb#248 + sig { params(id: T.untyped, gen: T.untyped, offset: T.untyped).returns(T.untyped) } def store(id, gen, offset); end # XRef streams pack info into integers 1-N bytes wide. Depending on the number of # bytes they need to be converted to an int in different ways. # # source://pdf-reader//lib/pdf/reader/xref.rb#219 + sig { params(bytes: T.untyped).returns(T.untyped) } def unpack_bytes(bytes); end end @@ -4151,6 +4497,7 @@ end class PDF::Reader::ZeroWidthRunsFilter class << self # source://pdf-reader//lib/pdf/reader/zero_width_runs_filter.rb#9 + sig { params(runs: T::Array[PDF::Reader::TextRun]).returns(T::Array[PDF::Reader::TextRun]) } def exclude_zero_width_runs(runs); end end end diff --git a/sorbet/rbi/gems/prettier_print@1.2.1.rbi b/sorbet/rbi/gems/prettier_print@1.2.1.rbi new file mode 100644 index 0000000..4e88525 --- /dev/null +++ b/sorbet/rbi/gems/prettier_print@1.2.1.rbi @@ -0,0 +1,951 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prettier_print` gem. +# Please instead update this file by running `bin/tapioca gem prettier_print`. + +# This class implements a pretty printing algorithm. It finds line breaks and +# nice indentations for grouped structure. +# +# By default, the class assumes that primitive elements are strings and each +# byte in the strings is a single column in width. But it can be used for other +# situations by giving suitable arguments for some methods: +# +# * newline object and space generation block for PrettierPrint.new +# * optional width argument for PrettierPrint#text +# * PrettierPrint#breakable +# +# There are several candidate uses: +# * text formatting using proportional fonts +# * multibyte characters which has columns different to number of bytes +# * non-string formatting +# +# == Usage +# +# To use this module, you will need to generate a tree of print nodes that +# represent indentation and newline behavior before it gets sent to the printer. +# Each node has different semantics, depending on the desired output. +# +# The most basic node is a Text node. This represents plain text content that +# cannot be broken up even if it doesn't fit on one line. You would create one +# of those with the text method, as in: +# +# PrettierPrint.format { |q| q.text('my content') } +# +# No matter what the desired output width is, the output for the snippet above +# will always be the same. +# +# If you want to allow the printer to break up the content on the space +# character when there isn't enough width for the full string on the same line, +# you can use the Breakable and Group nodes. For example: +# +# PrettierPrint.format do |q| +# q.group do +# q.text("my") +# q.breakable +# q.text("content") +# end +# end +# +# Now, if everything fits on one line (depending on the maximum width specified) +# then it will be the same output as the first example. If, however, there is +# not enough room on the line, then you will get two lines of output, one for +# the first string and one for the second. +# +# There are other nodes for the print tree as well, described in the +# documentation below. They control alignment, indentation, conditional +# formatting, and more. +# +# == References +# Christian Lindig, Strictly Pretty, March 2000 +# https://lindig.github.io/papers/strictly-pretty-2000.pdf +# +# Philip Wadler, A prettier printer, March 1998 +# https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf +# +# source://prettier_print//lib/prettier_print.rb#62 +class PrettierPrint + # Creates a buffer for pretty printing. + # + # +output+ is an output target. If it is not specified, '' is assumed. It + # should have a << method which accepts the first argument +obj+ of + # PrettierPrint#text, the first argument +separator+ of PrettierPrint#breakable, + # the first argument +newline+ of PrettierPrint.new, and the result of a given + # block for PrettierPrint.new. + # + # +maxwidth+ specifies maximum line length. If it is not specified, 80 is + # assumed. However actual outputs may overflow +maxwidth+ if long + # non-breakable texts are provided. + # + # +newline+ is used for line breaks. "\n" is used if it is not specified. + # + # The block is used to generate spaces. ->(n) { ' ' * n } is used if it is not + # given. + # + # @return [PrettierPrint] a new instance of PrettierPrint + # + # source://prettier_print//lib/prettier_print.rb#441 + def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end + + # This inserts a BreakParent node into the print tree which forces the + # surrounding and all parent group nodes to break. + # + # source://prettier_print//lib/prettier_print.rb#814 + def break_parent; end + + # This says "you can break a line here if necessary", and a +width+\-column + # text +separator+ is inserted if a line is not broken at the point. + # + # If +separator+ is not specified, ' ' is used. + # + # If +width+ is not specified, +separator.length+ is used. You will have to + # specify this when +separator+ is a multibyte character, for example. + # + # By default, if the surrounding group is broken and a newline is inserted, + # the printer will indent the subsequent line up to the current level of + # indentation. You can disable this behavior with the +indent+ argument if + # that's not desired (rare). + # + # By default, when you insert a Breakable into the print tree, it only breaks + # the surrounding group when the group's contents cannot fit onto the + # remaining space of the current line. You can force it to break the + # surrounding group instead if you always want the newline with the +force+ + # argument. + # + # There are a few circumstances where you'll want to force the newline into + # the output but no insert a break parent (because you don't want to + # necessarily force the groups to break unless they need to). In this case you + # can pass `force: :skip_break_parent` to this method and it will not insert + # a break parent.` + # + # source://prettier_print//lib/prettier_print.rb#802 + def breakable(separator = T.unsafe(nil), width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end + + # Another very common breakable call you receive while formatting is an + # empty string in flat mode and a newline in break mode. Similar to + # breakable_space, this is here for avoid unnecessary calculation. + # + # source://prettier_print//lib/prettier_print.rb#646 + def breakable_empty; end + + # The final of the very common breakable calls you receive while formatting + # is the normal breakable space but with the addition of the break_parent. + # + # source://prettier_print//lib/prettier_print.rb#652 + def breakable_force; end + + # This is the same shortcut as breakable_force, except that it doesn't indent + # the next line. This is necessary if you're trying to preserve some custom + # formatting like a multi-line string. + # + # source://prettier_print//lib/prettier_print.rb#660 + def breakable_return; end + + # The vast majority of breakable calls you receive while formatting are a + # space in flat mode and a newline in break mode. Since this is so common, + # we have a method here to skip past unnecessary calculation. + # + # source://prettier_print//lib/prettier_print.rb#639 + def breakable_space; end + + # This is an output buffer that wraps the output object and provides + # additional functionality depending on its type. + # + # This defaults to Buffer::StringBuffer.new("".dup) + # + # source://prettier_print//lib/prettier_print.rb#400 + def buffer; end + + # A convenience method which is same as follows: + # + # text(",") + # breakable + # + # source://prettier_print//lib/prettier_print.rb#669 + def comma_breakable; end + + # Returns the group most recently added to the stack. + # + # Contrived example: + # out = "" + # => "" + # q = PrettierPrint.new(out) + # => # + # q.group { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # } + # } + # } + # } + # => 284 + # puts out + # # + # # + # # + # # + # + # source://prettier_print//lib/prettier_print.rb#484 + def current_group; end + + # This is similar to #breakable except the decision to break or not is + # determined individually. + # + # Two #fill_breakable under a group may cause 4 results: + # (break,break), (break,non-break), (non-break,break), (non-break,non-break). + # This is different to #breakable because two #breakable under a group + # may cause 2 results: (break,break), (non-break,non-break). + # + # The text +separator+ is inserted if a line is not broken at this point. + # + # If +separator+ is not specified, ' ' is used. + # + # If +width+ is not specified, +separator.length+ is used. You will have to + # specify this when +separator+ is a multibyte character, for example. + # + # source://prettier_print//lib/prettier_print.rb#688 + def fill_breakable(separator = T.unsafe(nil), width = T.unsafe(nil)); end + + # Flushes all of the generated print tree onto the output buffer, then clears + # the generated tree from memory. + # + # source://prettier_print//lib/prettier_print.rb#490 + def flush(base_indentation = T.unsafe(nil)); end + + # An object that responds to call that takes one argument, of an Integer, and + # returns the corresponding number of spaces. + # + # By default this is: ->(n) { ' ' * n } + # + # source://prettier_print//lib/prettier_print.rb#416 + def genspace; end + + # Groups line break hints added in the block. The line break hints are all to + # be used or not. + # + # If +indent+ is specified, the method call is regarded as nested by + # nest(indent) { ... }. + # + # If +open_object+ is specified, text(open_object, open_width) is + # called before grouping. If +close_object+ is specified, + # text(close_object, close_width) is called after grouping. + # + # source://prettier_print//lib/prettier_print.rb#845 + def group(indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end + + # The stack of groups that are being printed. + # + # source://prettier_print//lib/prettier_print.rb#419 + def groups; end + + # Inserts an IfBreak node with the contents of the block being added to its + # list of nodes that should be printed if the surrounding node breaks. If it + # doesn't, then you can specify the contents to be printed with the #if_flat + # method used on the return object from this method. For example, + # + # q.if_break { q.text('do') }.if_flat { q.text('{') } + # + # In the example above, if the surrounding group is broken it will print 'do' + # and if it is not it will print '{'. + # + # source://prettier_print//lib/prettier_print.rb#917 + def if_break; end + + # This is similar to if_break in that it also inserts an IfBreak node into the + # print tree, however it's starting from the flat contents, and cannot be used + # to build the break contents. + # + # source://prettier_print//lib/prettier_print.rb#936 + def if_flat; end + + # Very similar to the #nest method, this indents the nested content by one + # level by inserting an Indent node into the print tree. The contents of the + # node are determined by the block. + # + # source://prettier_print//lib/prettier_print.rb#956 + def indent; end + + # This method calculates the position of the text relative to the current + # indentation level when the doc has been printed. It's useful for + # determining how to align text to doc nodes that are already built into the + # tree. + # + # source://prettier_print//lib/prettier_print.rb#696 + def last_position(node); end + + # Inserts a LineSuffix node into the print tree. The contents of the node are + # determined by the block. + # + # source://prettier_print//lib/prettier_print.rb#967 + def line_suffix(priority: T.unsafe(nil)); end + + # The maximum width of a line, before it is separated in to a newline + # + # This defaults to 80, and should be an Integer + # + # source://prettier_print//lib/prettier_print.rb#405 + def maxwidth; end + + # Increases left margin after newline with +indent+ for line breaks added in + # the block. + # + # source://prettier_print//lib/prettier_print.rb#977 + def nest(indent); end + + # The value that is appended to +output+ to add a new line. + # + # This defaults to "\n", and should be String + # + # source://prettier_print//lib/prettier_print.rb#410 + def newline; end + + # The output object. It represents the final destination of the contents of + # the print tree. It should respond to <<. + # + # This defaults to "".dup + # + # source://prettier_print//lib/prettier_print.rb#394 + def output; end + + # This method will remove any breakables from the list of contents so that + # no newlines are present in the output. If a newline is being forced into + # the output, the replace value will be used. + # + # source://prettier_print//lib/prettier_print.rb#721 + def remove_breaks(node, replace = T.unsafe(nil)); end + + # Adds a separated list. + # The list is separated by comma with breakable space, by default. + # + # #seplist iterates the +list+ using +iter_method+. + # It yields each object to the block given for #seplist. + # The procedure +separator_proc+ is called between each yields. + # + # If the iteration is zero times, +separator_proc+ is not called at all. + # + # If +separator_proc+ is nil or not given, + # +lambda { comma_breakable }+ is used. + # If +iter_method+ is not given, :each is used. + # + # For example, following 3 code fragments has similar effect. + # + # q.seplist([1,2,3]) {|v| xxx v } + # + # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } + # + # xxx 1 + # q.comma_breakable + # xxx 2 + # q.comma_breakable + # xxx 3 + # + # source://prettier_print//lib/prettier_print.rb#760 + def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end + + # The current array of contents that calls to methods that generate print tree + # nodes will append to. + # + # source://prettier_print//lib/prettier_print.rb#423 + def target; end + + # This adds +object+ as a text of +width+ columns in width. + # + # If +width+ is not specified, object.length is used. + # + # source://prettier_print//lib/prettier_print.rb#989 + def text(object = T.unsafe(nil), width = T.unsafe(nil)); end + + # This inserts a Trim node into the print tree which, when printed, will clear + # all whitespace at the end of the output buffer. This is useful for the rare + # case where you need to delete printed indentation and force the next node + # to start at the beginning of the line. + # + # source://prettier_print//lib/prettier_print.rb#828 + def trim; end + + # A convenience method used by a lot of the print tree node builders that + # temporarily changes the target that the builders will append to. + # + # source://prettier_print//lib/prettier_print.rb#1007 + def with_target(target); end + + private + + # This method returns a boolean as to whether or not the remaining commands + # fit onto the remaining space on the current line. If we finish printing + # all of the commands or if we hit a newline, then we return true. Otherwise + # if we continue printing past the remaining space, we return false. + # + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#1019 + def fits?(next_commands, rest_commands, remaining); end + + # source://prettier_print//lib/prettier_print.rb#1091 + def remove_breaks_with(doc, replace); end + + # Resets the group stack and target array so that this pretty printer object + # can continue to be used before calling flush again if desired. + # + # source://prettier_print//lib/prettier_print.rb#1085 + def reset; end + + class << self + # This is a convenience method which is same as follows: + # + # begin + # q = PrettierPrint.new(output, maxwidth, newline, &genspace) + # ... + # q.flush + # output + # end + # + # @yield [q] + # + # source://prettier_print//lib/prettier_print.rb#377 + def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # This is similar to PrettierPrint::format but the result has no breaks. + # + # +maxwidth+, +newline+ and +genspace+ are ignored. + # + # The invocation of +breakable+ in the block doesn't break a line and is + # treated as just an invocation of +text+. + # + # @yield [q] + # + # source://prettier_print//lib/prettier_print/single_line.rb#156 + def singleline_format(output = T.unsafe(nil), _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil), _genspace = T.unsafe(nil)); end + end +end + +# A node in the print tree that represents aligning nested nodes to a certain +# prefix width or string. +# +# source://prettier_print//lib/prettier_print.rb#65 +class PrettierPrint::Align + # @return [Align] a new instance of Align + # + # source://prettier_print//lib/prettier_print.rb#68 + def initialize(indent:, contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#66 + def contents; end + + # Returns the value of attribute indent. + # + # source://prettier_print//lib/prettier_print.rb#66 + def indent; end + + # source://prettier_print//lib/prettier_print.rb#73 + def pretty_print(q); end +end + +# source://prettier_print//lib/prettier_print.rb#126 +PrettierPrint::BREAKABLE_EMPTY = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# source://prettier_print//lib/prettier_print.rb#127 +PrettierPrint::BREAKABLE_FORCE = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# source://prettier_print//lib/prettier_print.rb#128 +PrettierPrint::BREAKABLE_RETURN = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# Below here are the most common combination of options that are created when +# creating new breakables. They are here to cut down on some allocations. +# +# source://prettier_print//lib/prettier_print.rb#125 +PrettierPrint::BREAKABLE_SPACE = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# Since there's really no difference in these instances, just using the same +# one saves on some allocations. +# +# source://prettier_print//lib/prettier_print.rb#141 +PrettierPrint::BREAK_PARENT = T.let(T.unsafe(nil), PrettierPrint::BreakParent) + +# A node in the print tree that forces the surrounding group to print out in +# the "break" mode as opposed to the "flat" mode. Useful for when you need to +# force a newline into a group. +# +# source://prettier_print//lib/prettier_print.rb#133 +class PrettierPrint::BreakParent + # source://prettier_print//lib/prettier_print.rb#134 + def pretty_print(q); end +end + +# A node in the print tree that represents a place in the buffer that the +# content can be broken onto multiple lines. +# +# source://prettier_print//lib/prettier_print.rb#82 +class PrettierPrint::Breakable + # @return [Breakable] a new instance of Breakable + # + # source://prettier_print//lib/prettier_print.rb#85 + def initialize(separator = T.unsafe(nil), width = T.unsafe(nil), force: T.unsafe(nil), indent: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#97 + def force?; end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#101 + def indent?; end + + # source://prettier_print//lib/prettier_print.rb#105 + def pretty_print(q); end + + # Returns the value of attribute separator. + # + # source://prettier_print//lib/prettier_print.rb#83 + def separator; end + + # Returns the value of attribute width. + # + # source://prettier_print//lib/prettier_print.rb#83 + def width; end +end + +# When building up the contents in the output buffer, it's convenient to be +# able to trim trailing whitespace before newlines. If the output object is a +# string or array or strings, then we can do this with some gsub calls. If +# not, then this effectively just wraps the output object and forwards on +# calls to <<. +# +# source://prettier_print//lib/prettier_print.rb#277 +module PrettierPrint::Buffer + class << self + # This is a switch for building the correct output buffer wrapper class for + # the given output object. + # + # source://prettier_print//lib/prettier_print.rb#336 + def for(output); end + end +end + +# This is an output buffer that wraps an array output object. It provides a +# trim! method that trims off trailing whitespace from the last element in +# the array if it's an unfrozen string using the same method as the +# StringBuffer. +# +# source://prettier_print//lib/prettier_print.rb#303 +class PrettierPrint::Buffer::ArrayBuffer + # @return [ArrayBuffer] a new instance of ArrayBuffer + # + # source://prettier_print//lib/prettier_print.rb#306 + def initialize(output = T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#310 + def <<(object); end + + # Returns the value of attribute output. + # + # source://prettier_print//lib/prettier_print.rb#304 + def output; end + + # source://prettier_print//lib/prettier_print.rb#314 + def trim!; end +end + +# This is an output buffer that wraps a string output object. It provides a +# trim! method that trims off trailing whitespace from the string using +# gsub!. +# +# source://prettier_print//lib/prettier_print.rb#281 +class PrettierPrint::Buffer::StringBuffer + # @return [StringBuffer] a new instance of StringBuffer + # + # source://prettier_print//lib/prettier_print.rb#284 + def initialize(output = T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#288 + def <<(object); end + + # Returns the value of attribute output. + # + # source://prettier_print//lib/prettier_print.rb#282 + def output; end + + # source://prettier_print//lib/prettier_print.rb#292 + def trim!; end +end + +# When generating spaces after a newline for indentation, by default we +# generate one space per character needed for indentation. You can change this +# behavior (for instance to use tabs) by passing a different genspace +# procedure. +# +# source://prettier_print//lib/prettier_print.rb#350 +PrettierPrint::DEFAULT_GENSPACE = T.let(T.unsafe(nil), Proc) + +# The default indentation for printing is zero, assuming that the code starts +# at the top level. That can be changed if desired to start from a different +# indentation level. +# +# source://prettier_print//lib/prettier_print.rb#366 +PrettierPrint::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) + +# When printing, you can optionally specify the value that should be used +# whenever a group needs to be broken onto multiple lines. In this case the +# default is \n. +# +# source://prettier_print//lib/prettier_print.rb#344 +PrettierPrint::DEFAULT_NEWLINE = T.let(T.unsafe(nil), String) + +# A node in the print tree that represents a group of items which the printer +# should try to fit onto one line. This is the basic command to tell the +# printer when to break. Groups are usually nested, and the printer will try +# to fit everything on one line, but if it doesn't fit it will break the +# outermost group first and try again. It will continue breaking groups until +# everything fits (or there are no more groups to break). +# +# source://prettier_print//lib/prettier_print.rb#149 +class PrettierPrint::Group + # @return [Group] a new instance of Group + # + # source://prettier_print//lib/prettier_print.rb#152 + def initialize(depth, contents: T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#158 + def break; end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#162 + def break?; end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#150 + def contents; end + + # Returns the value of attribute depth. + # + # source://prettier_print//lib/prettier_print.rb#150 + def depth; end + + # source://prettier_print//lib/prettier_print.rb#166 + def pretty_print(q); end +end + +# A node in the print tree that represents printing one thing if the +# surrounding group node is broken and another thing if the surrounding group +# node is flat. +# +# source://prettier_print//lib/prettier_print.rb#176 +class PrettierPrint::IfBreak + # @return [IfBreak] a new instance of IfBreak + # + # source://prettier_print//lib/prettier_print.rb#179 + def initialize(break_contents: T.unsafe(nil), flat_contents: T.unsafe(nil)); end + + # Returns the value of attribute break_contents. + # + # source://prettier_print//lib/prettier_print.rb#177 + def break_contents; end + + # Returns the value of attribute flat_contents. + # + # source://prettier_print//lib/prettier_print.rb#177 + def flat_contents; end + + # source://prettier_print//lib/prettier_print.rb#184 + def pretty_print(q); end +end + +# A small DSL-like object used for specifying the alternative contents to be +# printed if the surrounding group doesn't break for an IfBreak node. +# +# source://prettier_print//lib/prettier_print.rb#874 +class PrettierPrint::IfBreakBuilder + # @return [IfBreakBuilder] a new instance of IfBreakBuilder + # + # source://prettier_print//lib/prettier_print.rb#877 + def initialize(q, flat_contents); end + + # Returns the value of attribute flat_contents. + # + # source://prettier_print//lib/prettier_print.rb#875 + def flat_contents; end + + # source://prettier_print//lib/prettier_print.rb#882 + def if_flat; end + + # Returns the value of attribute q. + # + # source://prettier_print//lib/prettier_print.rb#875 + def q; end +end + +# When we already know that groups are broken, we don't actually need to track +# the flat versions of the contents. So this builder version is effectively a +# no-op, but we need it to maintain the same API. The only thing this can +# impact is that if there's a forced break in the flat contents, then we need +# to propagate that break up the whole tree. +# +# source://prettier_print//lib/prettier_print.rb#892 +class PrettierPrint::IfFlatIgnore + # @return [IfFlatIgnore] a new instance of IfFlatIgnore + # + # source://prettier_print//lib/prettier_print.rb#895 + def initialize(q); end + + # source://prettier_print//lib/prettier_print.rb#899 + def if_flat; end + + # Returns the value of attribute q. + # + # source://prettier_print//lib/prettier_print.rb#893 + def q; end +end + +# A node in the print tree that is a variant of the Align node that indents +# its contents by one level. +# +# source://prettier_print//lib/prettier_print.rb#200 +class PrettierPrint::Indent + # @return [Indent] a new instance of Indent + # + # source://prettier_print//lib/prettier_print.rb#203 + def initialize(contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#201 + def contents; end + + # source://prettier_print//lib/prettier_print.rb#207 + def pretty_print(q); end +end + +# A node in the print tree that has its own special buffer for implementing +# content that should flush before any newline. +# +# Useful for implementating trailing content, as it's not always practical to +# constantly check where the line ends to avoid accidentally printing some +# content after a line suffix node. +# +# source://prettier_print//lib/prettier_print.rb#220 +class PrettierPrint::LineSuffix + # @return [LineSuffix] a new instance of LineSuffix + # + # source://prettier_print//lib/prettier_print.rb#225 + def initialize(priority: T.unsafe(nil), contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#223 + def contents; end + + # source://prettier_print//lib/prettier_print.rb#230 + def pretty_print(q); end + + # Returns the value of attribute priority. + # + # source://prettier_print//lib/prettier_print.rb#223 + def priority; end +end + +# source://prettier_print//lib/prettier_print.rb#221 +PrettierPrint::LineSuffix::DEFAULT_PRIORITY = T.let(T.unsafe(nil), Integer) + +# There are two modes in printing, break and flat. When we're in break mode, +# any lines will use their newline, any if-breaks will use their break +# contents, etc. +# +# source://prettier_print//lib/prettier_print.rb#356 +PrettierPrint::MODE_BREAK = T.let(T.unsafe(nil), Integer) + +# This is another print mode much like MODE_BREAK. When we're in flat mode, we +# attempt to print everything on one line until we either hit a broken group, +# a forced line, or the maximum width. +# +# source://prettier_print//lib/prettier_print.rb#361 +PrettierPrint::MODE_FLAT = T.let(T.unsafe(nil), Integer) + +# PrettierPrint::SingleLine is used by PrettierPrint.singleline_format +# +# It is passed to be similar to a PrettierPrint object itself, by responding to +# all of the same print tree node builder methods, as well as the #flush +# method. +# +# The significant difference here is that there are no line breaks in the +# output. If an IfBreak node is used, only the flat contents are printed. +# LineSuffix nodes are printed at the end of the buffer when #flush is called. +# +# source://prettier_print//lib/prettier_print/single_line.rb#13 +class PrettierPrint::SingleLine + # Create a PrettierPrint::SingleLine object + # + # Arguments: + # * +output+ - String (or similar) to store rendered text. Needs to respond + # to '<<'. + # * +maxwidth+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # * +newline+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # + # @return [SingleLine] a new instance of SingleLine + # + # source://prettier_print//lib/prettier_print/single_line.rb#34 + def initialize(output, _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil)); end + + # Here for compatibility, does nothing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#64 + def break_parent; end + + # Appends +separator+ to the text to be output. By default +separator+ is + # ' ' + # + # The +width+, +indent+, and +force+ arguments are here for compatibility. + # They are all noop arguments. + # + # source://prettier_print//lib/prettier_print/single_line.rb#54 + def breakable(separator = T.unsafe(nil), _width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end + + # Appends +separator+ to the output buffer. +width+ is a noop here for + # compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#69 + def fill_breakable(separator = T.unsafe(nil), _width = T.unsafe(nil)); end + + # Flushes the line suffixes onto the output buffer. + # + # source://prettier_print//lib/prettier_print/single_line.rb#41 + def flush; end + + # Opens a block for grouping objects to be pretty printed. + # + # Arguments: + # * +indent+ - noop argument. Present for compatibility. + # * +open_obj+ - text appended before the &block. Default is '' + # * +close_obj+ - text appended after the &block. Default is '' + # * +open_width+ - noop argument. Present for compatibility. + # * +close_width+ - noop argument. Present for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#90 + def group(_indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), _open_width = T.unsafe(nil), _close_width = T.unsafe(nil)); end + + # Effectively unnecessary, but here for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#113 + def if_break; end + + # Also effectively unnecessary, but here for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#118 + def if_flat; end + + # A noop that immediately yields. + # + # source://prettier_print//lib/prettier_print/single_line.rb#122 + def indent; end + + # Changes the target output buffer to the line suffix output buffer which + # will get flushed at the end of printing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#128 + def line_suffix; end + + # A buffer output that wraps any calls to line_suffix that will be flushed + # at the end of printing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#23 + def line_suffixes; end + + # Takes +indent+ arg, but does nothing with it. + # + # Yields to a block. + # + # source://prettier_print//lib/prettier_print/single_line.rb#137 + def nest(_indent); end + + # The output object. It stores rendered text and should respond to <<. + # + # source://prettier_print//lib/prettier_print/single_line.rb#15 + def output; end + + # The current array of contents that the print tree builder methods should + # append to. + # + # source://prettier_print//lib/prettier_print/single_line.rb#19 + def target; end + + # Add +object+ to the text to be output. + # + # +width+ argument is here for compatibility. It is a noop argument. + # + # source://prettier_print//lib/prettier_print/single_line.rb#144 + def text(object = T.unsafe(nil), _width = T.unsafe(nil)); end + + # Immediately trims the output buffer. + # + # source://prettier_print//lib/prettier_print/single_line.rb#74 + def trim; end +end + +# A class that wraps the ability to call #if_flat. The contents of the +# #if_flat block are executed immediately, so effectively this class and the +# #if_break method that triggers it are unnecessary, but they're here to +# maintain compatibility. +# +# source://prettier_print//lib/prettier_print/single_line.rb#106 +class PrettierPrint::SingleLine::IfBreakBuilder + # source://prettier_print//lib/prettier_print/single_line.rb#107 + def if_flat; end +end + +# Since all of the instances here are the same, we can reuse the same one to +# cut down on allocations. +# +# source://prettier_print//lib/prettier_print.rb#270 +PrettierPrint::TRIM = T.let(T.unsafe(nil), PrettierPrint::Trim) + +# A node in the print tree that represents plain content that cannot be broken +# up (by default this assumes strings, but it can really be anything). +# +# source://prettier_print//lib/prettier_print.rb#239 +class PrettierPrint::Text + # @return [Text] a new instance of Text + # + # source://prettier_print//lib/prettier_print.rb#242 + def initialize; end + + # source://prettier_print//lib/prettier_print.rb#247 + def add(object: T.unsafe(nil), width: T.unsafe(nil)); end + + # Returns the value of attribute objects. + # + # source://prettier_print//lib/prettier_print.rb#240 + def objects; end + + # source://prettier_print//lib/prettier_print.rb#252 + def pretty_print(q); end + + # Returns the value of attribute width. + # + # source://prettier_print//lib/prettier_print.rb#240 + def width; end +end + +# A node in the print tree that represents trimming all of the indentation of +# the current line, in the rare case that you need to ignore the indentation +# that you've already created. This node should be placed after a Breakable. +# +# source://prettier_print//lib/prettier_print.rb#262 +class PrettierPrint::Trim + # source://prettier_print//lib/prettier_print.rb#263 + def pretty_print(q); end +end diff --git a/sorbet/rbi/gems/pry@0.14.1.rbi b/sorbet/rbi/gems/pry@0.14.1.rbi deleted file mode 100644 index 84ab885..0000000 --- a/sorbet/rbi/gems/pry@0.14.1.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `pry` gem. -# Please instead update this file by running `bin/tapioca gem pry`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rbi@0.0.15.rbi b/sorbet/rbi/gems/rbi@0.1.1.rbi similarity index 71% rename from sorbet/rbi/gems/rbi@0.0.15.rbi rename to sorbet/rbi/gems/rbi@0.1.1.rbi index 3cc198c..0139952 100644 --- a/sorbet/rbi/gems/rbi@0.0.15.rbi +++ b/sorbet/rbi/gems/rbi@0.1.1.rbi @@ -4,58 +4,28 @@ # This is an autogenerated file for types exported from the `rbi` gem. # Please instead update this file by running `bin/tapioca gem rbi`. -# source://rbi//lib/rbi.rb#7 +# source://rbi//lib/rbi/loc.rb#4 module RBI; end -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/parser.rb#129 -class RBI::ASTVisitor - abstract! - - # source://sorbet-runtime/0.5.10439/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # @abstract - # - # source://rbi//lib/rbi/parser.rb#141 - sig { abstract.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#136 - sig { params(nodes: T::Array[::AST::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/parser.rb#151 - sig { params(node: ::AST::Node).returns(::String) } - def parse_expr(node); end - - # source://rbi//lib/rbi/parser.rb#146 - sig { params(node: ::AST::Node).returns(::String) } - def parse_name(node); end -end - -# source://rbi//lib/rbi/model.rb#960 +# source://rbi//lib/rbi/model.rb#968 class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#972 + # source://rbi//lib/rbi/model.rb#980 sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#978 + # source://rbi//lib/rbi/model.rb#986 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#611 + # source://rbi//lib/rbi/printer.rb#613 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#983 + # source://rbi//lib/rbi/model.rb#991 sig { returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#964 + # source://rbi//lib/rbi/model.rb#972 sig { returns(::String) } def value; end end @@ -64,13 +34,13 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#341 +# source://rbi//lib/rbi/model.rb#349 class RBI::Attr < ::RBI::NodeWithComments include ::RBI::Indexable abstract! - # source://rbi//lib/rbi/model.rb#366 + # source://rbi//lib/rbi/model.rb#374 sig do params( name: ::Symbol, @@ -83,58 +53,53 @@ class RBI::Attr < ::RBI::NodeWithComments end def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#346 + # source://rbi//lib/rbi/printer.rb#348 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#406 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end # @abstract # - # source://rbi//lib/rbi/model.rb#374 + # source://rbi//lib/rbi/model.rb#382 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/index.rb#109 + # source://rbi//lib/rbi/index.rb#113 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#413 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#348 + # source://rbi//lib/rbi/model.rb#356 sig { returns(T::Array[::Symbol]) } def names; end - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#348 - def names=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#373 + # source://rbi//lib/rbi/printer.rb#375 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/model.rb#354 + # source://rbi//lib/rbi/model.rb#362 sig { returns(T::Array[::RBI::Sig]) } def sigs; end - # source://rbi//lib/rbi/model.rb#351 + # source://rbi//lib/rbi/model.rb#359 sig { returns(::RBI::Visibility) } def visibility; end # @return [Visibility] # - # source://rbi//lib/rbi/model.rb#351 + # source://rbi//lib/rbi/model.rb#359 def visibility=(_arg0); end end -# source://rbi//lib/rbi/model.rb#377 +# source://rbi//lib/rbi/model.rb#385 class RBI::AttrAccessor < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#391 + # source://rbi//lib/rbi/model.rb#399 sig do params( name: ::Symbol, @@ -148,22 +113,22 @@ class RBI::AttrAccessor < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#444 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#452 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#397 + # source://rbi//lib/rbi/model.rb#405 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#403 + # source://rbi//lib/rbi/model.rb#411 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#409 +# source://rbi//lib/rbi/model.rb#417 class RBI::AttrReader < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#423 + # source://rbi//lib/rbi/model.rb#431 sig do params( name: ::Symbol, @@ -177,22 +142,22 @@ class RBI::AttrReader < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#426 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#434 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#429 + # source://rbi//lib/rbi/model.rb#437 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#435 + # source://rbi//lib/rbi/model.rb#443 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#441 +# source://rbi//lib/rbi/model.rb#449 class RBI::AttrWriter < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#455 + # source://rbi//lib/rbi/model.rb#463 sig do params( name: ::Symbol, @@ -206,35 +171,35 @@ class RBI::AttrWriter < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#435 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#443 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#461 + # source://rbi//lib/rbi/model.rb#469 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#467 + # source://rbi//lib/rbi/model.rb#475 sig { override.returns(::String) } def to_s; end end # An arbitrary blank line that can be added both in trees and comments # -# source://rbi//lib/rbi/model.rb#70 +# source://rbi//lib/rbi/model.rb#74 class RBI::BlankLine < ::RBI::Comment - # source://rbi//lib/rbi/model.rb#74 + # source://rbi//lib/rbi/model.rb#78 sig { params(loc: T.nilable(::RBI::Loc)).void } def initialize(loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#215 + # source://rbi//lib/rbi/printer.rb#217 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end end -# source://rbi//lib/rbi/model.rb#733 +# source://rbi//lib/rbi/model.rb#741 class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#744 + # source://rbi//lib/rbi/model.rb#752 sig do params( name: ::String, @@ -245,26 +210,26 @@ class RBI::BlockParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#755 + # source://rbi//lib/rbi/model.rb#763 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#541 + # source://rbi//lib/rbi/printer.rb#543 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#546 + # source://rbi//lib/rbi/printer.rb#548 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#750 + # source://rbi//lib/rbi/model.rb#758 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#213 +# source://rbi//lib/rbi/model.rb#218 class RBI::Class < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#231 + # source://rbi//lib/rbi/model.rb#236 sig do params( name: ::String, @@ -276,58 +241,58 @@ class RBI::Class < ::RBI::Scope end def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#370 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#376 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#239 + # source://rbi//lib/rbi/model.rb#244 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#217 + # source://rbi//lib/rbi/model.rb#222 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#217 + # source://rbi//lib/rbi/model.rb#222 def name=(_arg0); end - # source://rbi//lib/rbi/printer.rb#282 + # source://rbi//lib/rbi/printer.rb#284 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end - # source://rbi//lib/rbi/model.rb#220 + # source://rbi//lib/rbi/model.rb#225 sig { returns(T.nilable(::String)) } def superclass_name; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#220 + # source://rbi//lib/rbi/model.rb#225 def superclass_name=(_arg0); end end -# source://rbi//lib/rbi/model.rb#50 +# source://rbi//lib/rbi/model.rb#53 class RBI::Comment < ::RBI::Node - # source://rbi//lib/rbi/model.rb#57 + # source://rbi//lib/rbi/model.rb#60 sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(text, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#63 + # source://rbi//lib/rbi/model.rb#66 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#195 + # source://rbi//lib/rbi/printer.rb#197 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#54 + # source://rbi//lib/rbi/model.rb#57 sig { returns(::String) } def text; end # @return [String] # - # source://rbi//lib/rbi/model.rb#54 + # source://rbi//lib/rbi/model.rb#57 def text=(_arg0); end end @@ -346,33 +311,33 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#578 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#585 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 sig { params(left_name: ::String, right_name: ::String).void } def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#607 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#582 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 sig { returns(::RBI::Tree) } def left; end # @return [Tree] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#582 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 def right; end end # Consts # -# source://rbi//lib/rbi/model.rb#305 +# source://rbi//lib/rbi/model.rb#312 class RBI::Const < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#320 + # source://rbi//lib/rbi/model.rb#327 sig do params( name: ::String, @@ -384,70 +349,41 @@ class RBI::Const < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/printer.rb#333 + # source://rbi//lib/rbi/printer.rb#335 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#397 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#328 + # source://rbi//lib/rbi/model.rb#335 sig { returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/index.rb#99 + # source://rbi//lib/rbi/index.rb#103 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#309 + # source://rbi//lib/rbi/model.rb#316 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#334 + # source://rbi//lib/rbi/model.rb#342 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi//lib/rbi/model.rb#309 + # source://rbi//lib/rbi/model.rb#316 def value; end end -# source://rbi//lib/rbi/parser.rb#600 -class RBI::ConstBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#615 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#612 - sig { returns(T::Array[::String]) } - def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/parser.rb#612 - def names=(_arg0); end - - # source://rbi//lib/rbi/parser.rb#621 - sig { override.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - class << self - # source://rbi//lib/rbi/parser.rb#604 - sig { params(node: T.nilable(::AST::Node)).returns(T.nilable(::String)) } - def visit(node); end - end -end - -# source://rbi//lib/rbi.rb#8 -class RBI::Error < ::StandardError; end - -# source://rbi//lib/rbi/model.rb#808 +# source://rbi//lib/rbi/model.rb#816 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#820 + # source://rbi//lib/rbi/model.rb#828 sig do params( name: ::String, @@ -459,22 +395,22 @@ class RBI::Extend < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#492 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#502 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#139 + # source://rbi//lib/rbi/index.rb#143 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#826 + # source://rbi//lib/rbi/model.rb#834 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#133 +# source://rbi//lib/rbi/model.rb#137 class RBI::File - # source://rbi//lib/rbi/model.rb#152 + # source://rbi//lib/rbi/model.rb#156 sig do params( strictness: T.nilable(::String), @@ -484,28 +420,28 @@ class RBI::File end def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#160 + # source://rbi//lib/rbi/model.rb#164 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi//lib/rbi/printer.rb#104 + # source://rbi//lib/rbi/printer.rb#105 sig { params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#143 + # source://rbi//lib/rbi/model.rb#147 sig { returns(T::Array[::RBI::Comment]) } def comments; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#143 + # source://rbi//lib/rbi/model.rb#147 def comments=(_arg0); end - # source://rbi//lib/rbi/model.rb#165 + # source://rbi//lib/rbi/model.rb#169 sig { returns(T::Boolean) } def empty?; end - # source://rbi//lib/rbi/printer.rb#128 + # source://rbi//lib/rbi/printer.rb#129 sig do params( out: T.any(::IO, ::StringIO), @@ -516,32 +452,32 @@ class RBI::File end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#137 + # source://rbi//lib/rbi/model.rb#141 sig { returns(::RBI::Tree) } def root; end # @return [Tree] # - # source://rbi//lib/rbi/model.rb#137 + # source://rbi//lib/rbi/model.rb#141 def root=(_arg0); end - # source://rbi//lib/rbi/model.rb#140 + # source://rbi//lib/rbi/model.rb#144 sig { returns(T.nilable(::String)) } def strictness; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#140 + # source://rbi//lib/rbi/model.rb#144 def strictness=(_arg0); end - # source://rbi//lib/rbi/printer.rb#134 + # source://rbi//lib/rbi/printer.rb#135 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end # source://rbi//lib/rbi/formatter.rb#5 class RBI::Formatter - # source://rbi//lib/rbi/formatter.rb#24 + # source://rbi//lib/rbi/formatter.rb#36 sig do params( add_sig_templates: T::Boolean, @@ -554,79 +490,46 @@ class RBI::Formatter end def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - # source://rbi//lib/rbi/formatter.rb#9 - sig { returns(T::Boolean) } - def add_sig_templates; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def add_sig_templates=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#15 + sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) } + def add_sig_templates=(add_sig_templates); end - # source://rbi//lib/rbi/formatter.rb#53 + # source://rbi//lib/rbi/formatter.rb#59 sig { params(file: ::RBI::File).void } def format_file(file); end - # source://rbi//lib/rbi/formatter.rb#58 + # source://rbi//lib/rbi/formatter.rb#64 sig { params(tree: ::RBI::Tree).void } def format_tree(tree); end - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def group_nodes; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def group_nodes=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#18 + sig { params(group_nodes: T::Boolean).returns(T::Boolean) } + def group_nodes=(group_nodes); end - # source://rbi//lib/rbi/formatter.rb#12 + # source://rbi//lib/rbi/formatter.rb#24 sig { returns(T.nilable(::Integer)) } def max_line_length; end # @return [Integer, nil] # - # source://rbi//lib/rbi/formatter.rb#12 + # source://rbi//lib/rbi/formatter.rb#24 def max_line_length=(_arg0); end - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_non_public_methods; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_non_public_methods=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#21 + sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } + def nest_non_public_methods=(nest_non_public_methods); end - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_singleton_methods; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_singleton_methods=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#12 + sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } + def nest_singleton_methods=(nest_singleton_methods); end - # source://rbi//lib/rbi/formatter.rb#41 + # source://rbi//lib/rbi/formatter.rb#53 sig { params(file: ::RBI::File).returns(::String) } def print_file(file); end - # source://rbi//lib/rbi/formatter.rb#47 - sig { params(tree: ::RBI::Tree).returns(::String) } - def print_tree(tree); end - - # @return [Boolean] - # # source://rbi//lib/rbi/formatter.rb#9 - def sort_nodes; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def sort_nodes=(_arg0); end + sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } + def sort_nodes=(sort_nodes); end end # source://rbi//lib/rbi/rewriters/group_nodes.rb#88 @@ -635,7 +538,7 @@ class RBI::Group < ::RBI::Tree sig { params(kind: ::RBI::Group::Kind).void } def initialize(kind); end - # source://rbi//lib/rbi/printer.rb#836 + # source://rbi//lib/rbi/printer.rb#838 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end @@ -665,11 +568,11 @@ end # Sorbet's misc. # -# source://rbi//lib/rbi/model.rb#1285 +# source://rbi//lib/rbi/model.rb#1294 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1299 + # source://rbi//lib/rbi/model.rb#1308 sig do params( name: ::String, @@ -680,32 +583,32 @@ class RBI::Helper < ::RBI::NodeWithComments end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/printer.rb#823 + # source://rbi//lib/rbi/printer.rb#825 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#510 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#520 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#169 + # source://rbi//lib/rbi/index.rb#173 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1289 + # source://rbi//lib/rbi/model.rb#1298 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1306 + # source://rbi//lib/rbi/model.rb#1315 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#785 +# source://rbi//lib/rbi/model.rb#793 class RBI::Include < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#797 + # source://rbi//lib/rbi/model.rb#805 sig do params( name: ::String, @@ -717,49 +620,49 @@ class RBI::Include < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#483 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#493 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#129 + # source://rbi//lib/rbi/index.rb#133 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#803 + # source://rbi//lib/rbi/model.rb#811 sig { override.returns(::String) } def to_s; end end # source://rbi//lib/rbi/index.rb#5 class RBI::Index < ::RBI::Visitor - # source://rbi//lib/rbi/index.rb#17 + # source://rbi//lib/rbi/index.rb#21 sig { void } def initialize; end - # source://rbi//lib/rbi/index.rb#28 + # source://rbi//lib/rbi/index.rb#32 sig { params(id: ::String).returns(T::Array[::RBI::Node]) } def [](id); end - # source://rbi//lib/rbi/index.rb#33 + # source://rbi//lib/rbi/index.rb#37 sig { params(nodes: ::RBI::Node).void } def index(*nodes); end - # source://rbi//lib/rbi/index.rb#23 + # source://rbi//lib/rbi/index.rb#27 sig { returns(T::Array[::String]) } def keys; end - # source://rbi//lib/rbi/index.rb#38 + # source://rbi//lib/rbi/index.rb#42 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private - # source://rbi//lib/rbi/index.rb#55 + # source://rbi//lib/rbi/index.rb#59 sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } def index_node(node); end class << self - # source://rbi//lib/rbi/index.rb#10 + # source://rbi//lib/rbi/index.rb#13 sig { params(node: ::RBI::Node).returns(::RBI::Index) } def index(*node); end end @@ -769,7 +672,7 @@ end # # @abstract Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/index.rb#70 +# source://rbi//lib/rbi/index.rb#74 module RBI::Indexable interface! @@ -780,37 +683,37 @@ module RBI::Indexable # # @abstract # - # source://rbi//lib/rbi/index.rb#81 + # source://rbi//lib/rbi/index.rb#85 sig { abstract.returns(T::Array[::String]) } def index_ids; end end -# source://rbi//lib/rbi/model.rb#988 +# source://rbi//lib/rbi/model.rb#996 class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1001 + # source://rbi//lib/rbi/model.rb#1009 sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(keyword, value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#1007 + # source://rbi//lib/rbi/model.rb#1015 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#620 + # source://rbi//lib/rbi/printer.rb#622 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#992 + # source://rbi//lib/rbi/model.rb#1000 sig { returns(::String) } def keyword; end - # source://rbi//lib/rbi/model.rb#1012 + # source://rbi//lib/rbi/model.rb#1020 sig { returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#674 +# source://rbi//lib/rbi/model.rb#682 class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#689 + # source://rbi//lib/rbi/model.rb#697 sig do params( name: ::String, @@ -822,30 +725,30 @@ class RBI::KwOptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#701 + # source://rbi//lib/rbi/model.rb#709 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#511 + # source://rbi//lib/rbi/printer.rb#513 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#516 + # source://rbi//lib/rbi/printer.rb#518 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#696 + # source://rbi//lib/rbi/model.rb#704 sig { override.returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#678 + # source://rbi//lib/rbi/model.rb#686 sig { returns(::String) } def value; end end -# source://rbi//lib/rbi/model.rb#647 +# source://rbi//lib/rbi/model.rb#655 class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#658 + # source://rbi//lib/rbi/model.rb#666 sig do params( name: ::String, @@ -856,26 +759,26 @@ class RBI::KwParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#669 + # source://rbi//lib/rbi/model.rb#677 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#496 + # source://rbi//lib/rbi/printer.rb#498 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#501 + # source://rbi//lib/rbi/printer.rb#503 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#664 + # source://rbi//lib/rbi/model.rb#672 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#706 +# source://rbi//lib/rbi/model.rb#714 class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#717 + # source://rbi//lib/rbi/model.rb#725 sig do params( name: ::String, @@ -886,26 +789,26 @@ class RBI::KwRestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#728 + # source://rbi//lib/rbi/model.rb#736 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#526 + # source://rbi//lib/rbi/printer.rb#528 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#531 + # source://rbi//lib/rbi/printer.rb#533 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#723 + # source://rbi//lib/rbi/model.rb#731 sig { override.returns(::String) } def to_s; end end # source://rbi//lib/rbi/loc.rb#5 class RBI::Loc - # source://rbi//lib/rbi/loc.rb#23 + # source://rbi//lib/rbi/loc.rb#38 sig do params( file: T.nilable(::String), @@ -919,47 +822,47 @@ class RBI::Loc # @return [Integer, nil] # - # source://rbi//lib/rbi/loc.rb#12 + # source://rbi//lib/rbi/loc.rb#27 def begin_column; end - # source://rbi//lib/rbi/loc.rb#12 + # source://rbi//lib/rbi/loc.rb#27 sig { returns(T.nilable(::Integer)) } def begin_line; end # @return [Integer, nil] # - # source://rbi//lib/rbi/loc.rb#12 + # source://rbi//lib/rbi/loc.rb#27 def end_column; end # @return [Integer, nil] # - # source://rbi//lib/rbi/loc.rb#12 + # source://rbi//lib/rbi/loc.rb#27 def end_line; end - # source://rbi//lib/rbi/loc.rb#9 + # source://rbi//lib/rbi/loc.rb#24 sig { returns(T.nilable(::String)) } def file; end - # source://rbi//lib/rbi/loc.rb#37 + # source://rbi//lib/rbi/loc.rb#56 sig { returns(T.nilable(::String)) } def source; end - # source://rbi//lib/rbi/loc.rb#32 + # source://rbi//lib/rbi/loc.rb#47 sig { returns(::String) } def to_s; end class << self - # source://rbi//lib/rbi/parser.rb#707 - sig { params(file: ::String, ast_loc: T.any(::Parser::Source::Map, ::Parser::Source::Range)).returns(::RBI::Loc) } - def from_ast_loc(file, ast_loc); end + # source://rbi//lib/rbi/loc.rb#12 + sig { params(file: ::String, yarp_location: ::Prism::Location).returns(::RBI::Loc) } + def from_yarp(file, yarp_location); end end end # A tree that _might_ contain conflicts # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#324 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 class RBI::MergeTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#338 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 sig do params( loc: T.nilable(::RBI::Loc), @@ -970,18 +873,18 @@ class RBI::MergeTree < ::RBI::Tree end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#328 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } def conflicts; end end # Methods and args # -# source://rbi//lib/rbi/model.rb#475 +# source://rbi//lib/rbi/model.rb#483 class RBI::Method < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#505 + # source://rbi//lib/rbi/model.rb#513 sig do params( name: ::String, @@ -996,88 +899,88 @@ class RBI::Method < ::RBI::NodeWithComments end def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#525 + # source://rbi//lib/rbi/model.rb#533 sig { params(param: ::RBI::Param).void } def <<(param); end - # source://rbi//lib/rbi/printer.rb#382 + # source://rbi//lib/rbi/printer.rb#384 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#453 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#530 + # source://rbi//lib/rbi/model.rb#538 sig { returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/index.rb#119 + # source://rbi//lib/rbi/index.rb#123 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/printer.rb#435 + # source://rbi//lib/rbi/printer.rb#437 sig { returns(T::Boolean) } def inline_params?; end - # source://rbi//lib/rbi/model.rb#485 + # source://rbi//lib/rbi/model.rb#493 sig { returns(T::Boolean) } def is_singleton; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#485 + # source://rbi//lib/rbi/model.rb#493 def is_singleton=(_arg0); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#479 + # source://rbi//lib/rbi/model.rb#487 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#479 + # source://rbi//lib/rbi/model.rb#487 def name=(_arg0); end - # source://rbi//lib/rbi/printer.rb#430 + # source://rbi//lib/rbi/printer.rb#432 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/model.rb#482 + # source://rbi//lib/rbi/model.rb#490 sig { returns(T::Array[::RBI::Param]) } def params; end - # source://rbi//lib/rbi/model.rb#491 + # source://rbi//lib/rbi/model.rb#499 sig { returns(T::Array[::RBI::Sig]) } def sigs; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#491 + # source://rbi//lib/rbi/model.rb#499 def sigs=(_arg0); end - # source://rbi//lib/rbi/model.rb#539 + # source://rbi//lib/rbi/model.rb#547 sig { override.returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#488 + # source://rbi//lib/rbi/model.rb#496 sig { returns(::RBI::Visibility) } def visibility; end # @return [Visibility] # - # source://rbi//lib/rbi/model.rb#488 + # source://rbi//lib/rbi/model.rb#496 def visibility=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1345 +# source://rbi//lib/rbi/model.rb#1355 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1357 + # source://rbi//lib/rbi/model.rb#1367 sig do params( name: ::String, @@ -1089,15 +992,15 @@ class RBI::MixesInClassMethods < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#501 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#149 + # source://rbi//lib/rbi/index.rb#153 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1363 + # source://rbi//lib/rbi/model.rb#1373 sig { override.returns(::String) } def to_s; end end @@ -1106,11 +1009,11 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#762 +# source://rbi//lib/rbi/model.rb#770 class RBI::Mixin < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#779 + # source://rbi//lib/rbi/model.rb#787 sig do params( name: ::String, @@ -1121,27 +1024,22 @@ class RBI::Mixin < ::RBI::NodeWithComments end def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#556 + # source://rbi//lib/rbi/printer.rb#558 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#474 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#484 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#769 + # source://rbi//lib/rbi/model.rb#777 sig { returns(T::Array[::String]) } def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#769 - def names=(_arg0); end end -# source://rbi//lib/rbi/model.rb#186 +# source://rbi//lib/rbi/model.rb#190 class RBI::Module < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#200 + # source://rbi//lib/rbi/model.rb#204 sig do params( name: ::String, @@ -1152,24 +1050,24 @@ class RBI::Module < ::RBI::Scope end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#379 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#385 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#207 + # source://rbi//lib/rbi/model.rb#211 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#190 + # source://rbi//lib/rbi/model.rb#194 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#190 + # source://rbi//lib/rbi/model.rb#194 def name=(_arg0); end - # source://rbi//lib/rbi/printer.rb#268 + # source://rbi//lib/rbi/printer.rb#270 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end @@ -1186,13 +1084,13 @@ class RBI::Node # @abstract # - # source://rbi//lib/rbi/printer.rb#145 + # source://rbi//lib/rbi/printer.rb#146 sig { abstract.params(v: ::RBI::Printer).void } def accept_printer(v); end # Can `self` and `_other` be merged into a single definition? # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#283 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 sig { params(_other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(_other); end @@ -1215,19 +1113,19 @@ class RBI::Node # Merge `self` and `other` into a single definition # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#289 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 sig { params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/printer.rb#177 + # source://rbi//lib/rbi/printer.rb#179 sig { returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#292 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 sig { returns(T.nilable(::RBI::ConflictTree)) } def parent_conflict_tree; end - # source://rbi//lib/rbi/model.rb#43 + # source://rbi//lib/rbi/model.rb#46 sig { returns(T.nilable(::RBI::Scope)) } def parent_scope; end @@ -1240,7 +1138,7 @@ class RBI::Node # source://rbi//lib/rbi/model.rb#12 def parent_tree=(_arg0); end - # source://rbi//lib/rbi/printer.rb#155 + # source://rbi//lib/rbi/printer.rb#156 sig do params( out: T.any(::IO, ::StringIO), @@ -1251,54 +1149,54 @@ class RBI::Node end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#168 + # source://rbi//lib/rbi/printer.rb#169 sig { params(v: ::RBI::Printer).void } def print_blank_line_before(v); end - # source://rbi//lib/rbi/model.rb#32 + # source://rbi//lib/rbi/model.rb#33 sig { params(node: ::RBI::Node).void } def replace(node); end - # source://rbi//lib/rbi/printer.rb#161 + # source://rbi//lib/rbi/printer.rb#162 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#79 +# source://rbi//lib/rbi/model.rb#83 class RBI::NodeWithComments < ::RBI::Node abstract! - # source://rbi//lib/rbi/model.rb#89 + # source://rbi//lib/rbi/model.rb#93 sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#95 + # source://rbi//lib/rbi/model.rb#99 sig { returns(T::Array[::String]) } def annotations; end - # source://rbi//lib/rbi/model.rb#86 + # source://rbi//lib/rbi/model.rb#90 sig { returns(T::Array[::RBI::Comment]) } def comments; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#86 + # source://rbi//lib/rbi/model.rb#90 def comments=(_arg0); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#306 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/printer.rb#186 + # source://rbi//lib/rbi/printer.rb#188 sig { override.returns(T::Boolean) } def oneline?; end end -# source://rbi//lib/rbi/model.rb#593 +# source://rbi//lib/rbi/model.rb#601 class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#608 + # source://rbi//lib/rbi/model.rb#616 sig do params( name: ::String, @@ -1310,50 +1208,50 @@ class RBI::OptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#615 + # source://rbi//lib/rbi/model.rb#623 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#466 + # source://rbi//lib/rbi/printer.rb#468 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#471 + # source://rbi//lib/rbi/printer.rb#473 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#597 + # source://rbi//lib/rbi/model.rb#605 sig { returns(::String) } def value; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#544 +# source://rbi//lib/rbi/model.rb#552 class RBI::Param < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#560 + # source://rbi//lib/rbi/model.rb#568 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#444 + # source://rbi//lib/rbi/printer.rb#446 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#457 + # source://rbi//lib/rbi/printer.rb#459 sig { returns(T::Array[::String]) } def comments_lines; end - # source://rbi//lib/rbi/model.rb#551 + # source://rbi//lib/rbi/model.rb#559 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/printer.rb#449 + # source://rbi//lib/rbi/printer.rb#451 sig { params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#566 + # source://rbi//lib/rbi/model.rb#574 sig { override.returns(::String) } def to_s; end end @@ -1371,43 +1269,208 @@ end # source://rbi//lib/rbi/parser.rb#53 class RBI::Parser - # source://rbi//lib/rbi/parser.rb#64 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#97 + # source://rbi//lib/rbi/parser.rb#88 sig { params(path: ::String).returns(::RBI::Tree) } def parse_file(path); end - # source://rbi//lib/rbi/parser.rb#86 + # source://rbi//lib/rbi/parser.rb#83 sig { params(string: ::String).returns(::RBI::Tree) } def parse_string(string); end private - # source://rbi//lib/rbi/parser.rb#104 - sig { params(content: ::String, file: ::String).returns(::RBI::Tree) } - def parse(content, file:); end + # source://rbi//lib/rbi/parser.rb#95 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end class << self - # source://rbi//lib/rbi/parser.rb#75 + # source://rbi//lib/rbi/parser.rb#65 sig { params(path: ::String).returns(::RBI::Tree) } def parse_file(path); end - # source://rbi//lib/rbi/parser.rb#80 + # source://rbi//lib/rbi/parser.rb#70 sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } def parse_files(paths); end - # source://rbi//lib/rbi/parser.rb#70 + # source://rbi//lib/rbi/parser.rb#60 sig { params(string: ::String).returns(::RBI::Tree) } def parse_string(string); end - # source://rbi//lib/rbi/parser.rb#91 + # source://rbi//lib/rbi/parser.rb#76 sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } def parse_strings(strings); end end end +# source://rbi//lib/rbi/parser.rb#746 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#753 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # source://rbi//lib/rbi/parser.rb#750 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#805 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://rbi//lib/rbi/parser.rb#760 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#155 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#165 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # source://rbi//lib/rbi/parser.rb#162 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # source://rbi//lib/rbi/parser.rb#159 + sig { returns(::RBI::Tree) } + def tree; end + + # source://rbi//lib/rbi/parser.rb#178 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/parser.rb#295 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://rbi//lib/rbi/parser.rb#186 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://rbi//lib/rbi/parser.rb#212 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # source://rbi//lib/rbi/parser.rb#207 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#202 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#245 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://rbi//lib/rbi/parser.rb#257 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://rbi//lib/rbi/parser.rb#272 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://rbi//lib/rbi/parser.rb#281 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # source://rbi//lib/rbi/parser.rb#420 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # source://rbi//lib/rbi/parser.rb#438 + sig { void } + def collect_orphan_comments; end + + # source://rbi//lib/rbi/parser.rb#461 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/parser.rb#466 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # source://rbi//lib/rbi/parser.rb#473 + sig { returns(T::Array[::RBI::Comment]) } + def current_sigs_comments; end + + # source://rbi//lib/rbi/parser.rb#480 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # source://rbi//lib/rbi/parser.rb#498 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # source://rbi//lib/rbi/parser.rb#527 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # source://rbi//lib/rbi/parser.rb#503 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # source://rbi//lib/rbi/parser.rb#603 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#613 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # source://rbi//lib/rbi/parser.rb#663 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # source://rbi//lib/rbi/parser.rb#700 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # source://rbi//lib/rbi/parser.rb#714 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#724 + sig { void } + def set_root_tree_loc; end + + # source://rbi//lib/rbi/parser.rb#738 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# source://rbi//lib/rbi/parser.rb#124 +class RBI::Parser::Visitor < ::Prism::Visitor + # source://rbi//lib/rbi/parser.rb#128 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # source://rbi//lib/rbi/parser.rb#138 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # source://rbi//lib/rbi/parser.rb#143 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # source://rbi//lib/rbi/parser.rb#150 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end +end + # source://rbi//lib/rbi/printer.rb#5 class RBI::Printer < ::RBI::Visitor # source://rbi//lib/rbi/printer.rb#28 @@ -1490,7 +1553,7 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end - # source://rbi//lib/rbi/printer.rb#89 + # source://rbi//lib/rbi/printer.rb#90 sig { override.params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end @@ -1499,9 +1562,9 @@ class RBI::Printer < ::RBI::Visitor def visit_file(file); end end -# source://rbi//lib/rbi/model.rb#901 +# source://rbi//lib/rbi/model.rb#909 class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#911 + # source://rbi//lib/rbi/model.rb#919 sig do params( loc: T.nilable(::RBI::Loc), @@ -1512,9 +1575,9 @@ class RBI::Private < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#885 +# source://rbi//lib/rbi/model.rb#893 class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#895 + # source://rbi//lib/rbi/model.rb#903 sig do params( loc: T.nilable(::RBI::Loc), @@ -1525,9 +1588,9 @@ class RBI::Protected < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#869 +# source://rbi//lib/rbi/model.rb#877 class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#879 + # source://rbi//lib/rbi/model.rb#887 sig do params( loc: T.nilable(::RBI::Loc), @@ -1538,9 +1601,9 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#571 +# source://rbi//lib/rbi/model.rb#579 class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#582 + # source://rbi//lib/rbi/model.rb#590 sig do params( name: ::String, @@ -1551,39 +1614,39 @@ class RBI::ReqParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#588 + # source://rbi//lib/rbi/model.rb#596 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end end -# source://rbi//lib/rbi/model.rb#1368 +# source://rbi//lib/rbi/model.rb#1378 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1381 + # source://rbi//lib/rbi/model.rb#1391 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#868 + # source://rbi//lib/rbi/printer.rb#870 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/index.rb#159 + # source://rbi//lib/rbi/index.rb#163 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1372 + # source://rbi//lib/rbi/model.rb#1382 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1387 + # source://rbi//lib/rbi/model.rb#1397 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#620 +# source://rbi//lib/rbi/model.rb#628 class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#631 + # source://rbi//lib/rbi/model.rb#639 sig do params( name: ::String, @@ -1594,19 +1657,19 @@ class RBI::RestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#642 + # source://rbi//lib/rbi/model.rb#650 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#481 + # source://rbi//lib/rbi/printer.rb#483 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#486 + # source://rbi//lib/rbi/printer.rb#488 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#637 + # source://rbi//lib/rbi/model.rb#645 sig { override.returns(::String) } def to_s; end end @@ -1655,7 +1718,7 @@ class RBI::Rewriters::Annotate < ::RBI::Visitor sig { params(node: ::RBI::NodeWithComments).void } def annotate_node(node); end - # source://rbi//lib/rbi/rewriters/annotate.rb#37 + # source://rbi//lib/rbi/rewriters/annotate.rb#38 sig { params(node: ::RBI::Node).returns(T::Boolean) } def root?(node); end end @@ -1720,20 +1783,20 @@ end # # source://rbi//lib/rbi/rewriters/merge_trees.rb#39 class RBI::Rewriters::Merge - # source://rbi//lib/rbi/rewriters/merge_trees.rb#66 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#75 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 sig { params(tree: ::RBI::Tree).void } def merge(tree); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#63 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 sig { returns(::RBI::MergeTree) } def tree; end class << self - # source://rbi//lib/rbi/rewriters/merge_trees.rb#51 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 sig do params( left: ::RBI::Tree, @@ -1749,19 +1812,19 @@ end # Used for logging / error displaying purpose # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#82 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 class RBI::Rewriters::Merge::Conflict < ::T::Struct const :left, ::RBI::Node - const :left_name, ::String const :right, ::RBI::Node + const :left_name, ::String const :right_name, ::String - # source://rbi//lib/rbi/rewriters/merge_trees.rb#91 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 sig { returns(::String) } def to_s; end class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -1797,19 +1860,19 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#241 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#243 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#248 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 sig { override.params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end private - # source://rbi//lib/rbi/rewriters/merge_trees.rb#269 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } def merge_conflict_trees(left, right); end end @@ -1823,9 +1886,9 @@ class RBI::Rewriters::Merge::Keep < ::T::Enum end end -# source://rbi//lib/rbi/rewriters/merge_trees.rb#96 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#103 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 sig do params( output: ::RBI::Tree, @@ -1836,33 +1899,33 @@ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor end def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#100 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } def conflicts; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#115 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private - # source://rbi//lib/rbi/rewriters/merge_trees.rb#164 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 sig { returns(::RBI::Tree) } def current_scope; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#181 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } def make_conflict_scope(left, right); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#188 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 sig { params(left: ::RBI::Node, right: ::RBI::Node).void } def make_conflict_tree(left, right); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#169 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } def previous_definition(node); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#200 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } def replace_scope_header(left, right); end end @@ -1926,38 +1989,38 @@ end # # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#67 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 sig { params(index: ::RBI::Index).void } def initialize(index); end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#64 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } def operations; end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#79 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#74 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 sig { params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end private - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#107 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } def can_delete_node?(node, previous); end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#125 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } def delete_node(node, previous); end - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#98 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } def previous_definition_for(node); end class << self - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#57 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 sig do params( tree: ::RBI::Tree, @@ -1968,17 +2031,17 @@ class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor end end -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#130 +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134 class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct const :deleted_node, ::RBI::Node const :duplicate_of, ::RBI::Node - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#137 + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 sig { returns(::String) } def to_s; end class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -1991,19 +2054,19 @@ class RBI::Rewriters::SortNodes < ::RBI::Visitor private - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#61 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } def group_rank(kind); end - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#82 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } def node_name(node); end - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#33 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 sig { params(node: ::RBI::Node).returns(::Integer) } def node_rank(node); end - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#92 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 sig { params(node: ::RBI::Node).void } def sort_node_names!(node); end end @@ -2012,46 +2075,43 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#172 +# source://rbi//lib/rbi/model.rb#176 class RBI::Scope < ::RBI::Tree include ::RBI::Indexable abstract! - # source://sorbet-runtime/0.5.10439/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # source://rbi//lib/rbi/printer.rb#240 + # source://rbi//lib/rbi/printer.rb#242 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end # Duplicate `self` scope without its body # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#350 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 sig { returns(T.self_type) } def dup_empty; end # @abstract # - # source://rbi//lib/rbi/model.rb#178 + # source://rbi//lib/rbi/model.rb#182 sig { abstract.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/index.rb#89 + # source://rbi//lib/rbi/index.rb#93 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/printer.rb#254 + # source://rbi//lib/rbi/printer.rb#256 sig { params(v: ::RBI::Printer).void } def print_body(v); end # @abstract # - # source://rbi//lib/rbi/printer.rb#251 + # source://rbi//lib/rbi/printer.rb#253 sig { abstract.params(v: ::RBI::Printer).void } def print_header(v); end - # source://rbi//lib/rbi/model.rb#181 + # source://rbi//lib/rbi/model.rb#185 sig { override.returns(::String) } def to_s; end end @@ -2069,37 +2129,37 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#617 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#631 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#640 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#651 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#621 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 sig { returns(::RBI::Scope) } def left; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#656 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 sig { override.returns(T::Boolean) } def oneline?; end # @return [Scope] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#621 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 def right; end end # Sends # -# source://rbi//lib/rbi/model.rb#919 +# source://rbi//lib/rbi/model.rb#927 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#937 + # source://rbi//lib/rbi/model.rb#945 sig do params( method: ::String, @@ -2111,44 +2171,44 @@ class RBI::Send < ::RBI::NodeWithComments end def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#945 + # source://rbi//lib/rbi/model.rb#953 sig { params(arg: ::RBI::Arg).void } def <<(arg); end - # source://rbi//lib/rbi/model.rb#950 + # source://rbi//lib/rbi/model.rb#958 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#590 + # source://rbi//lib/rbi/printer.rb#592 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#926 + # source://rbi//lib/rbi/model.rb#934 sig { returns(T::Array[::RBI::Arg]) } def args; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#519 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/index.rb#179 + # source://rbi//lib/rbi/index.rb#193 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#923 + # source://rbi//lib/rbi/model.rb#931 sig { returns(::String) } def method; end - # source://rbi//lib/rbi/model.rb#955 + # source://rbi//lib/rbi/model.rb#963 sig { returns(::String) } def to_s; end end # Sorbet's sigs # -# source://rbi//lib/rbi/model.rb#1019 +# source://rbi//lib/rbi/model.rb#1027 class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1051 + # source://rbi//lib/rbi/model.rb#1059 sig do params( params: T::Array[::RBI::SigParam], @@ -2165,139 +2225,109 @@ class RBI::Sig < ::RBI::Node end def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1076 + # source://rbi//lib/rbi/model.rb#1084 sig { params(param: ::RBI::SigParam).void } def <<(param); end - # source://rbi//lib/rbi/model.rb#1081 + # source://rbi//lib/rbi/model.rb#1089 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#631 + # source://rbi//lib/rbi/printer.rb#633 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1035 + # source://rbi//lib/rbi/model.rb#1043 sig { returns(T.nilable(::Symbol)) } def checked; end # @return [Symbol, nil] # - # source://rbi//lib/rbi/model.rb#1035 + # source://rbi//lib/rbi/model.rb#1043 def checked=(_arg0); end - # source://rbi//lib/rbi/printer.rb#654 + # source://rbi//lib/rbi/printer.rb#656 sig { returns(T::Boolean) } def inline_params?; end - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 sig { returns(T::Boolean) } def is_abstract; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_abstract=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_final; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_final=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_overridable; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_overridable=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_override; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1037 def is_override=(_arg0); end - # source://rbi//lib/rbi/printer.rb#649 + # source://rbi//lib/rbi/printer.rb#651 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/model.rb#1023 + # source://rbi//lib/rbi/model.rb#1031 sig { returns(T::Array[::RBI::SigParam]) } def params; end - # source://rbi//lib/rbi/model.rb#1026 + # source://rbi//lib/rbi/model.rb#1034 sig { returns(T.nilable(::String)) } def return_type; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1026 + # source://rbi//lib/rbi/model.rb#1034 def return_type=(_arg0); end - # source://rbi//lib/rbi/model.rb#1032 + # source://rbi//lib/rbi/model.rb#1040 sig { returns(T::Array[::String]) } def type_params; end private - # source://rbi//lib/rbi/printer.rb#696 + # source://rbi//lib/rbi/printer.rb#698 sig { params(v: ::RBI::Printer).void } def print_as_block(v); end - # source://rbi//lib/rbi/printer.rb#672 + # source://rbi//lib/rbi/printer.rb#674 sig { params(v: ::RBI::Printer).void } def print_as_line(v); end - # source://rbi//lib/rbi/printer.rb#661 + # source://rbi//lib/rbi/printer.rb#663 sig { returns(T::Array[::String]) } def sig_modifiers; end end -# source://rbi//lib/rbi/parser.rb#635 -class RBI::SigBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#649 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#646 - sig { returns(::RBI::Sig) } - def current; end - - # @return [Sig] - # - # source://rbi//lib/rbi/parser.rb#646 - def current=(_arg0); end - - # source://rbi//lib/rbi/parser.rb#655 - sig { override.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#664 - sig { params(node: ::AST::Node).void } - def visit_send(node); end - - class << self - # source://rbi//lib/rbi/parser.rb#639 - sig { params(node: ::AST::Node).returns(::RBI::Sig) } - def build(node); end - end -end - -# source://rbi//lib/rbi/model.rb#1089 +# source://rbi//lib/rbi/model.rb#1098 class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1104 + # source://rbi//lib/rbi/model.rb#1113 sig do params( name: ::String, @@ -2309,35 +2339,35 @@ class RBI::SigParam < ::RBI::NodeWithComments end def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1121 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#749 + # source://rbi//lib/rbi/printer.rb#751 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#762 + # source://rbi//lib/rbi/printer.rb#764 sig { returns(T::Array[::String]) } def comments_lines; end - # source://rbi//lib/rbi/model.rb#1093 + # source://rbi//lib/rbi/model.rb#1102 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/printer.rb#754 + # source://rbi//lib/rbi/printer.rb#756 sig { params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end # @return [String] # - # source://rbi//lib/rbi/model.rb#1093 + # source://rbi//lib/rbi/model.rb#1102 def type; end end -# source://rbi//lib/rbi/model.rb#245 +# source://rbi//lib/rbi/model.rb#251 class RBI::SingletonClass < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#255 + # source://rbi//lib/rbi/model.rb#261 sig do params( loc: T.nilable(::RBI::Loc), @@ -2347,18 +2377,18 @@ class RBI::SingletonClass < ::RBI::Scope end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#261 + # source://rbi//lib/rbi/model.rb#267 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/printer.rb#319 + # source://rbi//lib/rbi/printer.rb#321 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end -# source://rbi//lib/rbi/model.rb#266 +# source://rbi//lib/rbi/model.rb#272 class RBI::Struct < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#288 + # source://rbi//lib/rbi/model.rb#294 sig do params( name: ::String, @@ -2371,51 +2401,51 @@ class RBI::Struct < ::RBI::Scope end def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#388 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#297 + # source://rbi//lib/rbi/model.rb#303 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#276 + # source://rbi//lib/rbi/model.rb#282 sig { returns(T::Boolean) } def keyword_init; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#276 + # source://rbi//lib/rbi/model.rb#282 def keyword_init=(_arg0); end - # source://rbi//lib/rbi/model.rb#273 + # source://rbi//lib/rbi/model.rb#279 sig { returns(T::Array[::Symbol]) } def members; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#273 + # source://rbi//lib/rbi/model.rb#279 def members=(_arg0); end - # source://rbi//lib/rbi/model.rb#270 + # source://rbi//lib/rbi/model.rb#276 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#270 + # source://rbi//lib/rbi/model.rb#276 def name=(_arg0); end - # source://rbi//lib/rbi/printer.rb#298 + # source://rbi//lib/rbi/printer.rb#300 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end # Sorbet's T::Enum # -# source://rbi//lib/rbi/model.rb#1230 +# source://rbi//lib/rbi/model.rb#1239 class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1241 + # source://rbi//lib/rbi/model.rb#1250 sig do params( name: ::String, @@ -2427,11 +2457,11 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1247 +# source://rbi//lib/rbi/model.rb#1256 class RBI::TEnumBlock < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1261 + # source://rbi//lib/rbi/model.rb#1270 sig do params( names: T::Array[::String], @@ -2442,40 +2472,40 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments end def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1273 + # source://rbi//lib/rbi/model.rb#1282 sig { params(name: ::String).void } def <<(name); end - # source://rbi//lib/rbi/printer.rb#793 + # source://rbi//lib/rbi/printer.rb#795 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1268 + # source://rbi//lib/rbi/model.rb#1277 sig { returns(T::Boolean) } def empty?; end - # source://rbi//lib/rbi/index.rb#209 + # source://rbi//lib/rbi/index.rb#223 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#546 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#1251 + # source://rbi//lib/rbi/model.rb#1260 sig { returns(T::Array[::String]) } def names; end - # source://rbi//lib/rbi/model.rb#1278 + # source://rbi//lib/rbi/model.rb#1287 sig { override.returns(::String) } def to_s; end end # Sorbet's T::Struct # -# source://rbi//lib/rbi/model.rb#1119 +# source://rbi//lib/rbi/model.rb#1128 class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1130 + # source://rbi//lib/rbi/model.rb#1139 sig do params( name: ::String, @@ -2487,11 +2517,11 @@ class RBI::TStruct < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1168 +# source://rbi//lib/rbi/model.rb#1177 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1181 + # source://rbi//lib/rbi/model.rb#1190 sig do params( name: ::String, @@ -2504,30 +2534,30 @@ class RBI::TStructConst < ::RBI::TStructField end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#537 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#547 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1187 + # source://rbi//lib/rbi/model.rb#1196 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/index.rb#189 + # source://rbi//lib/rbi/index.rb#203 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1193 + # source://rbi//lib/rbi/model.rb#1202 sig { override.returns(::String) } def to_s; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#1136 +# source://rbi//lib/rbi/model.rb#1145 class RBI::TStructField < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#1157 + # source://rbi//lib/rbi/model.rb#1166 sig do params( name: ::String, @@ -2539,54 +2569,54 @@ class RBI::TStructField < ::RBI::NodeWithComments end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/printer.rb#771 + # source://rbi//lib/rbi/printer.rb#773 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#528 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#538 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1146 + # source://rbi//lib/rbi/model.rb#1155 sig { returns(T.nilable(::String)) } def default; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1146 + # source://rbi//lib/rbi/model.rb#1155 def default=(_arg0); end # @abstract # - # source://rbi//lib/rbi/model.rb#1165 + # source://rbi//lib/rbi/model.rb#1174 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#1143 + # source://rbi//lib/rbi/model.rb#1152 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1143 + # source://rbi//lib/rbi/model.rb#1152 def name=(_arg0); end # @return [String] # - # source://rbi//lib/rbi/model.rb#1143 + # source://rbi//lib/rbi/model.rb#1152 def type; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1143 + # source://rbi//lib/rbi/model.rb#1152 def type=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1198 +# source://rbi//lib/rbi/model.rb#1207 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1211 + # source://rbi//lib/rbi/model.rb#1220 sig do params( name: ::String, @@ -2599,26 +2629,26 @@ class RBI::TStructProp < ::RBI::TStructField end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#559 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#570 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1217 + # source://rbi//lib/rbi/model.rb#1226 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/index.rb#199 + # source://rbi//lib/rbi/index.rb#213 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1223 + # source://rbi//lib/rbi/model.rb#1232 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#102 +# source://rbi//lib/rbi/model.rb#106 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#115 + # source://rbi//lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -2628,11 +2658,11 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#122 + # source://rbi//lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi//lib/rbi/printer.rb#224 + # source://rbi//lib/rbi/printer.rb#226 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end @@ -2640,11 +2670,11 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/annotate.rb#48 + # source://rbi//lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2654,43 +2684,44 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#45 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#55 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#55 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#50 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#50 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#88 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, parameters: T::Array[::RBI::TypedParam], return_type: ::String, class_method: T::Boolean, - visibility: ::RBI::Visibility + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] ).void end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#60 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#25 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#25 sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_module(name, &block); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#9 - sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).void } + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#9 + sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2703,11 +2734,11 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/deannotate.rb#40 + # source://rbi//lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi//lib/rbi/model.rb#128 + # source://rbi//lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end @@ -2715,11 +2746,11 @@ class RBI::Tree < ::RBI::NodeWithComments sig { void } def group_nodes!; end - # source://rbi//lib/rbi/index.rb#64 + # source://rbi//lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#318 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -2730,155 +2761,42 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#45 + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#35 + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi//lib/rbi/model.rb#106 + # source://rbi//lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi//lib/rbi/printer.rb#231 + # source://rbi//lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#105 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end private - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#108 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#116 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca/0.10.1/lib/tapioca/rbi_ext/model.rb#103 + # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#111 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://rbi//lib/rbi/parser.rb#156 -class RBI::TreeBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#172 - sig do - params( - file: ::String, - comments: T::Array[::Parser::Source::Comment], - nodes_comments_assoc: T::Hash[::Parser::Source::Map, T::Array[::Parser::Source::Comment]] - ).void - end - def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/parser.rb#163 - sig { returns(T.nilable(::AST::Node)) } - def last_node; end - - # source://rbi//lib/rbi/parser.rb#187 - sig { void } - def post_process; end - - # source://rbi//lib/rbi/parser.rb#160 - sig { returns(::RBI::Tree) } - def tree; end - - # source://rbi//lib/rbi/parser.rb#193 - sig { override.params(node: T.nilable(::Object)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/parser.rb#546 - sig { void } - def assoc_dangling_comments; end - - # source://rbi//lib/rbi/parser.rb#527 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/parser.rb#532 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # source://rbi//lib/rbi/parser.rb#539 - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end - - # source://rbi//lib/rbi/parser.rb#516 - sig { params(node: ::AST::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # source://rbi//lib/rbi/parser.rb#511 - sig { params(node: ::AST::Node).returns(::RBI::Loc) } - def node_loc(node); end - - # source://rbi//lib/rbi/parser.rb#402 - sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } - def parse_block(node); end - - # source://rbi//lib/rbi/parser.rb#249 - sig { params(node: ::AST::Node).returns(::RBI::Node) } - def parse_const_assign(node); end - - # source://rbi//lib/rbi/parser.rb#263 - sig { params(node: ::AST::Node).returns(::RBI::Method) } - def parse_def(node); end - - # source://rbi//lib/rbi/parser.rb#486 - sig { params(node: ::AST::Node).returns(::RBI::TEnumBlock) } - def parse_enum(node); end - - # source://rbi//lib/rbi/parser.rb#290 - sig { params(node: ::AST::Node).returns(::RBI::Param) } - def parse_param(node); end - - # source://rbi//lib/rbi/parser.rb#503 - sig { params(node: ::AST::Node).returns(::RBI::RequiresAncestor) } - def parse_requires_ancestor(node); end - - # source://rbi//lib/rbi/parser.rb#229 - sig { params(node: ::AST::Node).returns(::RBI::Scope) } - def parse_scope(node); end - - # source://rbi//lib/rbi/parser.rb#318 - sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } - def parse_send(node); end - - # source://rbi//lib/rbi/parser.rb#385 - sig { params(node: ::AST::Node).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # source://rbi//lib/rbi/parser.rb#479 - sig { params(node: ::AST::Node).returns(::RBI::Sig) } - def parse_sig(node); end - - # source://rbi//lib/rbi/parser.rb#424 - sig { params(node: ::AST::Node).returns(::RBI::Struct) } - def parse_struct(node); end - - # source://rbi//lib/rbi/parser.rb#463 - sig { params(node: ::AST::Node).returns([::String, ::String, T.nilable(::String)]) } - def parse_tstruct_prop(node); end - - # source://rbi//lib/rbi/parser.rb#564 - sig { void } - def separate_header_comments; end - - # source://rbi//lib/rbi/parser.rb#586 - sig { void } - def set_root_tree_loc; end - - # source://rbi//lib/rbi/parser.rb#418 - sig { params(node: ::AST::Node).returns(T::Boolean) } - def struct_definition?(node); end -end - -# source://rbi//lib/rbi/model.rb#1311 +# source://rbi//lib/rbi/model.rb#1320 class RBI::TypeMember < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1326 + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1335 sig do params( name: ::String, @@ -2890,25 +2808,29 @@ class RBI::TypeMember < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/printer.rb#810 + # source://rbi//lib/rbi/printer.rb#812 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1334 + # source://rbi//lib/rbi/model.rb#1343 sig { returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#1315 + # source://rbi//lib/rbi/index.rb#183 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1324 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1340 + # source://rbi//lib/rbi/model.rb#1350 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1315 + # source://rbi//lib/rbi/model.rb#1324 def value; end end @@ -2934,54 +2856,54 @@ RBI::VERSION = T.let(T.unsafe(nil), String) # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#833 +# source://rbi//lib/rbi/model.rb#841 class RBI::Visibility < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#843 + # source://rbi//lib/rbi/model.rb#851 sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#849 + # source://rbi//lib/rbi/model.rb#857 sig { params(other: ::RBI::Visibility).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/printer.rb#577 + # source://rbi//lib/rbi/printer.rb#579 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#864 + # source://rbi//lib/rbi/model.rb#872 sig { returns(T::Boolean) } def private?; end - # source://rbi//lib/rbi/model.rb#859 + # source://rbi//lib/rbi/model.rb#867 sig { returns(T::Boolean) } def protected?; end - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#862 sig { returns(T::Boolean) } def public?; end - # source://rbi//lib/rbi/model.rb#840 + # source://rbi//lib/rbi/model.rb#848 sig { returns(::Symbol) } def visibility; end end -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#51 +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 class RBI::VisibilityGroup < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#58 + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 sig { params(visibility: ::RBI::Visibility).void } def initialize(visibility); end - # source://rbi//lib/rbi/printer.rb#846 + # source://rbi//lib/rbi/printer.rb#848 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/printer.rb#859 + # source://rbi//lib/rbi/printer.rb#861 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#55 + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 sig { returns(::RBI::Visibility) } def visibility; end end @@ -2992,9 +2914,6 @@ end class RBI::Visitor abstract! - # source://sorbet-runtime/0.5.10439/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - # @abstract # # source://rbi//lib/rbi/visitor.rb#12 diff --git a/sorbet/rbi/gems/simplecov-html@0.12.3.rbi b/sorbet/rbi/gems/simplecov-html@0.12.3.rbi new file mode 100644 index 0000000..c00ae17 --- /dev/null +++ b/sorbet/rbi/gems/simplecov-html@0.12.3.rbi @@ -0,0 +1,216 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `simplecov-html` gem. +# Please instead update this file by running `bin/tapioca gem simplecov-html`. + +# source://simplecov-html//lib/simplecov-html.rb#16 +module SimpleCov + class << self + # source://simplecov/0.22.0/lib/simplecov.rb#174 + def at_exit_behavior; end + + # source://simplecov/0.22.0/lib/simplecov.rb#170 + def clear_result; end + + # source://simplecov/0.22.0/lib/simplecov.rb#86 + def collate(result_filenames, profile = T.unsafe(nil), ignore_timeout: T.unsafe(nil), &block); end + + # source://simplecov/0.22.0/lib/simplecov.rb#223 + def exit_and_report_previous_error(exit_status); end + + # source://simplecov/0.22.0/lib/simplecov.rb#200 + def exit_status_from_exception; end + + # source://simplecov/0.22.0/lib/simplecov.rb#28 + def external_at_exit; end + + # source://simplecov/0.22.0/lib/simplecov.rb#28 + def external_at_exit=(_arg0); end + + # source://simplecov/0.22.0/lib/simplecov.rb#28 + def external_at_exit?; end + + # source://simplecov/0.22.0/lib/simplecov.rb#131 + def filtered(files); end + + # source://simplecov/0.22.0/lib/simplecov.rb#268 + def final_result_process?; end + + # source://simplecov/0.22.0/lib/simplecov.rb#142 + def grouped(files); end + + # source://simplecov/0.22.0/lib/simplecov.rb#162 + def load_adapter(name); end + + # source://simplecov/0.22.0/lib/simplecov.rb#158 + def load_profile(name); end + + # source://simplecov/0.22.0/lib/simplecov.rb#24 + def pid; end + + # source://simplecov/0.22.0/lib/simplecov.rb#24 + def pid=(_arg0); end + + # source://simplecov/0.22.0/lib/simplecov.rb#213 + def previous_error?(error_exit_status); end + + # source://simplecov/0.22.0/lib/simplecov.rb#248 + def process_result(result); end + + # source://simplecov/0.22.0/lib/simplecov.rb#233 + def process_results_and_report_error; end + + # source://simplecov/0.22.0/lib/simplecov.rb#229 + def ready_to_process_results?; end + + # source://simplecov/0.22.0/lib/simplecov.rb#101 + def result; end + + # source://simplecov/0.22.0/lib/simplecov.rb#124 + def result?; end + + # source://simplecov/0.22.0/lib/simplecov.rb#256 + def result_exit_status(result); end + + # source://simplecov/0.22.0/lib/simplecov.rb#296 + def round_coverage(coverage); end + + # source://simplecov/0.22.0/lib/simplecov.rb#186 + def run_exit_tasks!; end + + # source://simplecov/0.22.0/lib/simplecov.rb#24 + def running; end + + # source://simplecov/0.22.0/lib/simplecov.rb#24 + def running=(_arg0); end + + # source://simplecov/0.22.0/lib/simplecov.rb#48 + def start(profile = T.unsafe(nil), &block); end + + # source://simplecov/0.22.0/lib/simplecov.rb#276 + def wait_for_other_processes; end + + # source://simplecov/0.22.0/lib/simplecov.rb#285 + def write_last_run(result); end + + private + + # source://simplecov/0.22.0/lib/simplecov.rb#399 + def adapt_coverage_result; end + + # source://simplecov/0.22.0/lib/simplecov.rb#371 + def add_not_loaded_files(result); end + + # source://simplecov/0.22.0/lib/simplecov.rb#302 + def initial_setup(profile, &block); end + + # source://simplecov/0.22.0/lib/simplecov.rb#363 + def lookup_corresponding_ruby_coverage_name(criterion); end + + # source://simplecov/0.22.0/lib/simplecov.rb#425 + def make_parallel_tests_available; end + + # source://simplecov/0.22.0/lib/simplecov.rb#434 + def probably_running_parallel_tests?; end + + # source://simplecov/0.22.0/lib/simplecov.rb#388 + def process_coverage_result; end + + # source://simplecov/0.22.0/lib/simplecov.rb#410 + def remove_useless_results; end + + # source://simplecov/0.22.0/lib/simplecov.rb#420 + def result_with_not_loaded_files; end + + # source://simplecov/0.22.0/lib/simplecov.rb#314 + def start_coverage_measurement; end + + # source://simplecov/0.22.0/lib/simplecov.rb#349 + def start_coverage_with_criteria; end + end +end + +# source://simplecov-html//lib/simplecov-html.rb#17 +module SimpleCov::Formatter + class << self + # source://simplecov/0.22.0/lib/simplecov/default_formatter.rb#7 + def from_env(env); end + end +end + +# source://simplecov-html//lib/simplecov-html.rb#18 +class SimpleCov::Formatter::HTMLFormatter + # @return [HTMLFormatter] a new instance of HTMLFormatter + # + # source://simplecov-html//lib/simplecov-html.rb#19 + def initialize; end + + # @return [Boolean] + # + # source://simplecov-html//lib/simplecov-html.rb#38 + def branchable_result?; end + + # source://simplecov-html//lib/simplecov-html.rb#23 + def format(result); end + + # @return [Boolean] + # + # source://simplecov-html//lib/simplecov-html.rb#45 + def line_status?(source_file, line); end + + # source://simplecov-html//lib/simplecov-html.rb#34 + def output_message(result); end + + private + + # source://simplecov-html//lib/simplecov-html.rb#64 + def asset_output_path; end + + # source://simplecov-html//lib/simplecov-html.rb#72 + def assets_path(name); end + + # source://simplecov-html//lib/simplecov-html.rb#97 + def coverage_css_class(covered_percent); end + + # source://simplecov-html//lib/simplecov-html.rb#93 + def covered_percent(percent); end + + # Returns a table containing the given source files + # + # source://simplecov-html//lib/simplecov-html.rb#84 + def formatted_file_list(title, source_files); end + + # Returns the html for the given source_file + # + # source://simplecov-html//lib/simplecov-html.rb#77 + def formatted_source_file(source_file); end + + # Return a (kind of) unique id for the source file given. Uses SHA1 on path for the id + # + # source://simplecov-html//lib/simplecov-html.rb#118 + def id(source_file); end + + # source://simplecov-html//lib/simplecov-html.rb#130 + def link_to_source_file(source_file); end + + # source://simplecov-html//lib/simplecov-html.rb#60 + def output_path; end + + # source://simplecov-html//lib/simplecov-html.rb#126 + def shortened_filename(source_file); end + + # source://simplecov-html//lib/simplecov-html.rb#107 + def strength_css_class(covered_strength); end + + # Returns the an erb instance for the template of given name + # + # source://simplecov-html//lib/simplecov-html.rb#56 + def template(name); end + + # source://simplecov-html//lib/simplecov-html.rb#122 + def timeago(time); end +end + +# source://simplecov-html//lib/simplecov-html/version.rb#6 +SimpleCov::Formatter::HTMLFormatter::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/simplecov@0.22.0.rbi b/sorbet/rbi/gems/simplecov@0.22.0.rbi new file mode 100644 index 0000000..0778878 --- /dev/null +++ b/sorbet/rbi/gems/simplecov@0.22.0.rbi @@ -0,0 +1,2148 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `simplecov` gem. +# Please instead update this file by running `bin/tapioca gem simplecov`. + +# Code coverage for ruby. Please check out README for a full introduction. +# +# source://simplecov//lib/simplecov.rb#22 +module SimpleCov + extend ::SimpleCov::Configuration + + class << self + # source://simplecov//lib/simplecov.rb#174 + def at_exit_behavior; end + + # Clear out the previously cached .result. Primarily useful in testing + # + # source://simplecov//lib/simplecov.rb#170 + def clear_result; end + + # Collate a series of SimpleCov result files into a single SimpleCov output. + # + # You can optionally specify configuration with a block: + # SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"] + # OR + # SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"], 'rails' # using rails profile + # OR + # SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"] do + # add_filter 'test' + # end + # OR + # SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"], 'rails' do + # add_filter 'test' + # end + # + # Please check out the RDoc for SimpleCov::Configuration to find about + # available config options, or checkout the README for more in-depth + # information about coverage collation + # + # By default `collate` ignores the merge_timeout so all results of all files specified will be + # merged together. If you want to honor the merge_timeout then provide the keyword argument + # `ignore_timeout: false`. + # + # source://simplecov//lib/simplecov.rb#86 + def collate(result_filenames, profile = T.unsafe(nil), ignore_timeout: T.unsafe(nil), &block); end + + # Thinking: Move this behavior earlier so if there was an error we do nothing? + # + # @api private + # + # source://simplecov//lib/simplecov.rb#223 + def exit_and_report_previous_error(exit_status); end + + # Returns the exit status from the exit exception + # + # @api private + # + # source://simplecov//lib/simplecov.rb#200 + def exit_status_from_exception; end + + # Basically, should we take care of at_exit behavior or something else? + # Used by the minitest plugin. See lib/minitest/simplecov_plugin.rb + # + # source://simplecov//lib/simplecov.rb#28 + def external_at_exit; end + + # Basically, should we take care of at_exit behavior or something else? + # Used by the minitest plugin. See lib/minitest/simplecov_plugin.rb + # + # source://simplecov//lib/simplecov.rb#28 + def external_at_exit=(_arg0); end + + # Basically, should we take care of at_exit behavior or something else? + # Used by the minitest plugin. See lib/minitest/simplecov_plugin.rb + # + # source://simplecov//lib/simplecov.rb#28 + def external_at_exit?; end + + # Applies the configured filters to the given array of SimpleCov::SourceFile items + # + # source://simplecov//lib/simplecov.rb#131 + def filtered(files); end + + # @api private + # @return [Boolean] + # + # source://simplecov//lib/simplecov.rb#268 + def final_result_process?; end + + # Applies the configured groups to the given array of SimpleCov::SourceFile items + # + # source://simplecov//lib/simplecov.rb#142 + def grouped(files); end + + # source://simplecov//lib/simplecov.rb#162 + def load_adapter(name); end + + # Applies the profile of given name on SimpleCov configuration + # + # source://simplecov//lib/simplecov.rb#158 + def load_profile(name); end + + # Returns the value of attribute pid. + # + # source://simplecov//lib/simplecov.rb#24 + def pid; end + + # Sets the attribute pid + # + # @param value the value to set the attribute pid to. + # + # source://simplecov//lib/simplecov.rb#24 + def pid=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://simplecov//lib/simplecov.rb#213 + def previous_error?(error_exit_status); end + + # Usage: + # exit_status = SimpleCov.process_result(SimpleCov.result, exit_status) + # + # @api private + # + # source://simplecov//lib/simplecov.rb#248 + def process_result(result); end + + # source://simplecov//lib/simplecov.rb#233 + def process_results_and_report_error; end + + # @api private + # @return [Boolean] + # + # source://simplecov//lib/simplecov.rb#229 + def ready_to_process_results?; end + + # Returns the result for the current coverage run, merging it across test suites + # from cache using SimpleCov::ResultMerger if use_merging is activated (default) + # + # source://simplecov//lib/simplecov.rb#101 + def result; end + + # Returns nil if the result has not been computed + # Otherwise, returns the result + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov.rb#124 + def result?; end + + # source://simplecov//lib/simplecov.rb#256 + def result_exit_status(result); end + + # Rounding down to be extra strict, see #679 + # + # @api private + # + # source://simplecov//lib/simplecov.rb#296 + def round_coverage(coverage); end + + # Called from at_exit block + # + # @api private + # + # source://simplecov//lib/simplecov.rb#186 + def run_exit_tasks!; end + + # Returns the value of attribute running. + # + # source://simplecov//lib/simplecov.rb#24 + def running; end + + # Sets the attribute running + # + # @param value the value to set the attribute running to. + # + # source://simplecov//lib/simplecov.rb#24 + def running=(_arg0); end + + # Sets up SimpleCov to run against your project. + # You can optionally specify a profile to use as well as configuration with a block: + # SimpleCov.start + # OR + # SimpleCov.start 'rails' # using rails profile + # OR + # SimpleCov.start do + # add_filter 'test' + # end + # OR + # SimpleCov.start 'rails' do + # add_filter 'test' + # end + # + # Please check out the RDoc for SimpleCov::Configuration to find about available config options + # + # source://simplecov//lib/simplecov.rb#48 + def start(profile = T.unsafe(nil), &block); end + + # @api private + # + # source://simplecov//lib/simplecov.rb#276 + def wait_for_other_processes; end + + # @api private + # + # source://simplecov//lib/simplecov.rb#285 + def write_last_run(result); end + + private + + # Unite the result so it wouldn't matter what coverage type was called + # + # @return [Hash] + # + # source://simplecov//lib/simplecov.rb#399 + def adapt_coverage_result; end + + # Finds files that were to be tracked but were not loaded and initializes + # the line-by-line coverage to zero (if relevant) or nil (comments / whitespace etc). + # + # source://simplecov//lib/simplecov.rb#371 + def add_not_loaded_files(result); end + + # source://simplecov//lib/simplecov.rb#302 + def initial_setup(profile, &block); end + + # source://simplecov//lib/simplecov.rb#363 + def lookup_corresponding_ruby_coverage_name(criterion); end + + # parallel_tests isn't always available, see: https://github.com/grosser/parallel_tests/issues/772 + # + # source://simplecov//lib/simplecov.rb#425 + def make_parallel_tests_available; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov.rb#434 + def probably_running_parallel_tests?; end + + # Call steps that handle process coverage result + # + # @return [Hash] + # + # source://simplecov//lib/simplecov.rb#388 + def process_coverage_result; end + + # Filter coverage result + # The result before filter also has result of coverage for files + # are not related to the project like loaded gems coverage. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov.rb#410 + def remove_useless_results; end + + # Initialize result with files that are not included by coverage + # and added inside the config block + # + # @return [Hash] + # + # source://simplecov//lib/simplecov.rb#420 + def result_with_not_loaded_files; end + + # Trigger Coverage.start depends on given config coverage_criterion + # + # With Positive branch it supports all coverage measurement types + # With Negative branch it supports only line coverage measurement type + # + # source://simplecov//lib/simplecov.rb#314 + def start_coverage_measurement; end + + # source://simplecov//lib/simplecov.rb#349 + def start_coverage_with_criteria; end + end +end + +# source://simplecov//lib/simplecov/filter.rb#77 +class SimpleCov::ArrayFilter < ::SimpleCov::Filter + # @return [ArrayFilter] a new instance of ArrayFilter + # + # source://simplecov//lib/simplecov/filter.rb#78 + def initialize(filter_argument); end + + # Returns true if any of the filters in the array match the given source file. + # Configure this Filter like StringFilter.new(['some/path', /^some_regex/, Proc.new {|src_file| ... }]) + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/filter.rb#88 + def matches?(source_files_list); end +end + +# source://simplecov//lib/simplecov/filter.rb#69 +class SimpleCov::BlockFilter < ::SimpleCov::Filter + # Returns true if the block given when initializing this filter with BlockFilter.new {|src_file| ... } + # returns true for the given source file. + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/filter.rb#72 + def matches?(source_file); end +end + +# Functionally for combining coverage results +# +# source://simplecov//lib/simplecov/combine.rb#6 +module SimpleCov::Combine + private + + # Combine two coverage based on the given combiner_module. + # + # Combiners should always be called through this interface, + # as it takes care of short-circuiting of one of the coverages is nil. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine.rb#16 + def combine(combiner_module, coverage_a, coverage_b); end + + # source://simplecov//lib/simplecov/combine.rb#22 + def empty_coverage?(coverage_a, coverage_b); end + + # source://simplecov//lib/simplecov/combine.rb#26 + def existing_coverage(coverage_a, coverage_b); end + + class << self + # Combine two coverage based on the given combiner_module. + # + # Combiners should always be called through this interface, + # as it takes care of short-circuiting of one of the coverages is nil. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine.rb#16 + def combine(combiner_module, coverage_a, coverage_b); end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/combine.rb#22 + def empty_coverage?(coverage_a, coverage_b); end + + # source://simplecov//lib/simplecov/combine.rb#26 + def existing_coverage(coverage_a, coverage_b); end + end +end + +# Combine different branch coverage results on single file. +# +# Should be called through `SimpleCov.combine`. +# +# source://simplecov//lib/simplecov/combine/branches_combiner.rb#9 +module SimpleCov::Combine::BranchesCombiner + private + + # Return merged branches or the existed brach if other is missing. + # + # Branches inside files are always same if they exist, the difference only in coverage count. + # Branch coverage report for any conditional case is built from hash, it's key is a condition and + # it's body is a hash << keys from condition and value is coverage rate >>. + # ex: branches =>{ [:if, 3, 8, 6, 8, 36] => {[:then, 4, 8, 6, 8, 12] => 1, [:else, 5, 8, 6, 8, 36]=>2}, other conditions...} + # We create copy of result and update it values depending on the combined branches coverage values. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/branches_combiner.rb#23 + def combine(coverage_a, coverage_b); end + + class << self + # Return merged branches or the existed brach if other is missing. + # + # Branches inside files are always same if they exist, the difference only in coverage count. + # Branch coverage report for any conditional case is built from hash, it's key is a condition and + # it's body is a hash << keys from condition and value is coverage rate >>. + # ex: branches =>{ [:if, 3, 8, 6, 8, 36] => {[:then, 4, 8, 6, 8, 12] => 1, [:else, 5, 8, 6, 8, 36]=>2}, other conditions...} + # We create copy of result and update it values depending on the combined branches coverage values. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/branches_combiner.rb#23 + def combine(coverage_a, coverage_b); end + end +end + +# Handle combining two coverage results for same file +# +# Should be called through `SimpleCov.combine`. +# +# source://simplecov//lib/simplecov/combine/files_combiner.rb#9 +module SimpleCov::Combine::FilesCombiner + private + + # Combines the results for 2 coverages of a file. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/files_combiner.rb#17 + def combine(coverage_a, coverage_b); end + + class << self + # Combines the results for 2 coverages of a file. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/files_combiner.rb#17 + def combine(coverage_a, coverage_b); end + end +end + +# Combine two different lines coverage results on same file +# +# Should be called through `SimpleCov.combine`. +# +# source://simplecov//lib/simplecov/combine/lines_combiner.rb#9 +module SimpleCov::Combine::LinesCombiner + private + + # source://simplecov//lib/simplecov/combine/lines_combiner.rb#12 + def combine(coverage_a, coverage_b); end + + # Return depends on coverage in a specific line + # + # Logic: + # + # => nil + 0 = nil + # => nil + nil = nil + # => int + int = int + # + # @param first_val [Integer || nil] + # @param second_val [Integer || nil] + # @return [Integer || nil] + # + # source://simplecov//lib/simplecov/combine/lines_combiner.rb#32 + def merge_line_coverage(first_val, second_val); end + + class << self + # source://simplecov//lib/simplecov/combine/lines_combiner.rb#12 + def combine(coverage_a, coverage_b); end + + # Return depends on coverage in a specific line + # + # Logic: + # + # => nil + 0 = nil + # => nil + nil = nil + # => int + int = int + # + # @param first_val [Integer || nil] + # @param second_val [Integer || nil] + # @return [Integer || nil] + # + # source://simplecov//lib/simplecov/combine/lines_combiner.rb#32 + def merge_line_coverage(first_val, second_val); end + end +end + +# There might be reports from different kinds of tests, +# e.g. RSpec and Cucumber. We need to combine their results +# into unified one. This class does that. +# To unite the results on file basis, it leverages +# the combine of lines and branches inside each file within given results. +# +# source://simplecov//lib/simplecov/combine/results_combiner.rb#10 +module SimpleCov::Combine::ResultsCombiner + private + + # Combine process explanation + # => ResultCombiner: define all present files between results and start combine on file level. + # ==> FileCombiner: collect result of next combine levels lines and branches. + # ===> LinesCombiner: combine lines results. + # ===> BranchesCombiner: combine branches results. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/results_combiner.rb#22 + def combine(*results); end + + # Combine two files coverage results + # + # @param coverage_a [Hash] + # @param coverage_b [Hash] + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/results_combiner.rb#55 + def combine_file_coverage(coverage_a, coverage_b); end + + # Manage combining results on files level + # + # @param combined_results [Hash] + # @param result [Hash] + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/results_combiner.rb#36 + def combine_result_sets(combined_results, result); end + + class << self + # Combine process explanation + # => ResultCombiner: define all present files between results and start combine on file level. + # ==> FileCombiner: collect result of next combine levels lines and branches. + # ===> LinesCombiner: combine lines results. + # ===> BranchesCombiner: combine branches results. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/results_combiner.rb#22 + def combine(*results); end + + # Combine two files coverage results + # + # @param coverage_a [Hash] + # @param coverage_b [Hash] + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/results_combiner.rb#55 + def combine_file_coverage(coverage_a, coverage_b); end + + # Manage combining results on files level + # + # @param combined_results [Hash] + # @param result [Hash] + # @return [Hash] + # + # source://simplecov//lib/simplecov/combine/results_combiner.rb#36 + def combine_result_sets(combined_results, result); end + end +end + +# Helper that tries to find out what test suite is running (for SimpleCov.command_name) +# +# source://simplecov//lib/simplecov/command_guesser.rb#7 +module SimpleCov::CommandGuesser + class << self + # source://simplecov//lib/simplecov/command_guesser.rb#16 + def guess; end + + # Storage for the original command line call that invoked the test suite. + # This has got to be stored as early as possible because i.e. rake and test/unit 2 + # have a habit of tampering with ARGV, which makes i.e. the automatic distinction + # between rails unit/functional/integration tests impossible without this cached + # item. + # + # source://simplecov//lib/simplecov/command_guesser.rb#14 + def original_run_command; end + + # Storage for the original command line call that invoked the test suite. + # This has got to be stored as early as possible because i.e. rake and test/unit 2 + # have a habit of tampering with ARGV, which makes i.e. the automatic distinction + # between rails unit/functional/integration tests impossible without this cached + # item. + # + # source://simplecov//lib/simplecov/command_guesser.rb#14 + def original_run_command=(_arg0); end + + private + + # source://simplecov//lib/simplecov/command_guesser.rb#31 + def from_command_line_options; end + + # source://simplecov//lib/simplecov/command_guesser.rb#46 + def from_defined_constants; end + + # source://simplecov//lib/simplecov/command_guesser.rb#22 + def from_env; end + end +end + +# Bundles the configuration options used for SimpleCov. All methods +# defined here are usable from SimpleCov directly. Please check out +# SimpleCov documentation for further info. +# +# source://simplecov//lib/simplecov/configuration.rb#13 +module SimpleCov::Configuration + # source://simplecov//lib/simplecov/configuration.rb#161 + def adapters; end + + # Add a filter to the processing chain. + # There are four ways to define a filter: + # + # * as a String that will then be matched against all source files' file paths, + # SimpleCov.add_filter 'app/models' # will reject all your models + # * as a block which will be passed the source file in question and should either + # return a true or false value, depending on whether the file should be removed + # SimpleCov.add_filter do |src_file| + # File.basename(src_file.filename) == 'environment.rb' + # end # Will exclude environment.rb files from the results + # * as an array of strings that are matched against all sorce files' file + # paths and then ignored (basically string filter multiple times) + # SimpleCov.add_filter ['app/models', 'app/helpers'] # ignores both dirs + # * as an instance of a subclass of SimpleCov::Filter. See the documentation there + # on how to define your own filter classes + # + # source://simplecov//lib/simplecov/configuration.rb#367 + def add_filter(filter_argument = T.unsafe(nil), &filter_proc); end + + # Define a group for files. Works similar to add_filter, only that the first + # argument is the desired group name and files PASSING the filter end up in the group + # (while filters exclude when the filter is applicable). + # + # source://simplecov//lib/simplecov/configuration.rb#376 + def add_group(group_name, filter_argument = T.unsafe(nil), &filter_proc); end + + # Gets or sets the behavior to process coverage results. + # + # By default, it will call SimpleCov.result.format! + # + # Configure with: + # + # SimpleCov.at_exit do + # puts "Coverage done" + # SimpleCov.result.format! + # end + # + # source://simplecov//lib/simplecov/configuration.rb#193 + def at_exit(&block); end + + # Gets or sets the behavior to start a new forked Process. + # + # By default, it will add " (Process #{pid})" to the command_name, and start SimpleCov in quiet mode + # + # Configure with: + # + # SimpleCov.at_fork do |pid| + # SimpleCov.start do + # # This needs a unique name so it won't be ovewritten + # SimpleCov.command_name "#{SimpleCov.command_name} (subprocess: #{pid})" + # # be quiet, the parent process will be in charge of using the regular formatter and checking coverage totals + # SimpleCov.print_error_status = false + # SimpleCov.formatter SimpleCov::Formatter::SimpleFormatter + # SimpleCov.minimum_coverage 0 + # # start + # SimpleCov.start + # end + # end + # + # source://simplecov//lib/simplecov/configuration.rb#233 + def at_fork(&block); end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#428 + def branch_coverage?; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#443 + def branch_coverage_supported?; end + + # source://simplecov//lib/simplecov/configuration.rb#424 + def clear_coverage_criteria; end + + # The name of the command (a.k.a. Test Suite) currently running. Used for result + # merging and caching. It first tries to make a guess based upon the command line + # arguments the current test suite is running on and should automatically detect + # unit tests, functional tests, integration tests, rpsec and cucumber and label + # them properly. If it fails to recognize the current command, the command name + # is set to the shell command that the current suite is running on. + # + # You can specify it manually with SimpleCov.command_name("test:units") - please + # also check out the corresponding section in README.rdoc + # + # source://simplecov//lib/simplecov/configuration.rb#87 + def command_name(name = T.unsafe(nil)); end + + # Allows you to configure simplecov in a block instead of prepending SimpleCov to all config methods + # you're calling. + # + # SimpleCov.configure do + # add_filter 'foobar' + # end + # + # This is equivalent to SimpleCov.add_filter 'foobar' and thus makes it easier to set a bunch of configure + # options at once. + # + # source://simplecov//lib/simplecov/configuration.rb#177 + def configure(&block); end + + # source://simplecov//lib/simplecov/configuration.rb#416 + def coverage_criteria; end + + # Define which coverage criterion should be evaluated. + # + # Possible coverage criteria: + # * :line - coverage based on lines aka has this line been executed? + # * :branch - coverage based on branches aka has this branch (think conditions) been executed? + # + # If not set the default is `:line` + # + # @param criterion [Symbol] + # + # source://simplecov//lib/simplecov/configuration.rb#393 + def coverage_criterion(criterion = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#420 + def coverage_criterion_enabled?(criterion); end + + # The name of the output and cache directory. Defaults to 'coverage' + # + # Configure with SimpleCov.coverage_dir('cov') + # + # source://simplecov//lib/simplecov/configuration.rb#34 + def coverage_dir(dir = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#452 + def coverage_for_eval_enabled?; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#447 + def coverage_for_eval_supported?; end + + # Returns the full path to the output directory using SimpleCov.root + # and SimpleCov.coverage_dir, so you can adjust this by configuring those + # values. Will create the directory if it's missing + # + # source://simplecov//lib/simplecov/configuration.rb#46 + def coverage_path; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#432 + def coverage_start_arguments_supported?; end + + # source://simplecov//lib/simplecov/configuration.rb#401 + def enable_coverage(criterion); end + + # source://simplecov//lib/simplecov/configuration.rb#456 + def enable_coverage_for_eval; end + + # gets or sets the enabled_for_subprocess configuration + # when true, this will inject SimpleCov code into Process.fork + # + # source://simplecov//lib/simplecov/configuration.rb#202 + def enable_for_subprocesses(value = T.unsafe(nil)); end + + # gets the enabled_for_subprocess configuration + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#209 + def enabled_for_subprocesses?; end + + # Returns the list of configured filters. Add filters using SimpleCov.add_filter. + # + # source://simplecov//lib/simplecov/configuration.rb#74 + def filters; end + + # Sets the attribute filters + # + # @param value the value to set the attribute filters to. + # + # source://simplecov//lib/simplecov/configuration.rb#14 + def filters=(_arg0); end + + # Gets or sets the configured formatter. + # + # Configure with: SimpleCov.formatter(SimpleCov::Formatter::SimpleFormatter) + # + # source://simplecov//lib/simplecov/configuration.rb#98 + def formatter(formatter = T.unsafe(nil)); end + + # Sets the attribute formatter + # + # @param value the value to set the attribute formatter to. + # + # source://simplecov//lib/simplecov/configuration.rb#14 + def formatter=(_arg0); end + + # Gets the configured formatters. + # + # source://simplecov//lib/simplecov/configuration.rb#117 + def formatters; end + + # Sets the configured formatters. + # + # source://simplecov//lib/simplecov/configuration.rb#110 + def formatters=(formatters); end + + # Returns the configured groups. Add groups using SimpleCov.add_group + # + # source://simplecov//lib/simplecov/configuration.rb#150 + def groups; end + + # Sets the attribute groups + # + # @param value the value to set the attribute groups to. + # + # source://simplecov//lib/simplecov/configuration.rb#14 + def groups=(_arg0); end + + # Defines the maximum coverage drop at once allowed for the testsuite to pass. + # SimpleCov will return non-zero if the coverage decreases by more than this threshold. + # + # Default is 100% (disabled) + # + # source://simplecov//lib/simplecov/configuration.rb#313 + def maximum_coverage_drop(coverage_drop = T.unsafe(nil)); end + + # Defines the maximum age (in seconds) of a resultset to still be included in merged results. + # i.e. If you run cucumber features, then later rake test, if the stored cucumber resultset is + # more seconds ago than specified here, it won't be taken into account when merging (and is also + # purged from the resultset cache) + # + # Of course, this only applies when merging is active (e.g. SimpleCov.use_merging is not false!) + # + # Default is 600 seconds (10 minutes) + # + # Configure with SimpleCov.merge_timeout(3600) # 1hr + # + # source://simplecov//lib/simplecov/configuration.rb#279 + def merge_timeout(seconds = T.unsafe(nil)); end + + # Defines the minimum overall coverage required for the testsuite to pass. + # SimpleCov will return non-zero if the current coverage is below this threshold. + # + # Default is 0% (disabled) + # + # source://simplecov//lib/simplecov/configuration.rb#290 + def minimum_coverage(coverage = T.unsafe(nil)); end + + # Defines the minimum coverage per file required for the testsuite to pass. + # SimpleCov will return non-zero if the current coverage of the least covered file + # is below this threshold. + # + # Default is 0% (disabled) + # + # source://simplecov//lib/simplecov/configuration.rb#330 + def minimum_coverage_by_file(coverage = T.unsafe(nil)); end + + # Certain code blocks (i.e. Ruby-implementation specific code) can be excluded from + # the coverage metrics by wrapping it inside # :nocov: comment blocks. The nocov token + # can be configured to be any other string using this. + # + # Configure with SimpleCov.nocov_token('skip') or it's alias SimpleCov.skip_token('skip') + # + # source://simplecov//lib/simplecov/configuration.rb#140 + def nocov_token(nocov_token = T.unsafe(nil)); end + + # source://simplecov//lib/simplecov/configuration.rb#407 + def primary_coverage(criterion = T.unsafe(nil)); end + + # Whether we should print non-success status codes. This can be + # configured with the #print_error_status= method. + # + # source://simplecov//lib/simplecov/configuration.rb#129 + def print_error_status; end + + # Sets the attribute print_error_status + # + # @param value the value to set the attribute print_error_status to. + # + # source://simplecov//lib/simplecov/configuration.rb#14 + def print_error_status=(_arg0); end + + # Returns the hash of available profiles + # + # source://simplecov//lib/simplecov/configuration.rb#157 + def profiles; end + + # Returns the project name - currently assuming the last dirname in + # the SimpleCov.root is this. + # + # source://simplecov//lib/simplecov/configuration.rb#251 + def project_name(new_name = T.unsafe(nil)); end + + # source://simplecov//lib/simplecov/configuration.rb#300 + def raise_on_invalid_coverage(coverage, coverage_setting); end + + # Refuses any coverage drop. That is, coverage is only allowed to increase. + # SimpleCov will return non-zero if the coverage decreases. + # + # source://simplecov//lib/simplecov/configuration.rb#344 + def refuse_coverage_drop(*criteria); end + + # The root for the project. This defaults to the + # current working directory. + # + # Configure with SimpleCov.root('/my/project/path') + # + # source://simplecov//lib/simplecov/configuration.rb#22 + def root(root = T.unsafe(nil)); end + + # Certain code blocks (i.e. Ruby-implementation specific code) can be excluded from + # the coverage metrics by wrapping it inside # :nocov: comment blocks. The nocov token + # can be configured to be any other string using this. + # + # Configure with SimpleCov.nocov_token('skip') or it's alias SimpleCov.skip_token('skip') + # + # source://simplecov//lib/simplecov/configuration.rb#140 + def skip_token(nocov_token = T.unsafe(nil)); end + + # Coverage results will always include files matched by this glob, whether + # or not they were explicitly required. Without this, un-required files + # will not be present in the final report. + # + # source://simplecov//lib/simplecov/configuration.rb#59 + def track_files(glob); end + + # Returns the glob that will be used to include files that were not + # explicitly required. + # + # source://simplecov//lib/simplecov/configuration.rb#67 + def tracked_files; end + + # Defines whether to use result merging so all your test suites (test:units, test:functionals, cucumber, ...) + # are joined and combined into a single coverage report + # + # source://simplecov//lib/simplecov/configuration.rb#262 + def use_merging(use = T.unsafe(nil)); end + + private + + # source://simplecov//lib/simplecov/configuration.rb#483 + def minimum_possible_coverage_exceeded(coverage_option); end + + # The actual filter processor. Not meant for direct use + # + # source://simplecov//lib/simplecov/configuration.rb#490 + def parse_filter(filter_argument = T.unsafe(nil), &filter_proc); end + + # source://simplecov//lib/simplecov/configuration.rb#466 + def raise_if_criterion_disabled(criterion); end + + # source://simplecov//lib/simplecov/configuration.rb#475 + def raise_if_criterion_unsupported(criterion); end +end + +# source://simplecov//lib/simplecov/configuration.rb#381 +SimpleCov::Configuration::DEFAULT_COVERAGE_CRITERION = T.let(T.unsafe(nil), Symbol) + +# source://simplecov//lib/simplecov/configuration.rb#380 +SimpleCov::Configuration::SUPPORTED_COVERAGE_CRITERIA = T.let(T.unsafe(nil), Array) + +# Holds the individual data of a coverage result. +# +# This is uniform across coverage criteria as they all have: +# +# * total - how many things to cover there are (total relevant loc/branches) +# * covered - how many of the coverables are hit +# * missed - how many of the coverables are missed +# * percent - percentage as covered/missed +# * strength - average hits per/coverable (will not exist for one shot lines format) +# +# source://simplecov//lib/simplecov/coverage_statistics.rb#13 +class SimpleCov::CoverageStatistics + # Requires only covered, missed and strength to be initialized. + # + # Other values are computed by this class. + # + # @return [CoverageStatistics] a new instance of CoverageStatistics + # + # source://simplecov//lib/simplecov/coverage_statistics.rb#34 + def initialize(covered:, missed:, total_strength: T.unsafe(nil)); end + + # Returns the value of attribute covered. + # + # source://simplecov//lib/simplecov/coverage_statistics.rb#14 + def covered; end + + # Returns the value of attribute missed. + # + # source://simplecov//lib/simplecov/coverage_statistics.rb#14 + def missed; end + + # Returns the value of attribute percent. + # + # source://simplecov//lib/simplecov/coverage_statistics.rb#14 + def percent; end + + # Returns the value of attribute strength. + # + # source://simplecov//lib/simplecov/coverage_statistics.rb#14 + def strength; end + + # Returns the value of attribute total. + # + # source://simplecov//lib/simplecov/coverage_statistics.rb#14 + def total; end + + private + + # source://simplecov//lib/simplecov/coverage_statistics.rb#44 + def compute_percent(covered, missed, total); end + + # source://simplecov//lib/simplecov/coverage_statistics.rb#50 + def compute_strength(total_strength, total); end + + class << self + # source://simplecov//lib/simplecov/coverage_statistics.rb#16 + def from(coverage_statistics); end + end +end + +# source://simplecov//lib/simplecov/exit_codes.rb#4 +module SimpleCov::ExitCodes; end + +# source://simplecov//lib/simplecov/exit_codes.rb#6 +SimpleCov::ExitCodes::EXCEPTION = T.let(T.unsafe(nil), Integer) + +# source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#5 +module SimpleCov::ExitCodes::ExitCodeHandling + private + + # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#8 + def call(result, coverage_limits:); end + + # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#20 + def coverage_checks(result, coverage_limits); end + + class << self + # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#8 + def call(result, coverage_limits:); end + + # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#20 + def coverage_checks(result, coverage_limits); end + end +end + +# source://simplecov//lib/simplecov/exit_codes.rb#8 +SimpleCov::ExitCodes::MAXIMUM_COVERAGE_DROP = T.let(T.unsafe(nil), Integer) + +# source://simplecov//lib/simplecov/exit_codes.rb#7 +SimpleCov::ExitCodes::MINIMUM_COVERAGE = T.let(T.unsafe(nil), Integer) + +# source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#5 +class SimpleCov::ExitCodes::MaximumCoverageDropCheck + # @return [MaximumCoverageDropCheck] a new instance of MaximumCoverageDropCheck + # + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#6 + def initialize(result, maximum_coverage_drop); end + + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#28 + def exit_code; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#11 + def failing?; end + + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#17 + def report; end + + private + + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#49 + def compute_coverage_drop_data; end + + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#42 + def coverage_drop_violations; end + + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#61 + def drop_percent(criterion); end + + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#73 + def last_coverage(criterion); end + + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#36 + def last_run; end + + # Returns the value of attribute maximum_coverage_drop. + # + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#34 + def maximum_coverage_drop; end + + # Returns the value of attribute result. + # + # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#34 + def result; end +end + +# if anyone says "max_coverage_drop 0.000000000000000001" I appologize. Please don't. +# +# source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#60 +SimpleCov::ExitCodes::MaximumCoverageDropCheck::MAX_DROP_ACCURACY = T.let(T.unsafe(nil), Integer) + +# source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#5 +class SimpleCov::ExitCodes::MinimumCoverageByFileCheck + # @return [MinimumCoverageByFileCheck] a new instance of MinimumCoverageByFileCheck + # + # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#6 + def initialize(result, minimum_coverage_by_file); end + + # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#26 + def exit_code; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#11 + def failing?; end + + # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#15 + def report; end + + private + + # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#41 + def compute_minimum_coverage_data; end + + # Returns the value of attribute minimum_coverage_by_file. + # + # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#32 + def minimum_coverage_by_file; end + + # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#34 + def minimum_violations; end + + # Returns the value of attribute result. + # + # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#32 + def result; end +end + +# source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#5 +class SimpleCov::ExitCodes::MinimumOverallCoverageCheck + # @return [MinimumOverallCoverageCheck] a new instance of MinimumOverallCoverageCheck + # + # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#6 + def initialize(result, minimum_coverage); end + + # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#26 + def exit_code; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#11 + def failing?; end + + # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#15 + def report; end + + private + + # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#38 + def calculate_minimum_violations; end + + # Returns the value of attribute minimum_coverage. + # + # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#32 + def minimum_coverage; end + + # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#34 + def minimum_violations; end + + # Returns the value of attribute result. + # + # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#32 + def result; end +end + +# source://simplecov//lib/simplecov/exit_codes.rb#5 +SimpleCov::ExitCodes::SUCCESS = T.let(T.unsafe(nil), Integer) + +# An array of SimpleCov SourceFile instances with additional collection helper +# methods for calculating coverage across them etc. +# +# source://simplecov//lib/simplecov/file_list.rb#6 +class SimpleCov::FileList + include ::Enumerable + extend ::Forwardable + + # @return [FileList] a new instance of FileList + # + # source://simplecov//lib/simplecov/file_list.rb#22 + def initialize(files); end + + # source://simplecov//lib/simplecov/file_list.rb#101 + def branch_covered_percent; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def count(*args, **_arg1, &block); end + + # source://simplecov//lib/simplecov/file_list.rb#26 + def coverage_statistics; end + + # source://simplecov//lib/simplecov/file_list.rb#30 + def coverage_statistics_by_file; end + + # Return total count of covered branches + # + # source://simplecov//lib/simplecov/file_list.rb#92 + def covered_branches; end + + # Returns the count of lines that have coverage + # + # source://simplecov//lib/simplecov/file_list.rb#35 + def covered_lines; end + + # Computes the coverage based upon lines covered and lines missed + # + # @return [Float] + # + # source://simplecov//lib/simplecov/file_list.rb#76 + def covered_percent; end + + # Computes the coverage based upon lines covered and lines missed for each file + # Returns an array with all coverage percentages + # + # source://simplecov//lib/simplecov/file_list.rb#60 + def covered_percentages; end + + # Computes the strength (hits / line) based upon lines covered and lines missed + # + # @return [Float] + # + # source://simplecov//lib/simplecov/file_list.rb#82 + def covered_strength; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def each(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def empty?(*args, **_arg1, &block); end + + # Finds the least covered file and returns that file's name + # + # source://simplecov//lib/simplecov/file_list.rb#65 + def least_covered_file; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def length(*args, **_arg1, &block); end + + # Returns the overall amount of relevant lines of code across all files in this list + # + # source://simplecov//lib/simplecov/file_list.rb#70 + def lines_of_code; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def map(*args, **_arg1, &block); end + + # Return total count of covered branches + # + # source://simplecov//lib/simplecov/file_list.rb#97 + def missed_branches; end + + # Returns the count of lines that have been missed + # + # source://simplecov//lib/simplecov/file_list.rb#40 + def missed_lines; end + + # Returns the count of lines that are not relevant for coverage + # + # source://simplecov//lib/simplecov/file_list.rb#45 + def never_lines; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def size(*args, **_arg1, &block); end + + # Returns the count of skipped lines + # + # source://simplecov//lib/simplecov/file_list.rb#52 + def skipped_lines; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def to_a(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def to_ary(*args, **_arg1, &block); end + + # Return total count of branches in all files + # + # source://simplecov//lib/simplecov/file_list.rb#87 + def total_branches; end + + private + + # source://simplecov//lib/simplecov/file_list.rb#114 + def compute_coverage_statistics; end + + # source://simplecov//lib/simplecov/file_list.rb#107 + def compute_coverage_statistics_by_file; end +end + +# Base filter class. Inherit from this to create custom filters, +# and overwrite the passes?(source_file) instance method +# +# # A sample class that rejects all source files. +# class StupidFilter < SimpleCov::Filter +# def passes?(source_file) +# false +# end +# end +# +# source://simplecov//lib/simplecov/filter.rb#15 +class SimpleCov::Filter + # @return [Filter] a new instance of Filter + # + # source://simplecov//lib/simplecov/filter.rb#18 + def initialize(filter_argument); end + + # Returns the value of attribute filter_argument. + # + # source://simplecov//lib/simplecov/filter.rb#16 + def filter_argument; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/filter.rb#22 + def matches?(_source_file); end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/filter.rb#26 + def passes?(source_file); end + + class << self + # source://simplecov//lib/simplecov/filter.rb#31 + def build_filter(filter_argument); end + + # source://simplecov//lib/simplecov/filter.rb#37 + def class_for_argument(filter_argument); end + end +end + +# TODO: Documentation on how to build your own formatters +# +# source://simplecov//lib/simplecov/formatter/multi_formatter.rb#4 +module SimpleCov::Formatter + class << self + # source://simplecov//lib/simplecov/default_formatter.rb#7 + def from_env(env); end + end +end + +# source://simplecov//lib/simplecov/formatter/multi_formatter.rb#5 +class SimpleCov::Formatter::MultiFormatter + class << self + # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#26 + def [](*args); end + + # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#17 + def new(formatters = T.unsafe(nil)); end + end +end + +# source://simplecov//lib/simplecov/formatter/multi_formatter.rb#6 +module SimpleCov::Formatter::MultiFormatter::InstanceMethods + # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#7 + def format(result); end +end + +# A ridiculously simple formatter for SimpleCov results. +# +# source://simplecov//lib/simplecov/formatter/simple_formatter.rb#8 +class SimpleCov::Formatter::SimpleFormatter + # Takes a SimpleCov::Result and generates a string out of it + # + # source://simplecov//lib/simplecov/formatter/simple_formatter.rb#10 + def format(result); end +end + +# source://simplecov//lib/simplecov/last_run.rb#6 +module SimpleCov::LastRun + class << self + # source://simplecov//lib/simplecov/last_run.rb#8 + def last_run_path; end + + # source://simplecov//lib/simplecov/last_run.rb#12 + def read; end + + # source://simplecov//lib/simplecov/last_run.rb#21 + def write(json); end + end +end + +# Classifies whether lines are relevant for code coverage analysis. +# Comments & whitespace lines, and :nocov: token blocks, are considered not relevant. +# +# source://simplecov//lib/simplecov/lines_classifier.rb#7 +class SimpleCov::LinesClassifier + # source://simplecov//lib/simplecov/lines_classifier.rb#33 + def classify(lines); end + + class << self + # source://simplecov//lib/simplecov/lines_classifier.rb#15 + def no_cov_line; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/lines_classifier.rb#19 + def no_cov_line?(line); end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/lines_classifier.rb#26 + def whitespace_line?(line); end + end +end + +# source://simplecov//lib/simplecov/lines_classifier.rb#12 +SimpleCov::LinesClassifier::COMMENT_LINE = T.let(T.unsafe(nil), Regexp) + +# source://simplecov//lib/simplecov/lines_classifier.rb#9 +SimpleCov::LinesClassifier::NOT_RELEVANT = T.let(T.unsafe(nil), T.untyped) + +# source://simplecov//lib/simplecov/lines_classifier.rb#8 +SimpleCov::LinesClassifier::RELEVANT = T.let(T.unsafe(nil), Integer) + +# source://simplecov//lib/simplecov/lines_classifier.rb#11 +SimpleCov::LinesClassifier::WHITESPACE_LINE = T.let(T.unsafe(nil), Regexp) + +# source://simplecov//lib/simplecov/lines_classifier.rb#13 +SimpleCov::LinesClassifier::WHITESPACE_OR_COMMENT_LINE = T.let(T.unsafe(nil), Regexp) + +# Profiles are SimpleCov configuration procs that can be easily +# loaded using SimpleCov.start :rails and defined using +# SimpleCov.profiles.define :foo do +# # SimpleCov configuration here, same as in SimpleCov.configure +# end +# +# source://simplecov//lib/simplecov/profiles.rb#11 +class SimpleCov::Profiles < ::Hash + # Define a SimpleCov profile: + # SimpleCov.profiles.define 'rails' do + # # Same as SimpleCov.configure do .. here + # end + # + # source://simplecov//lib/simplecov/profiles.rb#18 + def define(name, &blk); end + + # Applies the profile of given name on SimpleCov.configure + # + # source://simplecov//lib/simplecov/profiles.rb#28 + def load(name); end +end + +# source://simplecov//lib/simplecov/filter.rb#61 +class SimpleCov::RegexFilter < ::SimpleCov::Filter + # Returns true when the given source file's filename matches the + # regex configured when initializing this Filter with RegexFilter.new(/someregex/) + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/filter.rb#64 + def matches?(source_file); end +end + +# A simplecov code coverage result, initialized from the Hash Ruby's built-in coverage +# library generates (Coverage.result). +# +# source://simplecov//lib/simplecov/result.rb#11 +class SimpleCov::Result + extend ::Forwardable + + # Initialize a new SimpleCov::Result from given Coverage.result (a Hash of filenames each containing an array of + # coverage data) + # + # @return [Result] a new instance of Result + # + # source://simplecov//lib/simplecov/result.rb#28 + def initialize(original_result, command_name: T.unsafe(nil), created_at: T.unsafe(nil)); end + + # The command name that launched this result. + # Delegated to SimpleCov.command_name if not set manually + # + # source://simplecov//lib/simplecov/result.rb#61 + def command_name; end + + # Explicitly set the command name that was used for this coverage result. Defaults to SimpleCov.command_name + # + # source://simplecov//lib/simplecov/result.rb#21 + def command_name=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def coverage_statistics(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def coverage_statistics_by_file(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def covered_branches(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def covered_lines(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def covered_percent(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def covered_percentages(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def covered_strength(*args, **_arg1, &block); end + + # Defines when this result has been created. Defaults to Time.now + # + # source://simplecov//lib/simplecov/result.rb#55 + def created_at; end + + # Explicitly set the Time this result has been created + # + # source://simplecov//lib/simplecov/result.rb#19 + def created_at=(_arg0); end + + # Returns all filenames for source files contained in this result + # + # source://simplecov//lib/simplecov/result.rb#40 + def filenames; end + + # Returns all files that are applicable to this result (sans filters!) as instances of SimpleCov::SourceFile. Aliased as :source_files + # + # source://simplecov//lib/simplecov/result.rb#16 + def files; end + + # Applies the configured SimpleCov.formatter on this result + # + # source://simplecov//lib/simplecov/result.rb#50 + def format!; end + + # Returns a Hash of groups for this result. Define groups using SimpleCov.add_group 'Models', 'app/models' + # + # source://simplecov//lib/simplecov/result.rb#45 + def groups; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def least_covered_file(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def missed_branches(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def missed_lines(*args, **_arg1, &block); end + + # Returns the original Coverage.result used for this instance of SimpleCov::Result + # + # source://simplecov//lib/simplecov/result.rb#14 + def original_result; end + + # Returns all files that are applicable to this result (sans filters!) as instances of SimpleCov::SourceFile. Aliased as :source_files + # + # source://simplecov//lib/simplecov/result.rb#16 + def source_files; end + + # Returns a hash representation of this Result that can be used for marshalling it into JSON + # + # source://simplecov//lib/simplecov/result.rb#66 + def to_hash; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def total_branches(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def total_lines(*args, **_arg1, &block); end + + private + + # source://simplecov//lib/simplecov/result.rb#84 + def coverage; end + + # Applies all configured SimpleCov filters on this result's source files + # + # source://simplecov//lib/simplecov/result.rb#90 + def filter!; end + + class << self + # Loads a SimpleCov::Result#to_hash dump + # + # source://simplecov//lib/simplecov/result.rb#76 + def from_hash(hash); end + end +end + +# Responsible for adapting the format of the coverage result whether it's default or with statistics +# +# source://simplecov//lib/simplecov/result_adapter.rb#7 +class SimpleCov::ResultAdapter + # @return [ResultAdapter] a new instance of ResultAdapter + # + # source://simplecov//lib/simplecov/result_adapter.rb#10 + def initialize(result); end + + # source://simplecov//lib/simplecov/result_adapter.rb#18 + def adapt; end + + # Returns the value of attribute result. + # + # source://simplecov//lib/simplecov/result_adapter.rb#8 + def result; end + + class << self + # source://simplecov//lib/simplecov/result_adapter.rb#14 + def call(*args); end + end +end + +# Singleton that is responsible for caching, loading and merging +# SimpleCov::Results into a single result for coverage analysis based +# upon multiple test suites. +# +# source://simplecov//lib/simplecov/result_merger.rb#11 +module SimpleCov::ResultMerger + class << self + # source://simplecov//lib/simplecov/result_merger.rb#187 + def adapt_pre_simplecov_0_18_result(result); end + + # We changed the format of the raw result data in simplecov, as people are likely + # to have "old" resultsets lying around (but not too old so that they're still + # considered we can adapt them). + # See https://github.com/simplecov-ruby/simplecov/pull/824#issuecomment-576049747 + # + # source://simplecov//lib/simplecov/result_merger.rb#172 + def adapt_result(result); end + + # source://simplecov//lib/simplecov/result_merger.rb#93 + def create_result(command_names, coverage); end + + # source://simplecov//lib/simplecov/result_merger.rb#22 + def merge_and_store(*file_paths, ignore_timeout: T.unsafe(nil)); end + + # source://simplecov//lib/simplecov/result_merger.rb#100 + def merge_coverage(*results); end + + # source://simplecov//lib/simplecov/result_merger.rb#28 + def merge_results(*file_paths, ignore_timeout: T.unsafe(nil)); end + + # source://simplecov//lib/simplecov/result_merger.rb#74 + def merge_valid_results(results, ignore_timeout: T.unsafe(nil)); end + + # Gets all SimpleCov::Results stored in resultset, merges them and produces a new + # SimpleCov::Result with merged coverage data and the command_name + # for the result consisting of a join on all source result's names + # + # source://simplecov//lib/simplecov/result_merger.rb#117 + def merged_result; end + + # source://simplecov//lib/simplecov/result_merger.rb#51 + def parse_file(path); end + + # source://simplecov//lib/simplecov/result_merger.rb#65 + def parse_json(content); end + + # pre 0.18 coverage data pointed from file directly to an array of line coverage + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/result_merger.rb#181 + def pre_simplecov_0_18_result?(result); end + + # source://simplecov//lib/simplecov/result_merger.rb#56 + def read_file(path); end + + # source://simplecov//lib/simplecov/result_merger.rb#126 + def read_resultset; end + + # The path to the .resultset.json cache file + # + # source://simplecov//lib/simplecov/result_merger.rb#14 + def resultset_path; end + + # source://simplecov//lib/simplecov/result_merger.rb#18 + def resultset_writelock; end + + # Saves the given SimpleCov::Result in the resultset cache + # + # source://simplecov//lib/simplecov/result_merger.rb#136 + def store_result(result); end + + # Ensure only one process is reading or writing the resultset at any + # given time + # + # source://simplecov//lib/simplecov/result_merger.rb#153 + def synchronize_resultset; end + + # source://simplecov//lib/simplecov/result_merger.rb#89 + def time_since_result_creation(data); end + + # source://simplecov//lib/simplecov/result_merger.rb#46 + def valid_results(file_path, ignore_timeout: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/result_merger.rb#85 + def within_merge_timeout?(data); end + end +end + +# Responsible for producing file coverage metrics. +# +# source://simplecov//lib/simplecov/simulate_coverage.rb#7 +module SimpleCov::SimulateCoverage + private + + # Simulate normal file coverage report on + # ruby 2.5 and return similar hash with lines and branches keys + # + # Happens when a file wasn't required but still tracked. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/simulate_coverage.rb#18 + def call(absolute_path); end + + class << self + # Simulate normal file coverage report on + # ruby 2.5 and return similar hash with lines and branches keys + # + # Happens when a file wasn't required but still tracked. + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/simulate_coverage.rb#18 + def call(absolute_path); end + end +end + +# Representation of a source file including it's coverage data, source code, +# source lines and featuring helpers to interpret that data. +# +# source://simplecov//lib/simplecov/source_file/line.rb#4 +class SimpleCov::SourceFile + # @return [SourceFile] a new instance of SourceFile + # + # source://simplecov//lib/simplecov/source_file.rb#14 + def initialize(filename, coverage_data); end + + # Return all the branches inside current source file + # + # source://simplecov//lib/simplecov/source_file.rb#98 + def branches; end + + # source://simplecov//lib/simplecov/source_file.rb#106 + def branches_coverage_percent; end + + # source://simplecov//lib/simplecov/source_file.rb#142 + def branches_for_line(line_number); end + + # Return hash with key of line number and branch coverage count as value + # + # source://simplecov//lib/simplecov/source_file.rb#118 + def branches_report; end + + # The array of coverage data received from the Coverage.result + # + # source://simplecov//lib/simplecov/source_file.rb#12 + def coverage_data; end + + # source://simplecov//lib/simplecov/source_file.rb#32 + def coverage_statistics; end + + # Select the covered branches + # Here we user tree schema because some conditions like case may have additional + # else that is not in declared inside the code but given by default by coverage report + # + # @return [Array] + # + # source://simplecov//lib/simplecov/source_file.rb#129 + def covered_branches; end + + # Returns all covered lines as SimpleCov::SourceFile::Line + # + # source://simplecov//lib/simplecov/source_file.rb#48 + def covered_lines; end + + # The coverage for this file in percent. 0 if the file has no coverage lines + # + # source://simplecov//lib/simplecov/source_file.rb#80 + def covered_percent; end + + # source://simplecov//lib/simplecov/source_file.rb#84 + def covered_strength; end + + # The full path to this source file (e.g. /User/colszowka/projects/simplecov/lib/simplecov/source_file.rb) + # + # source://simplecov//lib/simplecov/source_file.rb#10 + def filename; end + + # Access SimpleCov::SourceFile::Line source lines by line number + # + # source://simplecov//lib/simplecov/source_file.rb#75 + def line(number); end + + # Check if any branches missing on given line number + # + # @param line_number [Integer] + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file.rb#153 + def line_with_missed_branch?(line_number); end + + # Returns all source lines for this file as instances of SimpleCov::SourceFile::Line, + # and thus including coverage data. Aliased as :source_lines + # + # source://simplecov//lib/simplecov/source_file.rb#42 + def lines; end + + # Returns the number of relevant lines (covered + missed) + # + # source://simplecov//lib/simplecov/source_file.rb#70 + def lines_of_code; end + + # Select the missed branches with coverage equal to zero + # + # @return [Array] + # + # source://simplecov//lib/simplecov/source_file.rb#138 + def missed_branches; end + + # Returns all lines that should have been, but were not covered + # as instances of SimpleCov::SourceFile::Line + # + # source://simplecov//lib/simplecov/source_file.rb#54 + def missed_lines; end + + # Returns all lines that are not relevant for coverage as + # SimpleCov::SourceFile::Line instances + # + # source://simplecov//lib/simplecov/source_file.rb#60 + def never_lines; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file.rb#102 + def no_branches?; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file.rb#88 + def no_lines?; end + + # The path to this source file relative to the projects directory + # + # source://simplecov//lib/simplecov/source_file.rb#20 + def project_filename; end + + # source://simplecov//lib/simplecov/source_file.rb#92 + def relevant_lines; end + + # Returns all lines that were skipped as SimpleCov::SourceFile::Line instances + # + # source://simplecov//lib/simplecov/source_file.rb#65 + def skipped_lines; end + + # The source code for this file. Aliased as :source + # + # source://simplecov//lib/simplecov/source_file.rb#25 + def source; end + + # Returns all source lines for this file as instances of SimpleCov::SourceFile::Line, + # and thus including coverage data. Aliased as :source_lines + # + # source://simplecov//lib/simplecov/source_file.rb#42 + def source_lines; end + + # The source code for this file. Aliased as :source + # + # source://simplecov//lib/simplecov/source_file.rb#25 + def src; end + + # Return the relevant branches to source file + # + # source://simplecov//lib/simplecov/source_file.rb#112 + def total_branches; end + + private + + # source://simplecov//lib/simplecov/source_file.rb#346 + def branch_coverage_statistics; end + + # source://simplecov//lib/simplecov/source_file.rb#324 + def build_branch(branch_data, hit_count, condition_start_line); end + + # Call recursive method that transform our static hash to array of objects + # + # @return [Array] + # + # source://simplecov//lib/simplecov/source_file.rb#273 + def build_branches; end + + # source://simplecov//lib/simplecov/source_file.rb#310 + def build_branches_from(condition, branches); end + + # Build full branches report + # Root branches represent the wrapper of all condition state that + # have inside the branches + # + # @return [Hash] + # + # source://simplecov//lib/simplecov/source_file.rb#262 + def build_branches_report; end + + # source://simplecov//lib/simplecov/source_file.rb#229 + def build_lines; end + + # source://simplecov//lib/simplecov/source_file.rb#164 + def build_no_cov_chunks; end + + # Warning to identify condition from Issue #56 + # + # source://simplecov//lib/simplecov/source_file.rb#251 + def coverage_exceeding_source_warn; end + + # source://simplecov//lib/simplecov/source_file.rb#214 + def ensure_remove_undefs(file_lines); end + + # source://simplecov//lib/simplecov/source_file.rb#336 + def line_coverage_statistics; end + + # source://simplecov//lib/simplecov/source_file.rb#246 + def lines_strength; end + + # source://simplecov//lib/simplecov/source_file.rb#178 + def load_source; end + + # no_cov_chunks is zero indexed to work directly with the array holding the lines + # + # source://simplecov//lib/simplecov/source_file.rb#160 + def no_cov_chunks; end + + # source://simplecov//lib/simplecov/source_file.rb#282 + def process_skipped_branches(branches); end + + # source://simplecov//lib/simplecov/source_file.rb#237 + def process_skipped_lines(lines); end + + # source://simplecov//lib/simplecov/source_file.rb#198 + def read_lines(file, lines, current_line); end + + # Since we are dumping to and loading from JSON, and we have arrays as keys those + # don't make their way back to us intact e.g. just as a string + # + # We should probably do something different here, but as it stands these are + # our data structures that we write so eval isn't _too_ bad. + # + # See #801 + # + # source://simplecov//lib/simplecov/source_file.rb#300 + def restore_ruby_data_structure(structure); end + + # source://simplecov//lib/simplecov/source_file.rb#206 + def set_encoding_based_on_magic_comment(file, line); end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file.rb#194 + def shebang?(line); end +end + +# Representing single branch that has been detected in coverage report. +# Give us support methods that handle needed calculations. +# +# source://simplecov//lib/simplecov/source_file/branch.rb#8 +class SimpleCov::SourceFile::Branch + # @return [Branch] a new instance of Branch + # + # source://simplecov//lib/simplecov/source_file/branch.rb#12 + def initialize(start_line:, end_line:, coverage:, inline:, type:); end + + # Returns the value of attribute coverage. + # + # source://simplecov//lib/simplecov/source_file/branch.rb#9 + def coverage; end + + # Return true if there is relevant count defined > 0 + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/branch.rb#31 + def covered?; end + + # Returns the value of attribute end_line. + # + # source://simplecov//lib/simplecov/source_file/branch.rb#9 + def end_line; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/branch.rb#22 + def inline?; end + + # Check if branche missed or not + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/branch.rb#40 + def missed?; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/branch.rb#70 + def overlaps_with?(line_range); end + + # Return array with coverage count and badge + # + # @return [Array] + # + # source://simplecov//lib/simplecov/source_file/branch.rb#79 + def report; end + + # The line on which we want to report the coverage + # + # Usually we choose the line above the start of the branch (so that it shows up + # at if/else) because that + # * highlights the condition + # * makes it distinguishable if the first line of the branch is an inline branch + # (see the nested_branches fixture) + # + # source://simplecov//lib/simplecov/source_file/branch.rb#52 + def report_line; end + + # Flags the branch as skipped + # + # source://simplecov//lib/simplecov/source_file/branch.rb#61 + def skipped!; end + + # Returns true if the branch was marked skipped by virtue of nocov comments. + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/branch.rb#66 + def skipped?; end + + # Returns the value of attribute start_line. + # + # source://simplecov//lib/simplecov/source_file/branch.rb#9 + def start_line; end + + # Returns the value of attribute type. + # + # source://simplecov//lib/simplecov/source_file/branch.rb#9 + def type; end +end + +# Representation of a single line in a source file including +# this specific line's source code, line_number and code coverage, +# with the coverage being either nil (coverage not applicable, e.g. comment +# line), 0 (line not covered) or >1 (the amount of times the line was +# executed) +# +# source://simplecov//lib/simplecov/source_file/line.rb#10 +class SimpleCov::SourceFile::Line + # @raise [ArgumentError] + # @return [Line] a new instance of Line + # + # source://simplecov//lib/simplecov/source_file/line.rb#25 + def initialize(src, line_number, coverage); end + + # The coverage data for this line: either nil (never), 0 (missed) or >=1 (times covered) + # + # source://simplecov//lib/simplecov/source_file/line.rb#16 + def coverage; end + + # Returns true if this is a line that has been covered + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/line.rb#42 + def covered?; end + + # The line number in the source file. Aliased as :line, :number + # + # source://simplecov//lib/simplecov/source_file/line.rb#14 + def line; end + + # The line number in the source file. Aliased as :line, :number + # + # source://simplecov//lib/simplecov/source_file/line.rb#14 + def line_number; end + + # Returns true if this is a line that should have been covered, but was not + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/line.rb#37 + def missed?; end + + # Returns true if this line is not relevant for coverage + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/line.rb#47 + def never?; end + + # The line number in the source file. Aliased as :line, :number + # + # source://simplecov//lib/simplecov/source_file/line.rb#14 + def number; end + + # Whether this line was skipped + # + # source://simplecov//lib/simplecov/source_file/line.rb#18 + def skipped; end + + # Flags this line as skipped + # + # source://simplecov//lib/simplecov/source_file/line.rb#52 + def skipped!; end + + # Returns true if this line was skipped, false otherwise. Lines are skipped if they are wrapped with + # # :nocov: comment lines. + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/source_file/line.rb#58 + def skipped?; end + + # The source code for this line. Aliased as :source + # Lets grab some fancy aliases, shall we? + # + # source://simplecov//lib/simplecov/source_file/line.rb#12 + def source; end + + # The source code for this line. Aliased as :source + # + # source://simplecov//lib/simplecov/source_file/line.rb#12 + def src; end + + # The status of this line - either covered, missed, skipped or never. Useful i.e. for direct use + # as a css class in report generation + # + # source://simplecov//lib/simplecov/source_file/line.rb#64 + def status; end +end + +# source://simplecov//lib/simplecov/source_file.rb#205 +SimpleCov::SourceFile::RUBY_FILE_ENCODING_MAGIC_COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://simplecov//lib/simplecov/source_file.rb#193 +SimpleCov::SourceFile::SHEBANG_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://simplecov//lib/simplecov/filter.rb#53 +class SimpleCov::StringFilter < ::SimpleCov::Filter + # Returns true when the given source file's filename matches the + # string configured when initializing this Filter with StringFilter.new('somestring') + # + # @return [Boolean] + # + # source://simplecov//lib/simplecov/filter.rb#56 + def matches?(source_file); end +end + +# Select the files that related to working scope directory of SimpleCov +# +# source://simplecov//lib/simplecov/useless_results_remover.rb#7 +module SimpleCov::UselessResultsRemover + class << self + # source://simplecov//lib/simplecov/useless_results_remover.rb#8 + def call(coverage_result); end + + # source://simplecov//lib/simplecov/useless_results_remover.rb#14 + def root_regx; end + end +end + +# source://simplecov//lib/simplecov/version.rb#4 +SimpleCov::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi b/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi new file mode 100644 index 0000000..4b5c6ae --- /dev/null +++ b/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `simplecov_json_formatter` gem. +# Please instead update this file by running `bin/tapioca gem simplecov_json_formatter`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/spoom@1.1.12.rbi b/sorbet/rbi/gems/spoom@1.1.12.rbi deleted file mode 100644 index d79145b..0000000 --- a/sorbet/rbi/gems/spoom@1.1.12.rbi +++ /dev/null @@ -1,2369 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `spoom` gem. -# Please instead update this file by running `bin/tapioca gem spoom`. - -# source://spoom//lib/spoom.rb#7 -module Spoom - class << self - # source://spoom//lib/spoom.rb#45 - sig { params(cmd: ::String, arg: ::String, path: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } - def exec(cmd, *arg, path: T.unsafe(nil), capture_err: T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/cli/helper.rb#9 -module Spoom::Cli; end - -# source://spoom//lib/spoom/cli/bump.rb#9 -class Spoom::Cli::Bump < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/bump.rb#32 - sig { params(directory: ::String).void } - def bump(directory = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#159 - def config_files(path: T.unsafe(nil)); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#134 - def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#155 - def undo_changes(files, from_strictness); end -end - -# source://spoom//lib/spoom/cli/config.rb#9 -class Spoom::Cli::Config < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/config.rb#15 - def show; end -end - -# source://spoom//lib/spoom/cli/coverage.rb#9 -class Spoom::Cli::Coverage < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/coverage.rb#187 - def bundle_install(path, sha); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/coverage.rb#199 - def message_no_data(file); end - - # source://spoom//lib/spoom/cli/coverage.rb#162 - def open(file = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/coverage.rb#178 - def parse_time(string, option); end - - # source://spoom//lib/spoom/cli/coverage.rb#131 - def report; end - - # source://spoom//lib/spoom/cli/coverage.rb#20 - def snapshot; end - - # source://spoom//lib/spoom/cli/coverage.rb#43 - def timeline; end -end - -# source://spoom//lib/spoom/cli/coverage.rb#12 -Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/cli/helper.rb#10 -module Spoom::Cli::Helper - include ::Spoom::Colorize - - requires_ancestor { Thor } - - # source://spoom//lib/spoom/cli/helper.rb#143 - sig { params(string: ::String).returns(::String) } - def blue(string); end - - # source://spoom//lib/spoom/cli/helper.rb#87 - sig { params(exit_code: ::Integer, block: T.nilable(T.proc.void)).void } - def check_sorbet_segfault(exit_code, &block); end - - # Is the `--color` option true? - # - # source://spoom//lib/spoom/cli/helper.rb#107 - sig { returns(T::Boolean) } - def color?; end - - # Colorize a string if `color?` - # - # source://spoom//lib/spoom/cli/helper.rb#136 - sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } - def colorize(string, *color); end - - # source://spoom//lib/spoom/cli/helper.rb#148 - sig { params(string: ::String).returns(::String) } - def cyan(string); end - - # Return the path specified through `--path` - # - # source://spoom//lib/spoom/cli/helper.rb#72 - sig { returns(::String) } - def exec_path; end - - # source://spoom//lib/spoom/cli/helper.rb#153 - sig { params(string: ::String).returns(::String) } - def gray(string); end - - # source://spoom//lib/spoom/cli/helper.rb#158 - sig { params(string: ::String).returns(::String) } - def green(string); end - - # source://spoom//lib/spoom/cli/helper.rb#112 - sig { params(string: ::String).returns(::String) } - def highlight(string); end - - # Enforce that `spoom` is ran inside a project with a `sorbet/config` file - # - # Display an error message and exit otherwise. - # - # source://spoom//lib/spoom/cli/helper.rb#59 - sig { void } - def in_sorbet_project!; end - - # Is `spoom` ran inside a project with a `sorbet/config` file? - # - # source://spoom//lib/spoom/cli/helper.rb#51 - sig { returns(T::Boolean) } - def in_sorbet_project?; end - - # source://spoom//lib/spoom/cli/helper.rb#163 - sig { params(string: ::String).returns(::String) } - def red(string); end - - # Print `message` on `$stdout` - # - # source://spoom//lib/spoom/cli/helper.rb#20 - sig { params(message: ::String).void } - def say(message); end - - # Print `message` on `$stderr` - # - # The message is prefixed by a status (default: `Error`). - # - # source://spoom//lib/spoom/cli/helper.rb#39 - sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } - def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/helper.rb#82 - sig { returns(::Spoom::Sorbet::Config) } - def sorbet_config; end - - # source://spoom//lib/spoom/cli/helper.rb#77 - sig { returns(::String) } - def sorbet_config_file; end - - # source://spoom//lib/spoom/cli/helper.rb#168 - sig { params(string: ::String).returns(::String) } - def yellow(string); end -end - -# source://spoom//lib/spoom/cli/lsp.rb#10 -class Spoom::Cli::LSP < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#54 - def defs(file, line, col); end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#64 - def find(query); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#40 - def hover(file, line, col); end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#25 - def list; end - - # source://spoom//lib/spoom/cli/lsp.rb#113 - def lsp_client; end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#84 - def refs(file, line, col); end - - # source://spoom//lib/spoom/cli/lsp.rb#135 - def run(&block); end - - # source://spoom//lib/spoom/cli/lsp.rb#16 - def show; end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#94 - def sigs(file, line, col); end - - # source://spoom//lib/spoom/cli/lsp.rb#127 - def symbol_printer; end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#74 - def symbols(file); end - - # source://spoom//lib/spoom/cli/lsp.rb#160 - def to_uri(path); end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#104 - def types(file, line, col); end -end - -# source://spoom//lib/spoom/cli.rb#16 -class Spoom::Cli::Main < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli.rb#68 - def __print_version; end - - # source://thor/1.2.1/lib/thor.rb#239 - def bump(*args); end - - # source://thor/1.2.1/lib/thor.rb#239 - def config(*args); end - - # source://thor/1.2.1/lib/thor.rb#239 - def coverage(*args); end - - # source://spoom//lib/spoom/cli.rb#43 - def files; end - - # source://thor/1.2.1/lib/thor.rb#239 - def lsp(*args); end - - # source://thor/1.2.1/lib/thor.rb#239 - def tc(*args); end - - class << self - # @return [Boolean] - # - # source://spoom//lib/spoom/cli.rb#75 - def exit_on_failure?; end - end -end - -# source://spoom//lib/spoom/cli/run.rb#6 -class Spoom::Cli::Run < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/run.rb#117 - def colorize_message(message); end - - # source://spoom//lib/spoom/cli/run.rb#108 - def format_error(error, format); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/run.rb#26 - def tc(*paths_to_select); end -end - -# source://spoom//lib/spoom/cli/run.rb#15 -Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/cli/run.rb#11 -Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/cli/run.rb#13 -Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/cli/run.rb#12 -Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/colors.rb#5 -class Spoom::Color < ::T::Enum - enums do - CLEAR = new - BOLD = new - BLACK = new - RED = new - GREEN = new - YELLOW = new - BLUE = new - MAGENTA = new - CYAN = new - WHITE = new - LIGHT_BLACK = new - LIGHT_RED = new - LIGHT_GREEN = new - LIGHT_YELLOW = new - LIGHT_BLUE = new - LIGHT_MAGENTA = new - LIGHT_CYAN = new - LIGHT_WHITE = new - end - - # source://spoom//lib/spoom/colors.rb#32 - sig { returns(::String) } - def ansi_code; end -end - -# source://spoom//lib/spoom/colors.rb#37 -module Spoom::Colorize - # source://spoom//lib/spoom/colors.rb#41 - sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } - def set_color(string, *color); end -end - -# An abstraction to a Ruby project context -# -# A context maps to a directory in the file system. -# It is used to manipulate files and run commands in the context of this directory. -# -# source://spoom//lib/spoom/context.rb#12 -class Spoom::Context - # Create a new context about `absolute_path` - # - # The directory will not be created if it doesn't exist. - # Call `#make!` to create it. - # - # source://spoom//lib/spoom/context.rb#37 - sig { params(absolute_path: ::String).void } - def initialize(absolute_path); end - - # The absolute path to the directory this context is about - # - # source://spoom//lib/spoom/context.rb#17 - sig { returns(::String) } - def absolute_path; end - - # Returns the absolute path to `relative_path` in the context's directory - # - # source://spoom//lib/spoom/context.rb#43 - sig { params(relative_path: ::String).returns(::String) } - def absolute_path_to(relative_path); end - - # Run a command with `bundle` in this context directory - # - # source://spoom//lib/spoom/context.rb#150 - sig { params(command: ::String, version: T.nilable(::String)).returns(::Spoom::ExecResult) } - def bundle(command, version: T.unsafe(nil)); end - - # Run a command `bundle exec` in this context directory - # - # source://spoom//lib/spoom/context.rb#163 - sig { params(command: ::String, version: T.nilable(::String)).returns(::Spoom::ExecResult) } - def bundle_exec(command, version: T.unsafe(nil)); end - - # Run `bundle install` in this context directory - # - # source://spoom//lib/spoom/context.rb#157 - sig { params(version: T.nilable(::String)).returns(::Spoom::ExecResult) } - def bundle_install!(version: T.unsafe(nil)); end - - # Delete this context and its content - # - # Warning: it will `rm -rf` the context directory on the file system. - # - # source://spoom//lib/spoom/context.rb#112 - sig { void } - def destroy!; end - - # Run a command in this context directory - # - # source://spoom//lib/spoom/context.rb#120 - sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } - def exec(command, capture_err: T.unsafe(nil)); end - - # Does `relative_path` point to an existing file in this context directory? - # - # source://spoom//lib/spoom/context.rb#72 - sig { params(relative_path: ::String).returns(T::Boolean) } - def file?(relative_path); end - - # Run a command prefixed by `git` in this context directory - # - # source://spoom//lib/spoom/context.rb#171 - sig { params(command: ::String).returns(::Spoom::ExecResult) } - def git(command); end - - # Run `git checkout` in this context directory - # - # source://spoom//lib/spoom/context.rb#183 - sig { params(ref: ::String).returns(::Spoom::ExecResult) } - def git_checkout!(ref: T.unsafe(nil)); end - - # Get the current git branch in this context directory - # - # source://spoom//lib/spoom/context.rb#189 - sig { returns(T.nilable(::String)) } - def git_current_branch; end - - # Run `git init` in this context directory - # - # source://spoom//lib/spoom/context.rb#177 - sig { params(branch: ::String).void } - def git_init!(branch: T.unsafe(nil)); end - - # List all files in this context matching `pattern` - # - # source://spoom//lib/spoom/context.rb#58 - sig { params(pattern: ::String).returns(T::Array[::String]) } - def glob(pattern = T.unsafe(nil)); end - - # List all files at the top level of this context directory - # - # source://spoom//lib/spoom/context.rb#66 - sig { returns(T::Array[::String]) } - def list; end - - # Create the context directory at `absolute_path` - # - # source://spoom//lib/spoom/context.rb#51 - sig { void } - def mkdir!; end - - # Move the file or directory from `from_relative_path` to `to_relative_path` - # - # source://spoom//lib/spoom/context.rb#102 - sig { params(from_relative_path: ::String, to_relative_path: ::String).void } - def move!(from_relative_path, to_relative_path); end - - # Return the contents of the file at `relative_path` in this context directory - # - # Will raise if the file doesn't exist. - # - # source://spoom//lib/spoom/context.rb#80 - sig { params(relative_path: ::String).returns(::String) } - def read(relative_path); end - - # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) - # - # source://spoom//lib/spoom/context.rb#215 - sig { params(relative_path: ::String).returns(T.nilable(::String)) } - def read_file_strictness(relative_path); end - - # Read the `contents` of the Gemfile in this context directory - # - # source://spoom//lib/spoom/context.rb#138 - sig { returns(T.nilable(::String)) } - def read_gemfile; end - - # Read the contents of `sorbet/config` in this context directory - # - # source://spoom//lib/spoom/context.rb#203 - sig { returns(::String) } - def read_sorbet_config; end - - # Remove the path at `relative_path` (recursive + force) in this context directory - # - # source://spoom//lib/spoom/context.rb#96 - sig { params(relative_path: ::String).void } - def remove!(relative_path); end - - # Run `bundle exec srb` in this context directory - # - # source://spoom//lib/spoom/context.rb#197 - sig { params(command: ::String).returns(::Spoom::ExecResult) } - def srb(command); end - - # Write `contents` in the file at `relative_path` in this context directory - # - # Append to the file if `append` is true. - # - # source://spoom//lib/spoom/context.rb#88 - sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } - def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end - - # Set the `contents` of the Gemfile in this context directory - # - # source://spoom//lib/spoom/context.rb#144 - sig { params(contents: ::String, append: T::Boolean).void } - def write_gemfile!(contents, append: T.unsafe(nil)); end - - # Set the `contents` of `sorbet/config` in this context directory - # - # source://spoom//lib/spoom/context.rb#209 - sig { params(contents: ::String, append: T::Boolean).void } - def write_sorbet_config!(contents, append: T.unsafe(nil)); end - - class << self - # Create a new context in the system's temporary directory - # - # `name` is used as prefix to the temporary directory name. - # The directory will be created if it doesn't exist. - # - # source://spoom//lib/spoom/context.rb#27 - sig { params(name: T.nilable(::String)).returns(T.attached_class) } - def mktmp!(name = T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/coverage/snapshot.rb#5 -module Spoom::Coverage - class << self - # source://spoom//lib/spoom/coverage.rb#69 - sig do - params( - snapshots: T::Array[::Spoom::Coverage::Snapshot], - palette: ::Spoom::Coverage::D3::ColorPalette, - path: ::String - ).returns(::Spoom::Coverage::Report) - end - def report(snapshots, palette:, path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage.rb#89 - sig { params(path: ::String).returns(::Spoom::FileTree) } - def sigils_tree(path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage.rb#16 - sig do - params( - path: ::String, - rbi: T::Boolean, - sorbet_bin: T.nilable(::String) - ).returns(::Spoom::Coverage::Snapshot) - end - def snapshot(path: T.unsafe(nil), rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage.rb#84 - sig { params(path: ::String).returns(::Spoom::Sorbet::Config) } - def sorbet_config(path: T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/coverage/report.rb#88 -module Spoom::Coverage::Cards; end - -# source://spoom//lib/spoom/coverage/report.rb#89 -class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template - # source://spoom//lib/spoom/coverage/report.rb#98 - sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void } - def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end - - # @return [String, nil] - # - # source://spoom//lib/spoom/coverage/report.rb#95 - def body; end - - # source://spoom//lib/spoom/coverage/report.rb#95 - sig { returns(T.nilable(::String)) } - def title; end -end - -# source://spoom//lib/spoom/coverage/report.rb#92 -Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/report.rb#105 -class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card - abstract! - - # source://spoom//lib/spoom/coverage/report.rb#112 - sig { void } - def initialize; end - - # @abstract - # - # source://spoom//lib/spoom/coverage/report.rb#120 - sig { abstract.returns(::String) } - def erb; end - - # source://spoom//lib/spoom/coverage/report.rb#115 - sig { override.returns(::String) } - def html; end -end - -# source://spoom//lib/spoom/coverage/report.rb#153 -class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card - # source://spoom//lib/spoom/coverage/report.rb#157 - sig { params(sigils_tree: ::Spoom::FileTree, title: ::String).void } - def initialize(sigils_tree:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#123 -class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card - # source://spoom//lib/spoom/coverage/report.rb#132 - sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void } - def initialize(snapshot:, title: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/report.rb#143 - sig { returns(::Spoom::Coverage::D3::Pie::Calls) } - def pie_calls; end - - # source://spoom//lib/spoom/coverage/report.rb#138 - sig { returns(::Spoom::Coverage::D3::Pie::Sigils) } - def pie_sigils; end - - # source://spoom//lib/spoom/coverage/report.rb#148 - sig { returns(::Spoom::Coverage::D3::Pie::Sigs) } - def pie_sigs; end - - # source://spoom//lib/spoom/coverage/report.rb#129 - sig { returns(::Spoom::Coverage::Snapshot) } - def snapshot; end -end - -# source://spoom//lib/spoom/coverage/report.rb#126 -Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/report.rb#225 -class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb - # source://spoom//lib/spoom/coverage/report.rb#229 - sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void } - def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/report.rb#235 - sig { override.returns(::String) } - def erb; end -end - -# source://spoom//lib/spoom/coverage/report.rb#162 -class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card - # source://spoom//lib/spoom/coverage/report.rb#166 - sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void } - def initialize(title:, timeline:); end -end - -# source://spoom//lib/spoom/coverage/report.rb#179 -class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#183 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#197 -class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#201 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#215 -class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#219 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#170 -class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#174 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#188 -class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#192 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#206 -class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#210 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/d3/base.rb#6 -module Spoom::Coverage::D3 - class << self - # source://spoom//lib/spoom/coverage/d3.rb#61 - sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) } - def header_script(palette); end - - # source://spoom//lib/spoom/coverage/d3.rb#21 - sig { returns(::String) } - def header_style; end - end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/d3/base.rb#7 -class Spoom::Coverage::D3::Base - abstract! - - # source://spoom//lib/spoom/coverage/d3/base.rb#17 - sig { params(id: ::String, data: T.untyped).void } - def initialize(id, data); end - - # source://spoom//lib/spoom/coverage/d3/base.rb#37 - sig { returns(::String) } - def html; end - - # source://spoom//lib/spoom/coverage/d3/base.rb#14 - sig { returns(::String) } - def id; end - - # @abstract - # - # source://spoom//lib/spoom/coverage/d3/base.rb#50 - sig { abstract.returns(::String) } - def script; end - - # source://spoom//lib/spoom/coverage/d3/base.rb#45 - sig { returns(::String) } - def tooltip; end - - class << self - # source://spoom//lib/spoom/coverage/d3/base.rb#31 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/d3/base.rb#26 - sig { returns(::String) } - def header_style; end - end -end - -# source://spoom//lib/spoom/coverage/d3.rb#12 -Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3.rb#11 -Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3.rb#14 -Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3.rb#15 -Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3.rb#13 -Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3/circle_map.rb#9 -class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#59 - sig { override.returns(::String) } - def script; end - - class << self - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#40 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#14 - sig { returns(::String) } - def header_style; end - end -end - -# source://spoom//lib/spoom/coverage/d3/circle_map.rb#148 -class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#152 - sig { params(id: ::String, sigils_tree: ::Spoom::FileTree).void } - def initialize(id, sigils_tree); end - - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#181 - sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } - def tree_node_score(node); end - - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#173 - sig { params(node: ::Spoom::FileTree::Node).returns(T.nilable(::String)) } - def tree_node_strictness(node); end - - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#160 - sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) } - def tree_node_to_json(node); end -end - -# source://spoom//lib/spoom/coverage/d3.rb#103 -class Spoom::Coverage::D3::ColorPalette < ::T::Struct - prop :false, ::String - prop :ignore, ::String - prop :strict, ::String - prop :strong, ::String - prop :true, ::String - - class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/d3/pie.rb#9 -class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base - abstract! - - # source://spoom//lib/spoom/coverage/d3/pie.rb#16 - sig { params(id: ::String, title: ::String, data: T.untyped).void } - def initialize(id, title, data); end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#56 - sig { override.returns(::String) } - def script; end - - class << self - # source://spoom//lib/spoom/coverage/d3/pie.rb#43 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#25 - sig { returns(::String) } - def header_style; end - end -end - -# source://spoom//lib/spoom/coverage/d3/pie.rb#141 -class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie - # source://spoom//lib/spoom/coverage/d3/pie.rb#145 - sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#150 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/pie.rb#123 -class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie - # source://spoom//lib/spoom/coverage/d3/pie.rb#127 - sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#132 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/pie.rb#159 -class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie - # source://spoom//lib/spoom/coverage/d3/pie.rb#163 - sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#168 - sig { override.returns(::String) } - def tooltip; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/d3/timeline.rb#9 -class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base - abstract! - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#16 - sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void } - def initialize(id, data, keys); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#187 - sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } - def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#203 - sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - # @abstract - # - # source://spoom//lib/spoom/coverage/d3/timeline.rb#126 - sig { abstract.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#217 - sig { params(y: ::String).returns(::String) } - def points(y:); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#101 - sig { override.returns(::String) } - def script; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#129 - sig { returns(::String) } - def x_scale; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#145 - sig { returns(::String) } - def x_ticks; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#158 - sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) } - def y_scale(min:, max:, ticks:); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#174 - sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) } - def y_ticks(ticks:, format:, padding:); end - - class << self - # source://spoom//lib/spoom/coverage/d3/timeline.rb#79 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#25 - sig { returns(::String) } - def header_style; end - end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#448 -class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked - # source://spoom//lib/spoom/coverage/d3/timeline.rb#452 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#466 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#502 -class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked - # source://spoom//lib/spoom/coverage/d3/timeline.rb#506 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#574 - sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#614 - sig { override.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#534 - sig { override.returns(::String) } - def script; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#520 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#282 -class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline - # source://spoom//lib/spoom/coverage/d3/timeline.rb#286 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#311 - sig { override.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#298 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#421 -class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked - # source://spoom//lib/spoom/coverage/d3/timeline.rb#425 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#439 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#475 -class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked - # source://spoom//lib/spoom/coverage/d3/timeline.rb#479 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#493 - sig { override.returns(::String) } - def tooltip; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/d3/timeline.rb#329 -class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline - abstract! - - # source://sorbet-runtime/0.5.10439/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#388 - sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#377 - sig { override.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#336 - sig { override.returns(::String) } - def script; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#232 -class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline - # source://spoom//lib/spoom/coverage/d3/timeline.rb#236 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#263 - sig { override.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#249 - sig { override.returns(::String) } - def tooltip; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/report.rb#38 -class Spoom::Coverage::Page < ::Spoom::Coverage::Template - abstract! - - # source://spoom//lib/spoom/coverage/report.rb#53 - sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void } - def initialize(title:, palette:, template: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/report.rb#75 - sig { returns(::String) } - def body_html; end - - # @abstract - # - # source://spoom//lib/spoom/coverage/report.rb#80 - sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) } - def cards; end - - # source://spoom//lib/spoom/coverage/report.rb#83 - sig { returns(::String) } - def footer_html; end - - # source://spoom//lib/spoom/coverage/report.rb#70 - sig { returns(::String) } - def header_html; end - - # source://spoom//lib/spoom/coverage/report.rb#65 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/report.rb#60 - sig { returns(::String) } - def header_style; end - - # source://spoom//lib/spoom/coverage/report.rb#50 - sig { returns(::Spoom::Coverage::D3::ColorPalette) } - def palette; end - - # source://spoom//lib/spoom/coverage/report.rb#47 - sig { returns(::String) } - def title; end -end - -# source://spoom//lib/spoom/coverage/report.rb#44 -Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/report.rb#246 -class Spoom::Coverage::Report < ::Spoom::Coverage::Page - # source://spoom//lib/spoom/coverage/report.rb#274 - sig do - params( - project_name: ::String, - palette: ::Spoom::Coverage::D3::ColorPalette, - snapshots: T::Array[::Spoom::Coverage::Snapshot], - sigils_tree: ::Spoom::FileTree, - sorbet_intro_commit: T.nilable(::String), - sorbet_intro_date: T.nilable(::Time) - ).void - end - def initialize(project_name:, palette:, snapshots:, sigils_tree:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/report.rb#302 - sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) } - def cards; end - - # source://spoom//lib/spoom/coverage/report.rb#291 - sig { override.returns(::String) } - def header_html; end - - # source://spoom//lib/spoom/coverage/report.rb#250 - sig { returns(::String) } - def project_name; end - - # source://spoom//lib/spoom/coverage/report.rb#262 - sig { returns(::Spoom::FileTree) } - def sigils_tree; end - - # source://spoom//lib/spoom/coverage/report.rb#259 - sig { returns(T::Array[::Spoom::Coverage::Snapshot]) } - def snapshots; end - - # source://spoom//lib/spoom/coverage/report.rb#253 - sig { returns(T.nilable(::String)) } - def sorbet_intro_commit; end - - # source://spoom//lib/spoom/coverage/report.rb#256 - sig { returns(T.nilable(::Time)) } - def sorbet_intro_date; end -end - -# source://spoom//lib/spoom/coverage/snapshot.rb#6 -class Spoom::Coverage::Snapshot < ::T::Struct - prop :calls_typed, ::Integer, default: T.unsafe(nil) - prop :calls_untyped, ::Integer, default: T.unsafe(nil) - prop :classes, ::Integer, default: T.unsafe(nil) - prop :commit_sha, T.nilable(::String), default: T.unsafe(nil) - prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil) - prop :duration, ::Integer, default: T.unsafe(nil) - prop :files, ::Integer, default: T.unsafe(nil) - prop :methods_with_sig, ::Integer, default: T.unsafe(nil) - prop :methods_without_sig, ::Integer, default: T.unsafe(nil) - prop :modules, ::Integer, default: T.unsafe(nil) - prop :rbi_files, ::Integer, default: T.unsafe(nil) - prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil) - prop :singleton_classes, ::Integer, default: T.unsafe(nil) - prop :timestamp, ::Integer, default: T.unsafe(nil) - prop :version_runtime, T.nilable(::String), default: T.unsafe(nil) - prop :version_static, T.nilable(::String), default: T.unsafe(nil) - - # source://spoom//lib/spoom/coverage/snapshot.rb#30 - sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } - def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/snapshot.rb#36 - sig { params(arg: T.untyped).returns(::String) } - def to_json(*arg); end - - class << self - # source://spoom//lib/spoom/coverage/snapshot.rb#44 - sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) } - def from_json(json); end - - # source://spoom//lib/spoom/coverage/snapshot.rb#49 - sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } - def from_obj(obj); end - - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# The strictness name as found in the Sorbet metrics file -# -# source://spoom//lib/spoom/coverage/snapshot.rb#27 -Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/coverage/snapshot.rb#81 -class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer - # source://spoom//lib/spoom/coverage/snapshot.rb#85 - sig { params(snapshot: ::Spoom::Coverage::Snapshot).void } - def print_snapshot(snapshot); end - - private - - # source://spoom//lib/spoom/coverage/snapshot.rb#134 - sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) } - def percent(value, total); end - - # source://spoom//lib/spoom/coverage/snapshot.rb#123 - sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void } - def print_map(hash, total); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/report.rb#10 -class Spoom::Coverage::Template - abstract! - - # Create a new template from an Erb file path - # - # source://spoom//lib/spoom/coverage/report.rb#18 - sig { params(template: ::String).void } - def initialize(template:); end - - # source://spoom//lib/spoom/coverage/report.rb#23 - sig { returns(::String) } - def erb; end - - # source://spoom//lib/spoom/coverage/report.rb#33 - sig { returns(::Binding) } - def get_binding; end - - # source://spoom//lib/spoom/coverage/report.rb#28 - sig { returns(::String) } - def html; end -end - -# source://spoom//lib/spoom.rb#12 -class Spoom::Error < ::StandardError; end - -# source://spoom//lib/spoom.rb#14 -class Spoom::ExecResult < ::T::Struct - const :err, ::String - const :exit_code, ::Integer - const :out, ::String - const :status, T::Boolean - - # source://spoom//lib/spoom.rb#23 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# Build a file hierarchy from a set of file paths. -# -# source://spoom//lib/spoom/file_tree.rb#6 -class Spoom::FileTree - # source://spoom//lib/spoom/file_tree.rb#13 - sig { params(paths: T::Enumerable[::String], strip_prefix: T.nilable(::String)).void } - def initialize(paths = T.unsafe(nil), strip_prefix: T.unsafe(nil)); end - - # Add a `path` to the tree - # - # This will create all nodes until the root of `path`. - # - # source://spoom//lib/spoom/file_tree.rb#29 - sig { params(path: ::String).returns(::Spoom::FileTree::Node) } - def add_path(path); end - - # Add all `paths` to the tree - # - # source://spoom//lib/spoom/file_tree.rb#21 - sig { params(paths: T::Enumerable[::String]).void } - def add_paths(paths); end - - # All the nodes in this tree - # - # source://spoom//lib/spoom/file_tree.rb#51 - sig { returns(T::Array[::Spoom::FileTree::Node]) } - def nodes; end - - # All the paths in this tree - # - # source://spoom//lib/spoom/file_tree.rb#59 - sig { returns(T::Array[::String]) } - def paths; end - - # source://spoom//lib/spoom/file_tree.rb#71 - sig do - params( - out: T.any(::IO, ::StringIO), - show_strictness: T::Boolean, - colors: T::Boolean, - indent_level: ::Integer - ).void - end - def print(out: T.unsafe(nil), show_strictness: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - - # All root nodes - # - # source://spoom//lib/spoom/file_tree.rb#45 - sig { returns(T::Array[::Spoom::FileTree::Node]) } - def roots; end - - # source://spoom//lib/spoom/file_tree.rb#10 - sig { returns(T.nilable(::String)) } - def strip_prefix; end - - private - - # source://spoom//lib/spoom/file_tree.rb#85 - sig do - params( - node: ::Spoom::FileTree::Node, - collected_nodes: T::Array[::Spoom::FileTree::Node] - ).returns(T::Array[::Spoom::FileTree::Node]) - end - def collect_nodes(node, collected_nodes = T.unsafe(nil)); end -end - -# A node representing either a file or a directory inside a FileTree -# -# source://spoom//lib/spoom/file_tree.rb#92 -class Spoom::FileTree::Node < ::T::Struct - const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil) - const :name, ::String - const :parent, T.nilable(::Spoom::FileTree::Node) - - # Full path to this node from root - # - # source://spoom//lib/spoom/file_tree.rb#106 - sig { returns(::String) } - def path; end - - class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# An internal class used to print a FileTree -# -# See `FileTree#print` -# -# source://spoom//lib/spoom/file_tree.rb#117 -class Spoom::FileTree::TreePrinter < ::Spoom::Printer - # source://spoom//lib/spoom/file_tree.rb#132 - sig do - params( - tree: ::Spoom::FileTree, - out: T.any(::IO, ::StringIO), - show_strictness: T::Boolean, - colors: T::Boolean, - indent_level: ::Integer - ).void - end - def initialize(tree:, out: T.unsafe(nil), show_strictness: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - - # source://spoom//lib/spoom/file_tree.rb#144 - sig { params(node: ::Spoom::FileTree::Node).void } - def print_node(node); end - - # source://spoom//lib/spoom/file_tree.rb#171 - sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } - def print_nodes(nodes); end - - # source://spoom//lib/spoom/file_tree.rb#139 - sig { void } - def print_tree; end - - # source://spoom//lib/spoom/file_tree.rb#121 - sig { returns(::Spoom::FileTree) } - def tree; end - - private - - # source://spoom//lib/spoom/file_tree.rb#178 - sig { params(node: ::Spoom::FileTree::Node).returns(T.nilable(::String)) } - def node_strictness(node); end - - # source://spoom//lib/spoom/file_tree.rb#186 - sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } - def strictness_color(strictness); end -end - -# Execute git commands -# -# source://spoom//lib/spoom/git.rb#8 -module Spoom::Git - class << self - # Git commands - # - # source://spoom//lib/spoom/git.rb#36 - sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) } - def checkout(*arg, path: T.unsafe(nil)); end - - # Get the commit Time for a `sha` - # - # source://spoom//lib/spoom/git.rb#81 - sig { params(sha: ::String, path: ::String).returns(T.nilable(::Time)) } - def commit_time(sha, path: T.unsafe(nil)); end - - # Get the commit epoch timestamp for a `sha` - # - # source://spoom//lib/spoom/git.rb#72 - sig { params(sha: ::String, path: ::String).returns(T.nilable(::Integer)) } - def commit_timestamp(sha, path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/git.rb#61 - sig { params(path: ::String).returns(T.nilable(::String)) } - def current_branch(path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/git.rb#41 - sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) } - def diff(*arg, path: T.unsafe(nil)); end - - # Translate a git epoch timestamp into a Time - # - # source://spoom//lib/spoom/git.rb#99 - sig { params(timestamp: ::String).returns(::Time) } - def epoch_to_time(timestamp); end - - # Execute a `command` - # - # source://spoom//lib/spoom/git.rb#14 - sig { params(command: ::String, arg: ::String, path: ::String).returns(::Spoom::ExecResult) } - def exec(command, *arg, path: T.unsafe(nil)); end - - # Get the last commit sha - # - # source://spoom//lib/spoom/git.rb#90 - sig { params(path: ::String).returns(T.nilable(::String)) } - def last_commit(path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/git.rb#46 - sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) } - def log(*arg, path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/git.rb#51 - sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) } - def rev_parse(*arg, path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/git.rb#56 - sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) } - def show(*arg, path: T.unsafe(nil)); end - - # Get the hash of the commit introducing the `sorbet/config` file - # - # source://spoom//lib/spoom/git.rb#111 - sig { params(path: ::String).returns(T.nilable(::String)) } - def sorbet_intro_commit(path: T.unsafe(nil)); end - - # Get the hash of the commit removing the `sorbet/config` file - # - # source://spoom//lib/spoom/git.rb#123 - sig { params(path: ::String).returns(T.nilable(::String)) } - def sorbet_removal_commit(path: T.unsafe(nil)); end - - # Is there uncommited changes in `path`? - # - # source://spoom//lib/spoom/git.rb#105 - sig { params(path: ::String).returns(T::Boolean) } - def workdir_clean?(path: T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/base.rb#5 -module Spoom::LSP; end - -# source://spoom//lib/spoom/sorbet/lsp.rb#13 -class Spoom::LSP::Client - # source://spoom//lib/spoom/sorbet/lsp.rb#17 - sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void } - def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#229 - sig { void } - def close; end - - # source://spoom//lib/spoom/sorbet/lsp.rb#131 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } - def definitions(uri, line, column); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#212 - sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } - def document_symbols(uri); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#89 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) } - def hover(uri, line, column); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#27 - sig { returns(::Integer) } - def next_id; end - - # LSP requests - # - # @raise [Error::AlreadyOpen] - # - # source://spoom//lib/spoom/sorbet/lsp.rb#72 - sig { params(workspace_path: ::String).void } - def open(workspace_path); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#54 - sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } - def read; end - - # @raise [Error::BadHeaders] - # - # source://spoom//lib/spoom/sorbet/lsp.rb#43 - sig { returns(T.nilable(::String)) } - def read_raw; end - - # source://spoom//lib/spoom/sorbet/lsp.rb#173 - sig do - params( - uri: ::String, - line: ::Integer, - column: ::Integer, - include_decl: T::Boolean - ).returns(T::Array[::Spoom::LSP::Location]) - end - def references(uri, line, column, include_decl = T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#37 - sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) } - def send(message); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#32 - sig { params(json_string: ::String).void } - def send_raw(json_string); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#110 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) } - def signatures(uri, line, column); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#197 - sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } - def symbols(query); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#152 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } - def type_definitions(uri, line, column); end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#178 -class Spoom::LSP::Diagnostic < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :code, ::Integer - const :informations, ::Object - const :message, ::String - const :range, ::Spoom::LSP::Range - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#212 -class Spoom::LSP::DocumentSymbol < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :children, T::Array[::Spoom::LSP::DocumentSymbol] - const :detail, T.nilable(::String) - const :kind, ::Integer - const :location, T.nilable(::Spoom::LSP::Location) - const :name, ::String - const :range, T.nilable(::Spoom::LSP::Range) - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272 - sig { returns(::String) } - def kind_string; end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#276 -Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 -class Spoom::LSP::Error < ::StandardError; end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 -class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8 -class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10 -class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32 - sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void } - def initialize(uri, diagnostics); end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17 - sig { returns(T::Array[::Spoom::LSP::Diagnostic]) } - def diagnostics; end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14 - sig { returns(::String) } - def uri; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) } - def from_json(json); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#19 -class Spoom::LSP::Hover < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :contents, ::String - const :range, T.nilable(T::Range[T.untyped]) - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#112 -class Spoom::LSP::Location < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :range, ::Spoom::LSP::Range - const :uri, ::String - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# A general message as defined by JSON-RPC. -# -# The language server protocol always uses `"2.0"` as the `jsonrpc` version. -# -# source://spoom//lib/spoom/sorbet/lsp/base.rb#12 -class Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#19 - sig { void } - def initialize; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#24 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def as_json; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 - sig { returns(::String) } - def jsonrpc; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#32 - sig { params(args: T.untyped).returns(::String) } - def to_json(*args); end -end - -# A notification message. -# -# A processed notification message must not send a response back. They work like events. -# -# source://spoom//lib/spoom/sorbet/lsp/base.rb#64 -class Spoom::LSP::Notification < ::Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#74 - sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } - def initialize(method, params); end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 - sig { returns(::String) } - def method; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#71 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def params; end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#50 -class Spoom::LSP::Position < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :char, ::Integer - const :line, ::Integer - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#9 -module Spoom::LSP::PrintableSymbol - interface! - - # @abstract - # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16 - sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#80 -class Spoom::LSP::Range < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :end, ::Spoom::LSP::Position - const :start, ::Spoom::LSP::Position - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# A request message to describe a request between the client and the server. -# -# Every processed request must send a response back to the sender of the request. -# -# source://spoom//lib/spoom/sorbet/lsp/base.rb#40 -class Spoom::LSP::Request < ::Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#53 - sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } - def initialize(id, method, params); end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 - sig { returns(::Integer) } - def id; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 - sig { returns(::String) } - def method; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#50 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def params; end -end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#40 -class Spoom::LSP::ResponseError < ::Spoom::LSP::Error - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63 - sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void } - def initialize(code, message, data); end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44 - sig { returns(::Integer) } - def code; end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def data; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) } - def from_json(json); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#143 -class Spoom::LSP::SignatureHelp < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :doc, ::Object - const :label, T.nilable(::String) - const :params, T::Array[T.untyped] - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#306 -class Spoom::LSP::SymbolPrinter < ::Spoom::Printer - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#323 - sig do - params( - out: T.any(::IO, ::StringIO), - colors: T::Boolean, - indent_level: ::Integer, - prefix: T.nilable(::String) - ).void - end - def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#345 - sig { params(uri: ::String).returns(::String) } - def clean_uri(uri); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 - sig { returns(T.nilable(::String)) } - def prefix; end - - # @return [String, nil] - # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 - def prefix=(_arg0); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#353 - sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } - def print_list(objects); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#333 - sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } - def print_object(object); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#340 - sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } - def print_objects(objects); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#310 - sig { returns(T::Set[::Integer]) } - def seen; end - - # @return [Set] - # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#310 - def seen=(_arg0); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/printer.rb#7 -class Spoom::Printer - include ::Spoom::Colorize - - abstract! - - # source://spoom//lib/spoom/printer.rb#19 - sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } - def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - - # Colorize `string` with color if `@colors` - # - # source://spoom//lib/spoom/printer.rb#80 - sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } - def colorize(string, *color); end - - # Decrease indent level - # - # source://spoom//lib/spoom/printer.rb#33 - sig { void } - def dedent; end - - # Increase indent level - # - # source://spoom//lib/spoom/printer.rb#27 - sig { void } - def indent; end - - # source://spoom//lib/spoom/printer.rb#16 - sig { returns(T.any(::IO, ::StringIO)) } - def out; end - - # @return [IO, StringIO] - # - # source://spoom//lib/spoom/printer.rb#16 - def out=(_arg0); end - - # Print `string` into `out` - # - # source://spoom//lib/spoom/printer.rb#39 - sig { params(string: T.nilable(::String)).void } - def print(string); end - - # Print `string` colored with `color` into `out` - # - # Does not use colors unless `@colors`. - # - # source://spoom//lib/spoom/printer.rb#49 - sig { params(string: T.nilable(::String), color: ::Spoom::Color).void } - def print_colored(string, *color); end - - # Print `string` with indent and newline - # - # source://spoom//lib/spoom/printer.rb#64 - sig { params(string: T.nilable(::String)).void } - def printl(string); end - - # Print a new line into `out` - # - # source://spoom//lib/spoom/printer.rb#58 - sig { void } - def printn; end - - # Print an indent space into `out` - # - # source://spoom//lib/spoom/printer.rb#74 - sig { void } - def printt; end -end - -# source://spoom//lib/spoom.rb#10 -Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/config.rb#5 -module Spoom::Sorbet - class << self - # source://spoom//lib/spoom/sorbet.rb#31 - sig do - params( - arg: ::String, - path: ::String, - capture_err: T::Boolean, - sorbet_bin: T.nilable(::String) - ).returns(::Spoom::ExecResult) - end - def srb(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - # List all files typechecked by Sorbet from its `config` - # - # source://spoom//lib/spoom/sorbet.rb#55 - sig { params(config: ::Spoom::Sorbet::Config, path: ::String).returns(T::Array[::String]) } - def srb_files(config, path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet.rb#93 - sig do - params( - arg: ::String, - path: ::String, - capture_err: T::Boolean, - sorbet_bin: T.nilable(::String) - ).returns(T.nilable(T::Hash[::String, ::Integer])) - end - def srb_metrics(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet.rb#48 - sig do - params( - arg: ::String, - path: ::String, - capture_err: T::Boolean, - sorbet_bin: T.nilable(::String) - ).returns(::Spoom::ExecResult) - end - def srb_tc(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet.rb#71 - sig do - params( - arg: ::String, - path: ::String, - capture_err: T::Boolean, - sorbet_bin: T.nilable(::String) - ).returns(T.nilable(::String)) - end - def srb_version(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - - # Get `gem` version from the `Gemfile.lock` content - # - # Returns `nil` if `gem` cannot be found in the Gemfile. - # - # source://spoom//lib/spoom/sorbet.rb#116 - sig { params(gem: ::String, path: ::String).returns(T.nilable(::String)) } - def version_from_gemfile_lock(gem: T.unsafe(nil), path: T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/sorbet.rb#16 -Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet.rb#14 -Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String) - -# Parse Sorbet config files -# -# Parses a Sorbet config file: -# -# ```ruby -# config = Spoom::Sorbet::Config.parse_file("sorbet/config") -# puts config.paths # "." -# ``` -# -# Parses a Sorbet config string: -# -# ```ruby -# config = Spoom::Sorbet::Config.parse_string(<<~CONFIG) -# a -# --file=b -# --ignore=c -# CONFIG -# puts config.paths # "a", "b" -# puts config.ignore # "c" -# ``` -# -# source://spoom//lib/spoom/sorbet/config.rb#26 -class Spoom::Sorbet::Config - # source://spoom//lib/spoom/sorbet/config.rb#36 - sig { void } - def initialize; end - - # @return [Array] - # - # source://spoom//lib/spoom/sorbet/config.rb#30 - def allowed_extensions; end - - # source://spoom//lib/spoom/sorbet/config.rb#44 - sig { returns(::Spoom::Sorbet::Config) } - def copy; end - - # @return [Array] - # - # source://spoom//lib/spoom/sorbet/config.rb#30 - def ignore; end - - # source://spoom//lib/spoom/sorbet/config.rb#33 - sig { returns(T::Boolean) } - def no_stdlib; end - - # @return [Boolean] - # - # source://spoom//lib/spoom/sorbet/config.rb#33 - def no_stdlib=(_arg0); end - - # Returns self as a string of options that can be passed to Sorbet - # - # Example: - # ~~~rb - # config = Sorbet::Config.new - # config.paths << "/foo" - # config.paths << "/bar" - # config.ignore << "/baz" - # config.allowed_extensions << ".rb" - # - # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb" - # ~~~ - # - # source://spoom//lib/spoom/sorbet/config.rb#66 - sig { returns(::String) } - def options_string; end - - # source://spoom//lib/spoom/sorbet/config.rb#30 - sig { returns(T::Array[::String]) } - def paths; end - - class << self - # source://spoom//lib/spoom/sorbet/config.rb#79 - sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) } - def parse_file(sorbet_config_path); end - - # source://spoom//lib/spoom/sorbet/config.rb#84 - sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) } - def parse_string(sorbet_config); end - - private - - # source://spoom//lib/spoom/sorbet/config.rb#148 - sig { params(line: ::String).returns(::String) } - def parse_option(line); end - end -end - -# source://spoom//lib/spoom/sorbet/errors.rb#6 -module Spoom::Sorbet::Errors - class << self - # source://spoom//lib/spoom/sorbet/errors.rb#13 - sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def sort_errors_by_code(errors); end - end -end - -# source://spoom//lib/spoom/sorbet/errors.rb#7 -Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/errors.rb#122 -class Spoom::Sorbet::Errors::Error - include ::Comparable - - # source://spoom//lib/spoom/sorbet/errors.rb#148 - sig do - params( - file: T.nilable(::String), - line: T.nilable(::Integer), - message: T.nilable(::String), - code: T.nilable(::Integer), - more: T::Array[::String] - ).void - end - def initialize(file, line, message, code, more = T.unsafe(nil)); end - - # By default errors are sorted by location - # - # source://spoom//lib/spoom/sorbet/errors.rb#159 - sig { params(other: T.untyped).returns(::Integer) } - def <=>(other); end - - # @return [Integer, nil] - # - # source://spoom//lib/spoom/sorbet/errors.rb#130 - def code; end - - # source://spoom//lib/spoom/sorbet/errors.rb#127 - sig { returns(T.nilable(::String)) } - def file; end - - # Other files associated with the error - # - # source://spoom//lib/spoom/sorbet/errors.rb#137 - sig { returns(T::Set[::String]) } - def files_from_error_sections; end - - # source://spoom//lib/spoom/sorbet/errors.rb#130 - sig { returns(T.nilable(::Integer)) } - def line; end - - # @return [String, nil] - # - # source://spoom//lib/spoom/sorbet/errors.rb#127 - def message; end - - # source://spoom//lib/spoom/sorbet/errors.rb#133 - sig { returns(T::Array[::String]) } - def more; end - - # source://spoom//lib/spoom/sorbet/errors.rb#166 - sig { returns(::String) } - def to_s; end -end - -# Parse errors from Sorbet output -# -# source://spoom//lib/spoom/sorbet/errors.rb#18 -class Spoom::Sorbet::Errors::Parser - # source://spoom//lib/spoom/sorbet/errors.rb#40 - sig { params(error_url_base: ::String).void } - def initialize(error_url_base: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/errors.rb#47 - sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def parse(output); end - - private - - # source://spoom//lib/spoom/sorbet/errors.rb#111 - sig { params(line: ::String).void } - def append_error(line); end - - # source://spoom//lib/spoom/sorbet/errors.rb#103 - sig { void } - def close_error; end - - # source://spoom//lib/spoom/sorbet/errors.rb#70 - sig { params(error_url_base: ::String).returns(::Regexp) } - def error_line_match_regexp(error_url_base); end - - # source://spoom//lib/spoom/sorbet/errors.rb#87 - sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } - def match_error_line(line); end - - # source://spoom//lib/spoom/sorbet/errors.rb#96 - sig { params(error: ::Spoom::Sorbet::Errors::Error).void } - def open_error(error); end - - class << self - # source://spoom//lib/spoom/sorbet/errors.rb#33 - sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def parse_string(output, error_url_base: T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/sorbet/errors.rb#21 -Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/sorbet.rb#15 -Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/metrics.rb#8 -module Spoom::Sorbet::MetricsParser - class << self - # source://spoom//lib/spoom/sorbet/metrics.rb#15 - sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_file(path, prefix = T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/metrics.rb#25 - sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_hash(obj, prefix = T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/metrics.rb#20 - sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_string(string, prefix = T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/sorbet/metrics.rb#9 -Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet.rb#18 -Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) - -# source://spoom//lib/spoom/sorbet/sigils.rb#9 -module Spoom::Sorbet::Sigils - class << self - # changes the sigil in the file at the passed path to the specified new strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#69 - sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) } - def change_sigil_in_file(path, new_strictness); end - - # changes the sigil to have a new strictness in a list of files - # - # source://spoom//lib/spoom/sorbet/sigils.rb#80 - sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) } - def change_sigil_in_files(path_list, new_strictness); end - - # returns a string containing the strictness of a sigil in a file at the passed path - # * returns nil if no sigil - # - # source://spoom//lib/spoom/sorbet/sigils.rb#60 - sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) } - def file_strictness(path); end - - # finds all files in the specified directory with the passed strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#94 - sig do - params( - directory: T.any(::Pathname, ::String), - strictness: ::String, - extension: ::String - ).returns(T::Array[::String]) - end - def files_with_sigil_strictness(directory, strictness, extension: T.unsafe(nil)); end - - # returns the full sigil comment string for the passed strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#35 - sig { params(strictness: ::String).returns(::String) } - def sigil_string(strictness); end - - # returns the strictness of a sigil in the passed file content string (nil if no sigil) - # - # source://spoom//lib/spoom/sorbet/sigils.rb#47 - sig { params(content: ::String).returns(T.nilable(::String)) } - def strictness_in_content(content); end - - # returns a string which is the passed content but with the sigil updated to a new strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#53 - sig { params(content: ::String, new_strictness: ::String).returns(::String) } - def update_sigil(content, new_strictness); end - - # returns true if the passed string is a valid strictness (else false) - # - # source://spoom//lib/spoom/sorbet/sigils.rb#41 - sig { params(strictness: ::String).returns(T::Boolean) } - def valid_strictness?(strictness); end - end -end - -# source://spoom//lib/spoom/sorbet/sigils.rb#28 -Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://spoom//lib/spoom/sorbet/sigils.rb#13 -Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#12 -Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#17 -Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#15 -Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#16 -Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#14 -Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#19 -Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/timeline.rb#7 -class Spoom::Timeline - # source://spoom//lib/spoom/timeline.rb#11 - sig { params(from: ::Time, to: ::Time, path: ::String).void } - def initialize(from, to, path: T.unsafe(nil)); end - - # Return one commit for each date in `dates` - # - # source://spoom//lib/spoom/timeline.rb#38 - sig { params(dates: T::Array[::Time]).returns(T::Array[::String]) } - def commits_for_dates(dates); end - - # Return all months between `from` and `to` - # - # source://spoom//lib/spoom/timeline.rb#25 - sig { returns(T::Array[::Time]) } - def months; end - - # Return one commit for each month between `from` and `to` - # - # source://spoom//lib/spoom/timeline.rb#19 - sig { returns(T::Array[::String]) } - def ticks; end -end - -# source://spoom//lib/spoom/version.rb#5 -Spoom::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/spoom@1.2.4.rbi b/sorbet/rbi/gems/spoom@1.2.4.rbi new file mode 100644 index 0000000..e1ae7a4 --- /dev/null +++ b/sorbet/rbi/gems/spoom@1.2.4.rbi @@ -0,0 +1,3777 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `spoom` gem. +# Please instead update this file by running `bin/tapioca gem spoom`. + +# source://spoom//lib/spoom.rb#7 +module Spoom; end + +# source://spoom//lib/spoom/cli/helper.rb#9 +module Spoom::Cli; end + +# source://spoom//lib/spoom/cli/bump.rb#9 +class Spoom::Cli::Bump < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/bump.rb#49 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/bump.rb#170 + def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/bump.rb#192 + def undo_changes(files, from_strictness); end +end + +# source://spoom//lib/spoom/cli/config.rb#9 +class Spoom::Cli::Config < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/config.rb#15 + def show; end +end + +# source://spoom//lib/spoom/cli/coverage.rb#9 +class Spoom::Cli::Coverage < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/coverage.rb#198 + def bundle_install(path, sha); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/coverage.rb#210 + def message_no_data(file); end + + # source://spoom//lib/spoom/cli/coverage.rb#173 + def open(file = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/coverage.rb#189 + def parse_time(string, option); end + + # source://spoom//lib/spoom/cli/coverage.rb#142 + def report; end + + # source://spoom//lib/spoom/cli/coverage.rb#20 + def snapshot; end + + # source://spoom//lib/spoom/cli/coverage.rb#42 + def timeline; end +end + +# source://spoom//lib/spoom/cli/coverage.rb#12 +Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/helper.rb#10 +module Spoom::Cli::Helper + include ::Spoom::Colorize + + requires_ancestor { Thor } + + # source://spoom//lib/spoom/cli/helper.rb#119 + sig { params(string: ::String).returns(::String) } + def blue(string); end + + # Is the `--color` option true? + # + # source://spoom//lib/spoom/cli/helper.rb#83 + sig { returns(T::Boolean) } + def color?; end + + # Colorize a string if `color?` + # + # source://spoom//lib/spoom/cli/helper.rb#112 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Returns the context at `--path` (by default the current working directory) + # + # source://spoom//lib/spoom/cli/helper.rb#51 + sig { returns(::Spoom::Context) } + def context; end + + # Raise if `spoom` is not ran inside a context with a `sorbet/config` file + # + # source://spoom//lib/spoom/cli/helper.rb#57 + sig { returns(::Spoom::Context) } + def context_requiring_sorbet!; end + + # source://spoom//lib/spoom/cli/helper.rb#124 + sig { params(string: ::String).returns(::String) } + def cyan(string); end + + # Return the path specified through `--path` + # + # source://spoom//lib/spoom/cli/helper.rb#72 + sig { returns(::String) } + def exec_path; end + + # source://spoom//lib/spoom/cli/helper.rb#129 + sig { params(string: ::String).returns(::String) } + def gray(string); end + + # source://spoom//lib/spoom/cli/helper.rb#134 + sig { params(string: ::String).returns(::String) } + def green(string); end + + # source://spoom//lib/spoom/cli/helper.rb#88 + sig { params(string: ::String).returns(::String) } + def highlight(string); end + + # source://spoom//lib/spoom/cli/helper.rb#139 + sig { params(string: ::String).returns(::String) } + def red(string); end + + # Print `message` on `$stdout` + # + # source://spoom//lib/spoom/cli/helper.rb#20 + sig { params(message: ::String).void } + def say(message); end + + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Error`). + # + # source://spoom//lib/spoom/cli/helper.rb#39 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/helper.rb#144 + sig { params(string: ::String).returns(::String) } + def yellow(string); end +end + +# source://spoom//lib/spoom/cli/lsp.rb#10 +class Spoom::Cli::LSP < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#55 + def defs(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#65 + def find(query); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#41 + def hover(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#26 + def list; end + + # source://spoom//lib/spoom/cli/lsp.rb#114 + def lsp_client; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#85 + def refs(file, line, col); end + + # source://spoom//lib/spoom/cli/lsp.rb#137 + def run(&block); end + + # source://spoom//lib/spoom/cli/lsp.rb#16 + def show; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#95 + def sigs(file, line, col); end + + # source://spoom//lib/spoom/cli/lsp.rb#129 + def symbol_printer; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#75 + def symbols(file); end + + # source://spoom//lib/spoom/cli/lsp.rb#162 + def to_uri(path); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#105 + def types(file, line, col); end +end + +# source://spoom//lib/spoom/cli.rb#16 +class Spoom::Cli::Main < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli.rb#61 + def __print_version; end + + # source://thor/1.2.2/lib/thor.rb#239 + def bump(*args); end + + # source://thor/1.2.2/lib/thor.rb#239 + def config(*args); end + + # source://thor/1.2.2/lib/thor.rb#239 + def coverage(*args); end + + # source://spoom//lib/spoom/cli.rb#43 + def files; end + + # source://thor/1.2.2/lib/thor.rb#239 + def lsp(*args); end + + # source://thor/1.2.2/lib/thor.rb#239 + def tc(*args); end + + class << self + # @return [Boolean] + # + # source://spoom//lib/spoom/cli.rb#68 + def exit_on_failure?; end + end +end + +# source://spoom//lib/spoom/cli/run.rb#6 +class Spoom::Cli::Run < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/run.rb#131 + def colorize_message(message); end + + # source://spoom//lib/spoom/cli/run.rb#122 + def format_error(error, format); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/run.rb#26 + def tc(*paths_to_select); end +end + +# source://spoom//lib/spoom/cli/run.rb#15 +Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/run.rb#11 +Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/run.rb#13 +Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/cli/run.rb#12 +Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/colors.rb#5 +class Spoom::Color < ::T::Enum + enums do + CLEAR = new + BOLD = new + BLACK = new + RED = new + GREEN = new + YELLOW = new + BLUE = new + MAGENTA = new + CYAN = new + WHITE = new + LIGHT_BLACK = new + LIGHT_RED = new + LIGHT_GREEN = new + LIGHT_YELLOW = new + LIGHT_BLUE = new + LIGHT_MAGENTA = new + LIGHT_CYAN = new + LIGHT_WHITE = new + end + + # source://spoom//lib/spoom/colors.rb#32 + sig { returns(::String) } + def ansi_code; end +end + +# source://spoom//lib/spoom/colors.rb#37 +module Spoom::Colorize + # source://spoom//lib/spoom/colors.rb#41 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def set_color(string, *color); end +end + +# An abstraction to a Ruby project context +# +# A context maps to a directory in the file system. +# It is used to manipulate files and run commands in the context of this directory. +# +# source://spoom//lib/spoom/context/bundle.rb#5 +class Spoom::Context + include ::Spoom::Context::Bundle + include ::Spoom::Context::Exec + include ::Spoom::Context::FileSystem + include ::Spoom::Context::Git + include ::Spoom::Context::Sorbet + + # Create a new context about `absolute_path` + # + # The directory will not be created if it doesn't exist. + # Call `#make!` to create it. + # + # source://spoom//lib/spoom/context.rb#51 + sig { params(absolute_path: ::String).void } + def initialize(absolute_path); end + + # The absolute path to the directory this context is about + # + # source://spoom//lib/spoom/context.rb#44 + sig { returns(::String) } + def absolute_path; end + + class << self + # Create a new context in the system's temporary directory + # + # `name` is used as prefix to the temporary directory name. + # The directory will be created if it doesn't exist. + # + # source://spoom//lib/spoom/context.rb#37 + sig { params(name: T.nilable(::String)).returns(T.attached_class) } + def mktmp!(name = T.unsafe(nil)); end + end +end + +# Bundle features for a context +# +# source://spoom//lib/spoom/context/bundle.rb#7 +module Spoom::Context::Bundle + requires_ancestor { Spoom::Context } + + # Run a command with `bundle` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#33 + sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Run a command `bundle exec` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#46 + sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Run `bundle install` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#40 + sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Get `gem` version from the `Gemfile.lock` content + # + # Returns `nil` if `gem` cannot be found in the Gemfile. + # + # source://spoom//lib/spoom/context/bundle.rb#62 + sig { params(gem: ::String).returns(T.nilable(::String)) } + def gem_version_from_gemfile_lock(gem); end + + # source://spoom//lib/spoom/context/bundle.rb#51 + sig { returns(T::Hash[::String, ::Bundler::LazySpecification]) } + def gemfile_lock_specs; end + + # Read the contents of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#15 + sig { returns(T.nilable(::String)) } + def read_gemfile; end + + # Read the contents of the Gemfile.lock in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#21 + sig { returns(T.nilable(::String)) } + def read_gemfile_lock; end + + # Set the `contents` of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#27 + sig { params(contents: ::String, append: T::Boolean).void } + def write_gemfile!(contents, append: T.unsafe(nil)); end +end + +# Execution features for a context +# +# source://spoom//lib/spoom/context/exec.rb#27 +module Spoom::Context::Exec + requires_ancestor { Spoom::Context } + + # Run a command in this context directory + # + # source://spoom//lib/spoom/context/exec.rb#35 + sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def exec(command, capture_err: T.unsafe(nil)); end +end + +# File System features for a context +# +# source://spoom//lib/spoom/context/file_system.rb#7 +module Spoom::Context::FileSystem + requires_ancestor { Spoom::Context } + + # Returns the absolute path to `relative_path` in the context's directory + # + # source://spoom//lib/spoom/context/file_system.rb#15 + sig { params(relative_path: ::String).returns(::String) } + def absolute_path_to(relative_path); end + + # source://spoom//lib/spoom/context/file_system.rb#53 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).returns(T::Array[::String]) + end + def collect_files(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # Delete this context and its content + # + # Warning: it will `rm -rf` the context directory on the file system. + # + # source://spoom//lib/spoom/context/file_system.rb#105 + sig { void } + def destroy!; end + + # Does the context directory at `absolute_path` exist and is a directory? + # + # source://spoom//lib/spoom/context/file_system.rb#21 + sig { returns(T::Boolean) } + def exist?; end + + # Does `relative_path` point to an existing file in this context directory? + # + # source://spoom//lib/spoom/context/file_system.rb#65 + sig { params(relative_path: ::String).returns(T::Boolean) } + def file?(relative_path); end + + # List all files in this context matching `pattern` + # + # source://spoom//lib/spoom/context/file_system.rb#34 + sig { params(pattern: ::String).returns(T::Array[::String]) } + def glob(pattern = T.unsafe(nil)); end + + # List all files at the top level of this context directory + # + # source://spoom//lib/spoom/context/file_system.rb#42 + sig { returns(T::Array[::String]) } + def list; end + + # Create the context directory at `absolute_path` + # + # source://spoom//lib/spoom/context/file_system.rb#27 + sig { void } + def mkdir!; end + + # Move the file or directory from `from_relative_path` to `to_relative_path` + # + # source://spoom//lib/spoom/context/file_system.rb#95 + sig { params(from_relative_path: ::String, to_relative_path: ::String).void } + def move!(from_relative_path, to_relative_path); end + + # Return the contents of the file at `relative_path` in this context directory + # + # Will raise if the file doesn't exist. + # + # source://spoom//lib/spoom/context/file_system.rb#73 + sig { params(relative_path: ::String).returns(::String) } + def read(relative_path); end + + # Remove the path at `relative_path` (recursive + force) in this context directory + # + # source://spoom//lib/spoom/context/file_system.rb#89 + sig { params(relative_path: ::String).void } + def remove!(relative_path); end + + # Write `contents` in the file at `relative_path` in this context directory + # + # Append to the file if `append` is true. + # + # source://spoom//lib/spoom/context/file_system.rb#81 + sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } + def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end +end + +# Git features for a context +# +# source://spoom//lib/spoom/context/git.rb#35 +module Spoom::Context::Git + requires_ancestor { Spoom::Context } + + # Run a command prefixed by `git` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#43 + sig { params(command: ::String).returns(::Spoom::ExecResult) } + def git(command); end + + # Run `git checkout` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#62 + sig { params(ref: ::String).returns(::Spoom::ExecResult) } + def git_checkout!(ref: T.unsafe(nil)); end + + # Run `git checkout -b ` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#68 + sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) } + def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end + + # Run `git add . && git commit` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#78 + sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) } + def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end + + # Get the current git branch in this context directory + # + # source://spoom//lib/spoom/context/git.rb#89 + sig { returns(T.nilable(::String)) } + def git_current_branch; end + + # Run `git diff` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#98 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_diff(*arg); end + + # Run `git init` in this context directory + # + # Warning: passing a branch will run `git init -b ` which is only available in git 2.28+. + # In older versions, use `git_init!` followed by `git("checkout -b ")`. + # + # source://spoom//lib/spoom/context/git.rb#52 + sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) } + def git_init!(branch: T.unsafe(nil)); end + + # Get the last commit in the currently checked out branch + # + # source://spoom//lib/spoom/context/git.rb#104 + sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } + def git_last_commit(short_sha: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#115 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_log(*arg); end + + # Run `git push ` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#121 + sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) } + def git_push!(remote, ref, force: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#126 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_show(*arg); end + + # Is there uncommited changes in this context directory? + # + # source://spoom//lib/spoom/context/git.rb#132 + sig { params(path: ::String).returns(T::Boolean) } + def git_workdir_clean?(path: T.unsafe(nil)); end +end + +# Sorbet features for a context +# +# source://spoom//lib/spoom/context/sorbet.rb#7 +module Spoom::Context::Sorbet + requires_ancestor { Spoom::Context } + + # Does this context has a `sorbet/config` file? + # + # source://spoom//lib/spoom/context/sorbet.rb#119 + sig { returns(T::Boolean) } + def has_sorbet_config?; end + + # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) + # + # source://spoom//lib/spoom/context/sorbet.rb#142 + sig { params(relative_path: ::String).returns(T.nilable(::String)) } + def read_file_strictness(relative_path); end + + # Read the contents of `sorbet/config` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#130 + sig { returns(::String) } + def read_sorbet_config; end + + # source://spoom//lib/spoom/context/sorbet.rb#124 + sig { returns(::Spoom::Sorbet::Config) } + def sorbet_config; end + + # Get the commit introducing the `sorbet/config` file + # + # source://spoom//lib/spoom/context/sorbet.rb#148 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_intro_commit; end + + # Get the commit removing the `sorbet/config` file + # + # source://spoom//lib/spoom/context/sorbet.rb#160 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_removal_commit; end + + # Run `bundle exec srb` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#15 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # List all files typechecked by Sorbet from its `config` + # + # source://spoom//lib/spoom/context/sorbet.rb#65 + sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) } + def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end + + # List all files typechecked by Sorbet from its `config` that matches `strictness` + # + # source://spoom//lib/spoom/context/sorbet.rb#104 + sig do + params( + strictness: ::String, + with_config: T.nilable(::Spoom::Sorbet::Config), + include_rbis: T::Boolean + ).returns(T::Array[::String]) + end + def srb_files_with_strictness(strictness, with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#45 + sig do + params( + arg: ::String, + sorbet_bin: T.nilable(::String), + capture_err: T::Boolean + ).returns(T.nilable(T::Hash[::String, ::Integer])) + end + def srb_metrics(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#33 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#110 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) } + def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Set the `contents` of `sorbet/config` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#136 + sig { params(contents: ::String, append: T::Boolean).void } + def write_sorbet_config!(contents, append: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/snapshot.rb#5 +module Spoom::Coverage + class << self + # source://spoom//lib/spoom/coverage.rb#103 + sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) } + def file_tree(context); end + + # source://spoom//lib/spoom/coverage.rb#83 + sig do + params( + context: ::Spoom::Context, + snapshots: T::Array[::Spoom::Coverage::Snapshot], + palette: ::Spoom::Coverage::D3::ColorPalette + ).returns(::Spoom::Coverage::Report) + end + def report(context, snapshots, palette:); end + + # source://spoom//lib/spoom/coverage.rb#16 + sig do + params( + context: ::Spoom::Context, + rbi: T::Boolean, + sorbet_bin: T.nilable(::String) + ).returns(::Spoom::Coverage::Snapshot) + end + def snapshot(context, rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/coverage/report.rb#88 +module Spoom::Coverage::Cards; end + +# source://spoom//lib/spoom/coverage/report.rb#89 +class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template + # source://spoom//lib/spoom/coverage/report.rb#98 + sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void } + def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end + + # @return [String, nil] + # + # source://spoom//lib/spoom/coverage/report.rb#95 + def body; end + + # source://spoom//lib/spoom/coverage/report.rb#95 + sig { returns(T.nilable(::String)) } + def title; end +end + +# source://spoom//lib/spoom/coverage/report.rb#92 +Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#105 +class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card + abstract! + + # source://spoom//lib/spoom/coverage/report.rb#112 + sig { void } + def initialize; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/report.rb#120 + sig { abstract.returns(::String) } + def erb; end + + # source://spoom//lib/spoom/coverage/report.rb#115 + sig { override.returns(::String) } + def html; end +end + +# source://spoom//lib/spoom/coverage/report.rb#153 +class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#164 + sig do + params( + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], + title: ::String + ).void + end + def initialize(file_tree:, nodes_strictnesses:, nodes_strictness_scores:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#123 +class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#132 + sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void } + def initialize(snapshot:, title: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#143 + sig { returns(::Spoom::Coverage::D3::Pie::Calls) } + def pie_calls; end + + # source://spoom//lib/spoom/coverage/report.rb#138 + sig { returns(::Spoom::Coverage::D3::Pie::Sigils) } + def pie_sigils; end + + # source://spoom//lib/spoom/coverage/report.rb#148 + sig { returns(::Spoom::Coverage::D3::Pie::Sigs) } + def pie_sigs; end + + # source://spoom//lib/spoom/coverage/report.rb#129 + sig { returns(::Spoom::Coverage::Snapshot) } + def snapshot; end +end + +# source://spoom//lib/spoom/coverage/report.rb#126 +Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/report.rb#240 +class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb + # source://spoom//lib/spoom/coverage/report.rb#244 + sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void } + def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#250 + sig { override.returns(::String) } + def erb; end +end + +# source://spoom//lib/spoom/coverage/report.rb#177 +class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#181 + sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void } + def initialize(title:, timeline:); end +end + +# source://spoom//lib/spoom/coverage/report.rb#194 +class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#198 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#212 +class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#216 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#230 +class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#234 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#185 +class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#189 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#203 +class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#207 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#221 +class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#225 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/d3/base.rb#6 +module Spoom::Coverage::D3 + class << self + # source://spoom//lib/spoom/coverage/d3.rb#61 + sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) } + def header_script(palette); end + + # source://spoom//lib/spoom/coverage/d3.rb#21 + sig { returns(::String) } + def header_style; end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/base.rb#7 +class Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/base.rb#17 + sig { params(id: ::String, data: T.untyped).void } + def initialize(id, data); end + + # source://spoom//lib/spoom/coverage/d3/base.rb#37 + sig { returns(::String) } + def html; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#14 + sig { returns(::String) } + def id; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/d3/base.rb#50 + sig { abstract.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#45 + sig { returns(::String) } + def tooltip; end + + class << self + # source://spoom//lib/spoom/coverage/d3/base.rb#31 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#26 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3.rb#12 +Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#11 +Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#14 +Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#15 +Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#13 +Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3/circle_map.rb#9 +class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#59 + sig { override.returns(::String) } + def script; end + + class << self + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#40 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#14 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/circle_map.rb#148 +class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#159 + sig do + params( + id: ::String, + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_scores: T::Hash[::Spoom::FileTree::Node, ::Float] + ).void + end + def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end + + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#166 + sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) } + def tree_node_to_json(node); end +end + +# source://spoom//lib/spoom/coverage/d3.rb#103 +class Spoom::Coverage::D3::ColorPalette < ::T::Struct + prop :ignore, ::String + prop :false, ::String + prop :true, ::String + prop :strict, ::String + prop :strong, ::String + + class << self + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/pie.rb#9 +class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/pie.rb#16 + sig { params(id: ::String, title: ::String, data: T.untyped).void } + def initialize(id, title, data); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#56 + sig { override.returns(::String) } + def script; end + + class << self + # source://spoom//lib/spoom/coverage/d3/pie.rb#43 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#25 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#141 +class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#145 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#150 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#123 +class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#127 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#132 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#159 +class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#163 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#172 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/timeline.rb#9 +class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#16 + sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void } + def initialize(id, data, keys); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#187 + sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#203 + sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # @abstract + # + # source://spoom//lib/spoom/coverage/d3/timeline.rb#126 + sig { abstract.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#217 + sig { params(y: ::String).returns(::String) } + def points(y:); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#101 + sig { override.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#129 + sig { returns(::String) } + def x_scale; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#145 + sig { returns(::String) } + def x_ticks; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#158 + sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) } + def y_scale(min:, max:, ticks:); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#174 + sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) } + def y_ticks(ticks:, format:, padding:); end + + class << self + # source://spoom//lib/spoom/coverage/d3/timeline.rb#79 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#25 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#448 +class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#452 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#466 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#505 +class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#509 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#577 + sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#617 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#537 + sig { override.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#523 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#282 +class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline + # source://spoom//lib/spoom/coverage/d3/timeline.rb#286 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#311 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#298 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#421 +class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#425 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#439 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#475 +class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#479 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#496 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/timeline.rb#329 +class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline + abstract! + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#388 + sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#377 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#336 + sig { override.returns(::String) } + def script; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#232 +class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline + # source://spoom//lib/spoom/coverage/d3/timeline.rb#236 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#263 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#249 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#38 +class Spoom::Coverage::Page < ::Spoom::Coverage::Template + abstract! + + # source://spoom//lib/spoom/coverage/report.rb#53 + sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void } + def initialize(title:, palette:, template: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#75 + sig { returns(::String) } + def body_html; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/report.rb#80 + sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) } + def cards; end + + # source://spoom//lib/spoom/coverage/report.rb#83 + sig { returns(::String) } + def footer_html; end + + # source://spoom//lib/spoom/coverage/report.rb#70 + sig { returns(::String) } + def header_html; end + + # source://spoom//lib/spoom/coverage/report.rb#65 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/report.rb#60 + sig { returns(::String) } + def header_style; end + + # source://spoom//lib/spoom/coverage/report.rb#50 + sig { returns(::Spoom::Coverage::D3::ColorPalette) } + def palette; end + + # source://spoom//lib/spoom/coverage/report.rb#47 + sig { returns(::String) } + def title; end +end + +# source://spoom//lib/spoom/coverage/report.rb#44 +Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/report.rb#261 +class Spoom::Coverage::Report < ::Spoom::Coverage::Page + # source://spoom//lib/spoom/coverage/report.rb#276 + sig do + params( + project_name: ::String, + palette: ::Spoom::Coverage::D3::ColorPalette, + snapshots: T::Array[::Spoom::Coverage::Snapshot], + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], + sorbet_intro_commit: T.nilable(::String), + sorbet_intro_date: T.nilable(::Time) + ).void + end + def initialize(project_name:, palette:, snapshots:, file_tree:, nodes_strictnesses:, nodes_strictness_scores:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#308 + sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) } + def cards; end + + # source://spoom//lib/spoom/coverage/report.rb#297 + sig { override.returns(::String) } + def header_html; end +end + +# source://spoom//lib/spoom/coverage/snapshot.rb#6 +class Spoom::Coverage::Snapshot < ::T::Struct + prop :timestamp, ::Integer, default: T.unsafe(nil) + prop :version_static, T.nilable(::String), default: T.unsafe(nil) + prop :version_runtime, T.nilable(::String), default: T.unsafe(nil) + prop :duration, ::Integer, default: T.unsafe(nil) + prop :commit_sha, T.nilable(::String), default: T.unsafe(nil) + prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil) + prop :files, ::Integer, default: T.unsafe(nil) + prop :rbi_files, ::Integer, default: T.unsafe(nil) + prop :modules, ::Integer, default: T.unsafe(nil) + prop :classes, ::Integer, default: T.unsafe(nil) + prop :singleton_classes, ::Integer, default: T.unsafe(nil) + prop :methods_without_sig, ::Integer, default: T.unsafe(nil) + prop :methods_with_sig, ::Integer, default: T.unsafe(nil) + prop :calls_untyped, ::Integer, default: T.unsafe(nil) + prop :calls_typed, ::Integer, default: T.unsafe(nil) + prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil) + prop :methods_with_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) + prop :methods_without_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) + prop :sigils_excluding_rbis, T::Hash[::String, ::Integer], default: T.unsafe(nil) + + # source://spoom//lib/spoom/coverage/snapshot.rb#33 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } + def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#39 + sig { params(arg: T.untyped).returns(::String) } + def to_json(*arg); end + + class << self + # source://spoom//lib/spoom/coverage/snapshot.rb#47 + sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) } + def from_json(json); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#52 + sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } + def from_obj(obj); end + + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# The strictness name as found in the Sorbet metrics file +# +# source://spoom//lib/spoom/coverage/snapshot.rb#30 +Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/coverage/snapshot.rb#95 +class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer + # source://spoom//lib/spoom/coverage/snapshot.rb#99 + sig { params(snapshot: ::Spoom::Coverage::Snapshot).void } + def print_snapshot(snapshot); end + + private + + # source://spoom//lib/spoom/coverage/snapshot.rb#158 + sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) } + def percent(value, total); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#147 + sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void } + def print_map(hash, total); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#10 +class Spoom::Coverage::Template + abstract! + + # Create a new template from an Erb file path + # + # source://spoom//lib/spoom/coverage/report.rb#18 + sig { params(template: ::String).void } + def initialize(template:); end + + # source://spoom//lib/spoom/coverage/report.rb#23 + sig { returns(::String) } + def erb; end + + # source://spoom//lib/spoom/coverage/report.rb#33 + sig { returns(::Binding) } + def get_binding; end + + # source://spoom//lib/spoom/coverage/report.rb#28 + sig { returns(::String) } + def html; end +end + +# source://spoom//lib/spoom/deadcode/erb.rb#27 +module Spoom::Deadcode + class << self + # source://spoom//lib/spoom/deadcode.rb#51 + sig do + params( + index: ::Spoom::Deadcode::Index, + erb: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode.rb#40 + sig do + params( + index: ::Spoom::Deadcode::Index, + ruby: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/plugins.rb#74 + sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + def load_custom_plugins(context); end + + # source://spoom//lib/spoom/deadcode/plugins.rb#60 + sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + def plugins_from_gemfile_lock(context); end + end +end + +# source://spoom//lib/spoom/deadcode/plugins.rb#25 +Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/deadcode/plugins.rb#27 +Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set) + +# A definition is a class, module, method, constant, etc. being defined in the code +# +# source://spoom//lib/spoom/deadcode/definition.rb#7 +class Spoom::Deadcode::Definition < ::T::Struct + const :kind, ::Spoom::Deadcode::Definition::Kind + const :name, ::String + const :full_name, ::String + const :location, ::Spoom::Deadcode::Location + const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) + + # source://spoom//lib/spoom/deadcode/definition.rb#78 + sig { void } + def alive!; end + + # Status + # + # source://spoom//lib/spoom/deadcode/definition.rb#73 + sig { returns(T::Boolean) } + def alive?; end + + # Kind + # + # source://spoom//lib/spoom/deadcode/definition.rb#41 + sig { returns(T::Boolean) } + def attr_reader?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#46 + sig { returns(T::Boolean) } + def attr_writer?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#51 + sig { returns(T::Boolean) } + def class?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#56 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#83 + sig { returns(T::Boolean) } + def dead?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#93 + sig { void } + def ignored!; end + + # source://spoom//lib/spoom/deadcode/definition.rb#88 + sig { returns(T::Boolean) } + def ignored?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#61 + sig { returns(T::Boolean) } + def method?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#66 + sig { returns(T::Boolean) } + def module?; end + + class << self + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/definition.rb#10 +class Spoom::Deadcode::Definition::Kind < ::T::Enum + enums do + AttrReader = new + AttrWriter = new + Class = new + Constant = new + Method = new + Module = new + end +end + +# source://spoom//lib/spoom/deadcode/definition.rb#21 +class Spoom::Deadcode::Definition::Status < ::T::Enum + enums do + ALIVE = new + DEAD = new + IGNORED = new + end +end + +# Custom engine to handle ERB templates as used by Rails +# +# source://spoom//lib/spoom/deadcode/erb.rb#29 +class Spoom::Deadcode::ERB < ::Erubi::Engine + # source://spoom//lib/spoom/deadcode/erb.rb#33 + sig { params(input: T.untyped, properties: T.untyped).void } + def initialize(input, properties = T.unsafe(nil)); end + + private + + # source://spoom//lib/spoom/deadcode/erb.rb#83 + sig { override.params(code: T.untyped).void } + def add_code(code); end + + # source://spoom//lib/spoom/deadcode/erb.rb#66 + sig { override.params(indicator: T.untyped, code: T.untyped).void } + def add_expression(indicator, code); end + + # source://spoom//lib/spoom/deadcode/erb.rb#89 + sig { override.params(_: T.untyped).void } + def add_postamble(_); end + + # source://spoom//lib/spoom/deadcode/erb.rb#48 + sig { override.params(text: T.untyped).void } + def add_text(text); end + + # source://spoom//lib/spoom/deadcode/erb.rb#95 + sig { params(src: T.untyped).void } + def flush_newline_if_pending(src); end +end + +# source://spoom//lib/spoom/deadcode/erb.rb#63 +Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode.rb#20 +class Spoom::Deadcode::Error < ::Spoom::Error + abstract! + + # source://spoom//lib/spoom/deadcode.rb#27 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end + +# source://spoom//lib/spoom/deadcode/index.rb#6 +class Spoom::Deadcode::Index + # source://spoom//lib/spoom/deadcode/index.rb#16 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/deadcode/index.rb#51 + sig { returns(T::Array[::Spoom::Deadcode::Definition]) } + def all_definitions; end + + # source://spoom//lib/spoom/deadcode/index.rb#56 + sig { returns(T::Array[::Spoom::Deadcode::Reference]) } + def all_references; end + + # Indexing + # + # source://spoom//lib/spoom/deadcode/index.rb#24 + sig { params(definition: ::Spoom::Deadcode::Definition).void } + def define(definition); end + + # source://spoom//lib/spoom/deadcode/index.rb#10 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } + def definitions; end + + # Utils + # + # source://spoom//lib/spoom/deadcode/index.rb#46 + sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } + def definitions_for_name(name); end + + # Mark all definitions having a reference of the same name as `alive` + # + # To be called once all the files have been indexed and all the definitions and references discovered. + # + # source://spoom//lib/spoom/deadcode/index.rb#37 + sig { void } + def finalize!; end + + # source://spoom//lib/spoom/deadcode/index.rb#29 + sig { params(reference: ::Spoom::Deadcode::Reference).void } + def reference(reference); end + + # source://spoom//lib/spoom/deadcode/index.rb#13 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) } + def references; end +end + +# source://spoom//lib/spoom/deadcode/indexer.rb#6 +class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor + # source://spoom//lib/spoom/deadcode/indexer.rb#16 + sig do + params( + path: ::String, + source: ::String, + index: ::Spoom::Deadcode::Index, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def initialize(path, source, index, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#459 + sig do + params( + node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward)) + ).returns(T::Array[::SyntaxTree::Node]) + end + def call_args(node); end + + # Context + # + # source://spoom//lib/spoom/deadcode/indexer.rb#367 + sig { returns(::SyntaxTree::Node) } + def current_node; end + + # Definition indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#281 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_attr_reader(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#293 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_attr_writer(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#305 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_class(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#317 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_constant(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#329 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_method(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#341 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_module(name, full_name, node); end + + # @return [String] + # + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + def file_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#13 + sig { returns(::Spoom::Deadcode::Index) } + def index; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#426 + sig { returns(T.nilable(::String)) } + def last_sig; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#386 + sig { returns(T.nilable(::SyntaxTree::BlockNode)) } + def nesting_block; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#391 + sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) } + def nesting_block_call; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#396 + sig { returns(T.nilable(::String)) } + def nesting_block_call_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#381 + sig { returns(T.nilable(::SyntaxTree::ClassDeclaration)) } + def nesting_class; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#410 + sig { returns(T.nilable(::String)) } + def nesting_class_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#418 + sig { returns(T.nilable(::String)) } + def nesting_class_superclass_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#372 + sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) } + def nesting_node(type); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#445 + sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } + def node_location(node); end + + # Node utils + # + # source://spoom//lib/spoom/deadcode/indexer.rb#435 + sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } + def node_string(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + sig { returns(::String) } + def path; end + + # Reference indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#355 + sig { params(name: ::String, node: ::SyntaxTree::Node).void } + def reference_constant(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#360 + sig { params(name: ::String, node: ::SyntaxTree::Node).void } + def reference_method(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#450 + sig { params(node: ::SyntaxTree::Node).returns(::String) } + def symbol_string(node); end + + # Visit + # + # source://spoom//lib/spoom/deadcode/indexer.rb#35 + sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } + def visit(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#45 + sig { override.params(node: ::SyntaxTree::AliasNode).void } + def visit_alias(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#50 + sig { override.params(node: ::SyntaxTree::ARef).void } + def visit_aref(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#57 + sig { override.params(node: ::SyntaxTree::ARefField).void } + def visit_aref_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#64 + sig { override.params(node: ::SyntaxTree::ArgBlock).void } + def visit_arg_block(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#78 + sig { override.params(node: ::SyntaxTree::Binary).void } + def visit_binary(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#94 + sig { override.params(node: ::SyntaxTree::CallNode).void } + def visit_call(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#106 + sig { override.params(node: ::SyntaxTree::ClassDeclaration).void } + def visit_class(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#119 + sig { override.params(node: ::SyntaxTree::Command).void } + def visit_command(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#131 + sig { override.params(node: ::SyntaxTree::CommandCall).void } + def visit_command_call(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#144 + sig { override.params(node: ::SyntaxTree::Const).void } + def visit_const(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#149 + sig { override.params(node: ::SyntaxTree::ConstPathField).void } + def visit_const_path_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#159 + sig { override.params(node: ::SyntaxTree::DefNode).void } + def visit_def(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#167 + sig { override.params(node: ::SyntaxTree::Field).void } + def visit_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#183 + sig { override.params(node: ::SyntaxTree::ModuleDeclaration).void } + def visit_module(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#195 + sig { override.params(node: ::SyntaxTree::OpAssign).void } + def visit_opassign(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#204 + sig { params(send: ::Spoom::Deadcode::Send).void } + def visit_send(send); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#243 + sig { override.params(node: ::SyntaxTree::SymbolLiteral).void } + def visit_symbol_literal(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#252 + sig { override.params(node: ::SyntaxTree::TopConstField).void } + def visit_top_const_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#257 + sig { override.params(node: ::SyntaxTree::VarField).void } + def visit_var_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#274 + sig { override.params(node: ::SyntaxTree::VCall).void } + def visit_vcall(node); end +end + +# source://spoom//lib/spoom/deadcode.rb#34 +class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error; end + +# source://spoom//lib/spoom/deadcode/location.rb#6 +class Spoom::Deadcode::Location + include ::Comparable + + # source://spoom//lib/spoom/deadcode/location.rb#54 + sig do + params( + file: ::String, + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).void + end + def initialize(file, start_line, start_column, end_line, end_column); end + + # source://spoom//lib/spoom/deadcode/location.rb#74 + sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } + def <=>(other); end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#43 + def end_column; end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#43 + def end_line; end + + # source://spoom//lib/spoom/deadcode/location.rb#40 + sig { returns(::String) } + def file; end + + # source://spoom//lib/spoom/deadcode/location.rb#63 + sig { params(other: ::Spoom::Deadcode::Location).returns(T::Boolean) } + def include?(other); end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#43 + def start_column; end + + # source://spoom//lib/spoom/deadcode/location.rb#43 + sig { returns(::Integer) } + def start_line; end + + # source://spoom//lib/spoom/deadcode/location.rb#81 + sig { returns(::String) } + def to_s; end + + class << self + # @raise [LocationError] + # + # source://spoom//lib/spoom/deadcode/location.rb#17 + sig { params(location_string: ::String).returns(::Spoom::Deadcode::Location) } + def from_string(location_string); end + + # source://spoom//lib/spoom/deadcode/location.rb#34 + sig { params(file: ::String, location: ::SyntaxTree::Location).returns(::Spoom::Deadcode::Location) } + def from_syntax_tree(file, location); end + end +end + +# source://spoom//lib/spoom/deadcode/location.rb#11 +class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end + +# source://spoom//lib/spoom/deadcode/plugins.rb#35 +Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) + +# source://spoom//lib/spoom/deadcode.rb#33 +class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end + +# source://spoom//lib/spoom/deadcode/plugins/base.rb#8 +module Spoom::Deadcode::Plugins; end + +# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7 +class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7 +class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#10 +Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7 +class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end + +# source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7 +class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7 +class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64 +Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20 +Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49 +Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7 +class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode/plugins/base.rb#9 +class Spoom::Deadcode::Plugins::Base + abstract! + + # Do not override this method, use `on_define_accessor` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#150 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_accessor(indexer, definition); end + + # Do not override this method, use `on_define_class` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#174 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_class(indexer, definition); end + + # Do not override this method, use `on_define_constant` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#204 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_constant(indexer, definition); end + + # Do not override this method, use `on_define_method` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_method(indexer, definition); end + + # Do not override this method, use `on_define_module` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_module(indexer, definition); end + + # Do not override this method, use `on_send` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def internal_on_send(indexer, send); end + + # Called when an accessor is defined. + # + # Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_accessor(indexer, definition) + # definition.ignored! if definition.name == "foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#144 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_accessor(indexer, definition); end + + # Called when a class is defined. + # + # Will be called when the indexer processes a `class` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_class(indexer, definition) + # definition.ignored! if definition.name == "Foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#168 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_class(indexer, definition); end + + # Called when a constant is defined. + # + # Will be called when the indexer processes a `CONST =` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_constant(indexer, definition) + # definition.ignored! if definition.name == "FOO" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#198 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_constant(indexer, definition); end + + # Called when a method is defined. + # + # Will be called when the indexer processes a `def` or `defs` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_method(indexer, definition) + # super # So the `ignore_method_names` DSL is still applied + # + # definition.ignored! if definition.name == "foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#226 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + # Called when a module is defined. + # + # Will be called when the indexer processes a `module` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_module(indexer, definition) + # definition.ignored! if definition.name == "Foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#252 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_module(indexer, definition); end + + # Called when a send is being processed + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_send(indexer, send) + # return unless send.name == "dsl_method" + # return if send.args.empty? + # + # method_name = indexer.node_string(send.args.first).delete_prefix(":") + # indexer.reference_method(method_name, send.node) + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#278 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end + + private + + # Plugin utils + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#339 + sig { params(name: ::String).returns(::String) } + def camelize(name); end + + # DSL support + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + sig { params(name: T.nilable(::String)).returns(T::Boolean) } + def ignored_class_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#307 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_constant_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#312 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_method_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#317 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_module_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#322 + sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) } + def ignored_name?(name, names_variable, patterns_variable); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#300 + sig { params(superclass_name: T.nilable(::String)).returns(T::Boolean) } + def ignored_subclass?(superclass_name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#327 + sig { params(const: ::Symbol).returns(T::Set[::String]) } + def names(const); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#332 + sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } + def patterns(const); end + + class << self + # Mark classes directly subclassing a class matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_classes_inheriting_from( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#52 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_classes_inheriting_from(*names); end + + # Mark classes matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#34 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_classes_named(*names); end + + # Mark constants matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "FOO", + # "BAR", + # /BAZ.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#70 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_constants_named(*names); end + + # Mark methods matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_method_names( + # "foo", + # "bar", + # /baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#88 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_methods_named(*names); end + + # Mark modules matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#106 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_modules_named(*names); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#113 + sig do + params( + names: T::Array[T.any(::Regexp, ::String)], + names_variable: ::Symbol, + patterns_variable: ::Symbol + ).void + end + def save_names_and_patterns(names, names_variable, patterns_variable); end + end +end + +# source://spoom//lib/spoom/deadcode/plugins/graphql.rb#7 +class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#28 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/minitest.rb#7 +class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end +end + +# source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7 +class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#11 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_class(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_module(indexer, definition); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23 + sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } + def used_as_namespace?(indexer); end +end + +# source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7 +class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end + +# source://spoom//lib/spoom/deadcode/plugins/rails.rb#7 +class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/rails.rb#13 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_class(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/rails.rb#18 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_module(indexer, definition); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/rails.rb#25 + sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } + def file_is_helper?(indexer); end +end + +# source://spoom//lib/spoom/deadcode/plugins/rake.rb#7 +class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end + +# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#7 +class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#18 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_constant(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#23 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#30 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def rubocop_constant?(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#35 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def rubocop_method?(indexer, definition); end +end + +# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10 +Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set) + +# source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7 +class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#50 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::SyntaxTree::Node).void } + def reference_symbol_as_constant(indexer, send, node); end +end + +# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7 +class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#11 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_constant(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#40 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def sorbet_enum_constant?(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def sorbet_type_member?(indexer, definition); end +end + +# source://spoom//lib/spoom/deadcode/plugins/thor.rb#7 +class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/thor.rb#13 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end +end + +# A reference is a call to a method or a constant +# +# source://spoom//lib/spoom/deadcode/reference.rb#7 +class Spoom::Deadcode::Reference < ::T::Struct + const :kind, ::Spoom::Deadcode::Reference::Kind + const :name, ::String + const :location, ::Spoom::Deadcode::Location + + # Kind + # + # source://spoom//lib/spoom/deadcode/reference.rb#24 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/deadcode/reference.rb#29 + sig { returns(T::Boolean) } + def method?; end + + class << self + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/reference.rb#10 +class Spoom::Deadcode::Reference::Kind < ::T::Enum + enums do + Constant = new + Method = new + end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#6 +class Spoom::Deadcode::Remover + # source://spoom//lib/spoom/deadcode/remover.rb#12 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#17 + sig { params(kind: ::Spoom::Deadcode::Definition::Kind, location: ::Spoom::Deadcode::Location).void } + def remove_location(kind, location); end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#9 +class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end + +# source://spoom//lib/spoom/deadcode/remover.rb#348 +class Spoom::Deadcode::Remover::NodeContext + # source://spoom//lib/spoom/deadcode/remover.rb#358 + sig { params(source: ::String, node: ::SyntaxTree::Node, nesting: T::Array[::SyntaxTree::Node]).void } + def initialize(source, node, nesting); end + + # source://spoom//lib/spoom/deadcode/remover.rb#467 + sig { returns(T::Array[::SyntaxTree::Node]) } + def attached_comments_and_sigs; end + + # source://spoom//lib/spoom/deadcode/remover.rb#480 + sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) } + def attached_sig; end + + # source://spoom//lib/spoom/deadcode/remover.rb#460 + sig { params(comment: ::SyntaxTree::Node, node: ::SyntaxTree::Node).returns(T::Boolean) } + def comment_for_node?(comment, node); end + + # source://spoom//lib/spoom/deadcode/remover.rb#355 + sig { returns(T::Array[::SyntaxTree::Node]) } + def nesting; end + + # @return [Array] + # + # source://spoom//lib/spoom/deadcode/remover.rb#355 + def nesting=(_arg0); end + + # source://spoom//lib/spoom/deadcode/remover.rb#407 + sig { returns(T.nilable(::SyntaxTree::Node)) } + def next_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#397 + sig { returns(T::Array[::SyntaxTree::Node]) } + def next_nodes; end + + # source://spoom//lib/spoom/deadcode/remover.rb#352 + sig { returns(::SyntaxTree::Node) } + def node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#495 + sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } + def node_string(node); end + + # source://spoom//lib/spoom/deadcode/remover.rb#373 + sig { returns(::Spoom::Deadcode::Remover::NodeContext) } + def parent_context; end + + # source://spoom//lib/spoom/deadcode/remover.rb#365 + sig { returns(::SyntaxTree::Node) } + def parent_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#392 + sig { returns(T.nilable(::SyntaxTree::Node)) } + def previous_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#382 + sig { returns(T::Array[::SyntaxTree::Node]) } + def previous_nodes; end + + # source://spoom//lib/spoom/deadcode/remover.rb#412 + sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } + def sclass_context; end + + # source://spoom//lib/spoom/deadcode/remover.rb#451 + sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) } + def sorbet_extend_sig?(node); end + + # source://spoom//lib/spoom/deadcode/remover.rb#438 + sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) } + def sorbet_signature?(node); end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#505 +class Spoom::Deadcode::Remover::NodeFinder < ::SyntaxTree::Visitor + # source://spoom//lib/spoom/deadcode/remover.rb#554 + sig { params(location: ::Spoom::Deadcode::Location).void } + def initialize(location); end + + # source://spoom//lib/spoom/deadcode/remover.rb#548 + sig { returns(T.nilable(::SyntaxTree::Node)) } + def node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#551 + sig { returns(T::Array[::SyntaxTree::Node]) } + def nodes_nesting; end + + # @return [Array] + # + # source://spoom//lib/spoom/deadcode/remover.rb#551 + def nodes_nesting=(_arg0); end + + # source://spoom//lib/spoom/deadcode/remover.rb#562 + sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } + def visit(node); end + + private + + # TODO: remove once SyntaxTree location are fixed + # + # source://spoom//lib/spoom/deadcode/remover.rb#601 + sig { params(node: ::SyntaxTree::Node, nodes: T::Array[::SyntaxTree::Node]).returns(::Spoom::Deadcode::Location) } + def location_from_children(node, nodes); end + + # TODO: remove once SyntaxTree location are fixed + # + # source://spoom//lib/spoom/deadcode/remover.rb#586 + sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } + def location_from_node(node); end + + class << self + # source://spoom//lib/spoom/deadcode/remover.rb#512 + sig do + params( + source: ::String, + location: ::Spoom::Deadcode::Location, + kind: ::Spoom::Deadcode::Definition::Kind + ).returns(::Spoom::Deadcode::Remover::NodeContext) + end + def find(source, location, kind); end + + # source://spoom//lib/spoom/deadcode/remover.rb#531 + sig { params(node: ::SyntaxTree::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } + def node_match_kind?(node, kind); end + end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#29 +class Spoom::Deadcode::Remover::NodeRemover + # source://spoom//lib/spoom/deadcode/remover.rb#36 + sig do + params( + source: ::String, + kind: ::Spoom::Deadcode::Definition::Kind, + location: ::Spoom::Deadcode::Location + ).void + end + def initialize(source, kind, location); end + + # source://spoom//lib/spoom/deadcode/remover.rb#46 + sig { void } + def apply_edit; end + + # source://spoom//lib/spoom/deadcode/remover.rb#33 + sig { returns(::String) } + def new_source; end + + private + + # source://spoom//lib/spoom/deadcode/remover.rb#142 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_attr_accessor(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#290 + sig { params(start_char: ::Integer, end_char: ::Integer).void } + def delete_chars(start_char, end_char); end + + # source://spoom//lib/spoom/deadcode/remover.rb#69 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_constant_assignment(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#300 + sig { params(line_number: ::Integer, start_column: ::Integer, end_column: ::Integer).void } + def delete_line_part(line_number, start_column, end_column); end + + # source://spoom//lib/spoom/deadcode/remover.rb#283 + sig { params(start_line: ::Integer, end_line: ::Integer).void } + def delete_lines(start_line, end_line); end + + # source://spoom//lib/spoom/deadcode/remover.rb#250 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_node_and_comments_and_sigs(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#207 + sig do + params( + node: ::SyntaxTree::Node, + send_context: ::Spoom::Deadcode::Remover::NodeContext, + was_removed: T::Boolean + ).void + end + def insert_accessor(node, send_context, was_removed:); end + + # source://spoom//lib/spoom/deadcode/remover.rb#295 + sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void } + def replace_chars(start_char, end_char, replacement); end + + # source://spoom//lib/spoom/deadcode/remover.rb#315 + sig do + params( + node: ::SyntaxTree::MethodAddBlock, + name: ::String, + kind: ::Spoom::Deadcode::Definition::Kind + ).returns(::String) + end + def transform_sig(node, name:, kind:); end +end + +# An abstraction to simplify handling of SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall and +# SyntaxTree::VCall nodes. +# +# source://spoom//lib/spoom/deadcode/send.rb#8 +class Spoom::Deadcode::Send < ::T::Struct + const :node, ::SyntaxTree::Node + const :name, ::String + const :recv, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + const :args, T::Array[::SyntaxTree::Node], default: T.unsafe(nil) + const :block, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + + # source://spoom//lib/spoom/deadcode/send.rb#22 + sig do + type_parameters(:T) + .params( + arg_type: T::Class[T.type_parameter(:T)], + block: T.proc.params(arg: T.type_parameter(:T)).void + ).void + end + def each_arg(arg_type, &block); end + + # source://spoom//lib/spoom/deadcode/send.rb#29 + sig { params(block: T.proc.params(key: ::SyntaxTree::Node, value: T.nilable(::SyntaxTree::Node)).void).void } + def each_arg_assoc(&block); end + + class << self + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom.rb#12 +class Spoom::Error < ::StandardError; end + +# source://spoom//lib/spoom/context/exec.rb#5 +class Spoom::ExecResult < ::T::Struct + const :out, ::String + const :err, T.nilable(::String) + const :status, T::Boolean + const :exit_code, ::Integer + + # source://spoom//lib/spoom/context/exec.rb#14 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/file_collector.rb#5 +class Spoom::FileCollector + # Initialize a new file collector + # + # If `allow_extensions` is empty, all files are collected. + # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected. + # + # If `allow_mime_types` is empty, all files are collected. + # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in + # the list. + # + # source://spoom//lib/spoom/file_collector.rb#26 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).void + end + def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # source://spoom//lib/spoom/file_collector.rb#9 + sig { returns(T::Array[::String]) } + def files; end + + # source://spoom//lib/spoom/file_collector.rb#39 + sig { params(path: ::String).void } + def visit_path(path); end + + # source://spoom//lib/spoom/file_collector.rb#34 + sig { params(paths: T::Array[::String]).void } + def visit_paths(paths); end + + private + + # source://spoom//lib/spoom/file_collector.rb#56 + sig { params(path: ::String).returns(::String) } + def clean_path(path); end + + # source://spoom//lib/spoom/file_collector.rb#73 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_file?(path); end + + # source://spoom//lib/spoom/file_collector.rb#88 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_path?(path); end + + # source://spoom//lib/spoom/file_collector.rb#97 + sig { params(path: ::String).returns(T.nilable(::String)) } + def mime_type_for(path); end + + # source://spoom//lib/spoom/file_collector.rb#68 + sig { params(path: ::String).void } + def visit_directory(path); end + + # source://spoom//lib/spoom/file_collector.rb#61 + sig { params(path: ::String).void } + def visit_file(path); end +end + +# Build a file hierarchy from a set of file paths. +# +# source://spoom//lib/spoom/file_tree.rb#6 +class Spoom::FileTree + # source://spoom//lib/spoom/file_tree.rb#10 + sig { params(paths: T::Enumerable[::String]).void } + def initialize(paths = T.unsafe(nil)); end + + # Add a `path` to the tree + # + # This will create all nodes until the root of `path`. + # + # source://spoom//lib/spoom/file_tree.rb#25 + sig { params(path: ::String).returns(::Spoom::FileTree::Node) } + def add_path(path); end + + # Add all `paths` to the tree + # + # source://spoom//lib/spoom/file_tree.rb#17 + sig { params(paths: T::Enumerable[::String]).void } + def add_paths(paths); end + + # All the nodes in this tree + # + # source://spoom//lib/spoom/file_tree.rb#45 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # Return a map of typing scores for each node in the tree + # + # source://spoom//lib/spoom/file_tree.rb#67 + sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def nodes_strictness_scores(context); end + + # Return a map of strictnesses for each node in the tree + # + # source://spoom//lib/spoom/file_tree.rb#59 + sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } + def nodes_strictnesses(context); end + + # All the paths in this tree + # + # source://spoom//lib/spoom/file_tree.rb#53 + sig { returns(T::Array[::String]) } + def paths; end + + # Return a map of typing scores for each path in the tree + # + # source://spoom//lib/spoom/file_tree.rb#75 + sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } + def paths_strictness_scores(context); end + + # source://spoom//lib/spoom/file_tree.rb#80 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } + def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # source://spoom//lib/spoom/file_tree.rb#86 + sig { params(context: ::Spoom::Context, out: T.any(::IO, ::StringIO), colors: T::Boolean).void } + def print_with_strictnesses(context, out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # All root nodes + # + # source://spoom//lib/spoom/file_tree.rb#39 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def roots; end +end + +# A visitor that collects all the nodes in a tree +# +# source://spoom//lib/spoom/file_tree.rb#140 +class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#147 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/file_tree.rb#144 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # source://spoom//lib/spoom/file_tree.rb#153 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end +end + +# A visitor that collects the typing score of each node in a tree +# +# source://spoom//lib/spoom/file_tree.rb#183 +class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses + # source://spoom//lib/spoom/file_tree.rb#190 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/file_tree.rb#187 + sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def scores; end + + # source://spoom//lib/spoom/file_tree.rb#197 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # source://spoom//lib/spoom/file_tree.rb#206 + sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } + def node_score(node); end + + # source://spoom//lib/spoom/file_tree.rb#215 + sig { params(strictness: T.nilable(::String)).returns(::Float) } + def strictness_score(strictness); end +end + +# A visitor that collects the strictness of each node in a tree +# +# source://spoom//lib/spoom/file_tree.rb#160 +class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#167 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/file_tree.rb#164 + sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } + def strictnesses; end + + # source://spoom//lib/spoom/file_tree.rb#174 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end +end + +# A node representing either a file or a directory inside a FileTree +# +# source://spoom//lib/spoom/file_tree.rb#94 +class Spoom::FileTree::Node < ::T::Struct + const :parent, T.nilable(::Spoom::FileTree::Node) + const :name, ::String + const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil) + + # Full path to this node from root + # + # source://spoom//lib/spoom/file_tree.rb#108 + sig { returns(::String) } + def path; end + + class << self + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# An internal class used to print a FileTree +# +# See `FileTree#print` +# +# source://spoom//lib/spoom/file_tree.rb#228 +class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#238 + sig do + params( + strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + out: T.any(::IO, ::StringIO), + colors: T::Boolean + ).void + end + def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # source://spoom//lib/spoom/file_tree.rb#246 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # source://spoom//lib/spoom/file_tree.rb#271 + sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } + def strictness_color(strictness); end +end + +# An abstract visitor for FileTree +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/file_tree.rb#117 +class Spoom::FileTree::Visitor + abstract! + + # source://spoom//lib/spoom/file_tree.rb#129 + sig { params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + # source://spoom//lib/spoom/file_tree.rb#134 + sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } + def visit_nodes(nodes); end + + # source://spoom//lib/spoom/file_tree.rb#124 + sig { params(tree: ::Spoom::FileTree).void } + def visit_tree(tree); end +end + +# source://spoom//lib/spoom/context/git.rb#5 +module Spoom::Git; end + +# source://spoom//lib/spoom/context/git.rb#6 +class Spoom::Git::Commit < ::T::Struct + const :sha, ::String + const :time, ::Time + + # source://spoom//lib/spoom/context/git.rb#27 + sig { returns(::Integer) } + def timestamp; end + + class << self + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + + # Parse a line formated as `%h %at` into a `Commit` + # + # source://spoom//lib/spoom/context/git.rb#14 + sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } + def parse_line(string); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/base.rb#5 +module Spoom::LSP; end + +# source://spoom//lib/spoom/sorbet/lsp.rb#13 +class Spoom::LSP::Client + # source://spoom//lib/spoom/sorbet/lsp.rb#17 + sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void } + def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#229 + sig { void } + def close; end + + # source://spoom//lib/spoom/sorbet/lsp.rb#131 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def definitions(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#212 + sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def document_symbols(uri); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#89 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) } + def hover(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#27 + sig { returns(::Integer) } + def next_id; end + + # LSP requests + # + # @raise [Error::AlreadyOpen] + # + # source://spoom//lib/spoom/sorbet/lsp.rb#72 + sig { params(workspace_path: ::String).void } + def open(workspace_path); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#54 + sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def read; end + + # @raise [Error::BadHeaders] + # + # source://spoom//lib/spoom/sorbet/lsp.rb#43 + sig { returns(T.nilable(::String)) } + def read_raw; end + + # source://spoom//lib/spoom/sorbet/lsp.rb#173 + sig do + params( + uri: ::String, + line: ::Integer, + column: ::Integer, + include_decl: T::Boolean + ).returns(T::Array[::Spoom::LSP::Location]) + end + def references(uri, line, column, include_decl = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#37 + sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def send(message); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#32 + sig { params(json_string: ::String).void } + def send_raw(json_string); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#110 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) } + def signatures(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#197 + sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def symbols(query); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#152 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def type_definitions(uri, line, column); end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#178 +class Spoom::LSP::Diagnostic < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :range, ::Spoom::LSP::Range + const :code, ::Integer + const :message, ::String + const :informations, ::Object + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#212 +class Spoom::LSP::DocumentSymbol < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :name, ::String + const :detail, T.nilable(::String) + const :kind, ::Integer + const :location, T.nilable(::Spoom::LSP::Location) + const :range, T.nilable(::Spoom::LSP::Range) + const :children, T::Array[::Spoom::LSP::DocumentSymbol] + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272 + sig { returns(::String) } + def kind_string; end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#276 +Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 +class Spoom::LSP::Error < ::StandardError; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 +class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8 +class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10 +class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32 + sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void } + def initialize(uri, diagnostics); end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17 + sig { returns(T::Array[::Spoom::LSP::Diagnostic]) } + def diagnostics; end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14 + sig { returns(::String) } + def uri; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) } + def from_json(json); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#19 +class Spoom::LSP::Hover < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :contents, ::String + const :range, T.nilable(T::Range[T.untyped]) + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#112 +class Spoom::LSP::Location < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :uri, ::String + const :range, ::Spoom::LSP::Range + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# A general message as defined by JSON-RPC. +# +# The language server protocol always uses `"2.0"` as the `jsonrpc` version. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#12 +class Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#21 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def as_json; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#29 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end +end + +# A notification message. +# +# A processed notification message must not send a response back. They work like events. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#58 +class Spoom::LSP::Notification < ::Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 + sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(method, params); end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#62 + sig { returns(::String) } + def method; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#65 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#50 +class Spoom::LSP::Position < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :line, ::Integer + const :char, ::Integer + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#9 +module Spoom::LSP::PrintableSymbol + interface! + + # @abstract + # + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16 + sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#80 +class Spoom::LSP::Range < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :start, ::Spoom::LSP::Position + const :end, ::Spoom::LSP::Position + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# A request message to describe a request between the client and the server. +# +# Every processed request must send a response back to the sender of the request. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#37 +class Spoom::LSP::Request < ::Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 + sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(id, method, params); end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#41 + sig { returns(::Integer) } + def id; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#40 +class Spoom::LSP::ResponseError < ::Spoom::LSP::Error + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63 + sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void } + def initialize(code, message, data); end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44 + sig { returns(::Integer) } + def code; end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def data; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) } + def from_json(json); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#143 +class Spoom::LSP::SignatureHelp < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :label, T.nilable(::String) + const :doc, ::Object + const :params, T::Array[T.untyped] + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#309 +class Spoom::LSP::SymbolPrinter < ::Spoom::Printer + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#326 + sig do + params( + out: T.any(::IO, ::StringIO), + colors: T::Boolean, + indent_level: ::Integer, + prefix: T.nilable(::String) + ).void + end + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#348 + sig { params(uri: ::String).returns(::String) } + def clean_uri(uri); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 + sig { returns(T.nilable(::String)) } + def prefix; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 + def prefix=(_arg0); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#356 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_list(objects); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#336 + sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } + def print_object(object); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#343 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_objects(objects); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 + sig { returns(T::Set[::Integer]) } + def seen; end +end + +# source://spoom//lib/spoom/printer.rb#7 +class Spoom::Printer + include ::Spoom::Colorize + + # source://spoom//lib/spoom/printer.rb#17 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end + + # Colorize `string` with color if `@colors` + # + # source://spoom//lib/spoom/printer.rb#78 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Decrease indent level + # + # source://spoom//lib/spoom/printer.rb#31 + sig { void } + def dedent; end + + # Increase indent level + # + # source://spoom//lib/spoom/printer.rb#25 + sig { void } + def indent; end + + # source://spoom//lib/spoom/printer.rb#14 + sig { returns(T.any(::IO, ::StringIO)) } + def out; end + + # @return [IO, StringIO] + # + # source://spoom//lib/spoom/printer.rb#14 + def out=(_arg0); end + + # Print `string` into `out` + # + # source://spoom//lib/spoom/printer.rb#37 + sig { params(string: T.nilable(::String)).void } + def print(string); end + + # Print `string` colored with `color` into `out` + # + # Does not use colors unless `@colors`. + # + # source://spoom//lib/spoom/printer.rb#47 + sig { params(string: T.nilable(::String), color: ::Spoom::Color).void } + def print_colored(string, *color); end + + # Print `string` with indent and newline + # + # source://spoom//lib/spoom/printer.rb#62 + sig { params(string: T.nilable(::String)).void } + def printl(string); end + + # Print a new line into `out` + # + # source://spoom//lib/spoom/printer.rb#56 + sig { void } + def printn; end + + # Print an indent space into `out` + # + # source://spoom//lib/spoom/printer.rb#72 + sig { void } + def printt; end +end + +# source://spoom//lib/spoom.rb#10 +Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/config.rb#5 +module Spoom::Sorbet; end + +# source://spoom//lib/spoom/sorbet.rb#39 +Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#36 +Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String) + +# Parse Sorbet config files +# +# Parses a Sorbet config file: +# +# ```ruby +# config = Spoom::Sorbet::Config.parse_file("sorbet/config") +# puts config.paths # "." +# ``` +# +# Parses a Sorbet config string: +# +# ```ruby +# config = Spoom::Sorbet::Config.parse_string(<<~CONFIG) +# a +# --file=b +# --ignore=c +# CONFIG +# puts config.paths # "a", "b" +# puts config.ignore # "c" +# ``` +# +# source://spoom//lib/spoom/sorbet/config.rb#26 +class Spoom::Sorbet::Config + # source://spoom//lib/spoom/sorbet/config.rb#38 + sig { void } + def initialize; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def allowed_extensions; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def allowed_extensions=(_arg0); end + + # source://spoom//lib/spoom/sorbet/config.rb#46 + sig { returns(::Spoom::Sorbet::Config) } + def copy; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def ignore; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def ignore=(_arg0); end + + # source://spoom//lib/spoom/sorbet/config.rb#35 + sig { returns(T::Boolean) } + def no_stdlib; end + + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/config.rb#35 + def no_stdlib=(_arg0); end + + # Returns self as a string of options that can be passed to Sorbet + # + # Example: + # ~~~rb + # config = Sorbet::Config.new + # config.paths << "/foo" + # config.paths << "/bar" + # config.ignore << "/baz" + # config.allowed_extensions << ".rb" + # + # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb" + # ~~~ + # + # source://spoom//lib/spoom/sorbet/config.rb#68 + sig { returns(::String) } + def options_string; end + + # source://spoom//lib/spoom/sorbet/config.rb#32 + sig { returns(T::Array[::String]) } + def paths; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def paths=(_arg0); end + + class << self + # source://spoom//lib/spoom/sorbet/config.rb#81 + sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) } + def parse_file(sorbet_config_path); end + + # source://spoom//lib/spoom/sorbet/config.rb#86 + sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) } + def parse_string(sorbet_config); end + + private + + # source://spoom//lib/spoom/sorbet/config.rb#150 + sig { params(line: ::String).returns(::String) } + def parse_option(line); end + end +end + +# source://spoom//lib/spoom/sorbet/config.rb#29 +Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/sorbet.rb#14 +class Spoom::Sorbet::Error < ::StandardError + # source://spoom//lib/spoom/sorbet.rb#29 + sig { params(message: ::String, result: ::Spoom::ExecResult).void } + def initialize(message, result); end + + # source://spoom//lib/spoom/sorbet.rb#21 + sig { returns(::Spoom::ExecResult) } + def result; end +end + +# source://spoom//lib/spoom/sorbet.rb#17 +class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end + +# source://spoom//lib/spoom/sorbet.rb#18 +class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end + +# source://spoom//lib/spoom/sorbet/errors.rb#6 +module Spoom::Sorbet::Errors + class << self + # source://spoom//lib/spoom/sorbet/errors.rb#13 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def sort_errors_by_code(errors); end + end +end + +# source://spoom//lib/spoom/sorbet/errors.rb#7 +Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/errors.rb#125 +class Spoom::Sorbet::Errors::Error + include ::Comparable + + # source://spoom//lib/spoom/sorbet/errors.rb#151 + sig do + params( + file: T.nilable(::String), + line: T.nilable(::Integer), + message: T.nilable(::String), + code: T.nilable(::Integer), + more: T::Array[::String] + ).void + end + def initialize(file, line, message, code, more = T.unsafe(nil)); end + + # By default errors are sorted by location + # + # source://spoom//lib/spoom/sorbet/errors.rb#162 + sig { params(other: T.untyped).returns(::Integer) } + def <=>(other); end + + # @return [Integer, nil] + # + # source://spoom//lib/spoom/sorbet/errors.rb#133 + def code; end + + # source://spoom//lib/spoom/sorbet/errors.rb#130 + sig { returns(T.nilable(::String)) } + def file; end + + # Other files associated with the error + # + # source://spoom//lib/spoom/sorbet/errors.rb#140 + sig { returns(T::Set[::String]) } + def files_from_error_sections; end + + # source://spoom//lib/spoom/sorbet/errors.rb#133 + sig { returns(T.nilable(::Integer)) } + def line; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/sorbet/errors.rb#130 + def message; end + + # source://spoom//lib/spoom/sorbet/errors.rb#136 + sig { returns(T::Array[::String]) } + def more; end + + # source://spoom//lib/spoom/sorbet/errors.rb#169 + sig { returns(::String) } + def to_s; end +end + +# Parse errors from Sorbet output +# +# source://spoom//lib/spoom/sorbet/errors.rb#18 +class Spoom::Sorbet::Errors::Parser + # source://spoom//lib/spoom/sorbet/errors.rb#43 + sig { params(error_url_base: ::String).void } + def initialize(error_url_base: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/errors.rb#50 + sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse(output); end + + private + + # source://spoom//lib/spoom/sorbet/errors.rb#114 + sig { params(line: ::String).void } + def append_error(line); end + + # source://spoom//lib/spoom/sorbet/errors.rb#106 + sig { void } + def close_error; end + + # source://spoom//lib/spoom/sorbet/errors.rb#73 + sig { params(error_url_base: ::String).returns(::Regexp) } + def error_line_match_regexp(error_url_base); end + + # source://spoom//lib/spoom/sorbet/errors.rb#90 + sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } + def match_error_line(line); end + + # source://spoom//lib/spoom/sorbet/errors.rb#99 + sig { params(error: ::Spoom::Sorbet::Errors::Error).void } + def open_error(error); end + + class << self + # source://spoom//lib/spoom/sorbet/errors.rb#36 + sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse_string(output, error_url_base: T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/sorbet/errors.rb#21 +Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/sorbet.rb#37 +Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#38 +Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#41 +Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer) + +# source://spoom//lib/spoom/sorbet/metrics.rb#8 +module Spoom::Sorbet::MetricsParser + class << self + # source://spoom//lib/spoom/sorbet/metrics.rb#15 + sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_file(path, prefix = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/metrics.rb#25 + sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_hash(obj, prefix = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/metrics.rb#20 + sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_string(string, prefix = T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/sorbet/metrics.rb#9 +Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#42 +Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) + +# source://spoom//lib/spoom/sorbet/sigils.rb#9 +module Spoom::Sorbet::Sigils + class << self + # changes the sigil in the file at the passed path to the specified new strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#72 + sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) } + def change_sigil_in_file(path, new_strictness); end + + # changes the sigil to have a new strictness in a list of files + # + # source://spoom//lib/spoom/sorbet/sigils.rb#83 + sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) } + def change_sigil_in_files(path_list, new_strictness); end + + # returns a string containing the strictness of a sigil in a file at the passed path + # * returns nil if no sigil + # + # source://spoom//lib/spoom/sorbet/sigils.rb#63 + sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) } + def file_strictness(path); end + + # returns the full sigil comment string for the passed strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#38 + sig { params(strictness: ::String).returns(::String) } + def sigil_string(strictness); end + + # returns the strictness of a sigil in the passed file content string (nil if no sigil) + # + # source://spoom//lib/spoom/sorbet/sigils.rb#50 + sig { params(content: ::String).returns(T.nilable(::String)) } + def strictness_in_content(content); end + + # returns a string which is the passed content but with the sigil updated to a new strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#56 + sig { params(content: ::String, new_strictness: ::String).returns(::String) } + def update_sigil(content, new_strictness); end + + # returns true if the passed string is a valid strictness (else false) + # + # source://spoom//lib/spoom/sorbet/sigils.rb#44 + sig { params(strictness: ::String).returns(T::Boolean) } + def valid_strictness?(strictness); end + end +end + +# source://spoom//lib/spoom/sorbet/sigils.rb#31 +Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://spoom//lib/spoom/sorbet/sigils.rb#13 +Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#12 +Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#17 +Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#15 +Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#16 +Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#14 +Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#19 +Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/timeline.rb#5 +class Spoom::Timeline + # source://spoom//lib/spoom/timeline.rb#9 + sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void } + def initialize(context, from, to); end + + # Return one commit for each date in `dates` + # + # source://spoom//lib/spoom/timeline.rb#36 + sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) } + def commits_for_dates(dates); end + + # Return all months between `from` and `to` + # + # source://spoom//lib/spoom/timeline.rb#23 + sig { returns(T::Array[::Time]) } + def months; end + + # Return one commit for each month between `from` and `to` + # + # source://spoom//lib/spoom/timeline.rb#17 + sig { returns(T::Array[::Spoom::Git::Commit]) } + def ticks; end +end + +# source://spoom//lib/spoom/version.rb#5 +Spoom::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/syntax_tree@6.2.0.rbi b/sorbet/rbi/gems/syntax_tree@6.2.0.rbi new file mode 100644 index 0000000..0ecc1a4 --- /dev/null +++ b/sorbet/rbi/gems/syntax_tree@6.2.0.rbi @@ -0,0 +1,23136 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `syntax_tree` gem. +# Please instead update this file by running `bin/tapioca gem syntax_tree`. + +# Syntax Tree is a suite of tools built on top of the internal CRuby parser. It +# provides the ability to generate a syntax tree from source, as well as the +# tools necessary to inspect and manipulate that syntax tree. It can be used to +# build formatters, linters, language servers, and more. +# +# source://syntax_tree//lib/syntax_tree/node.rb#3 +module SyntaxTree + class << self + # Parses the given source and returns the formatted source. + # + # source://syntax_tree//lib/syntax_tree.rb#60 + def format(source, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end + + # Parses the given file and returns the formatted source. + # + # source://syntax_tree//lib/syntax_tree.rb#76 + def format_file(filepath, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end + + # Accepts a node in the tree and returns the formatted source. + # + # source://syntax_tree//lib/syntax_tree.rb#86 + def format_node(source, node, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end + + # Indexes the given source code to return a list of all class, module, and + # method definitions. Used to quickly provide indexing capability for IDEs or + # documentation generation. + # + # source://syntax_tree//lib/syntax_tree.rb#103 + def index(source); end + + # Indexes the given file to return a list of all class, module, and method + # definitions. Used to quickly provide indexing capability for IDEs or + # documentation generation. + # + # source://syntax_tree//lib/syntax_tree.rb#110 + def index_file(filepath); end + + # A convenience method for creating a new mutation visitor. + # + # @yield [visitor] + # + # source://syntax_tree//lib/syntax_tree.rb#115 + def mutation; end + + # Parses the given source and returns the syntax tree. + # + # source://syntax_tree//lib/syntax_tree.rb#122 + def parse(source); end + + # Parses the given file and returns the syntax tree. + # + # source://syntax_tree//lib/syntax_tree.rb#129 + def parse_file(filepath); end + + # Returns the source from the given filepath taking into account any potential + # magic encoding comments. + # + # source://syntax_tree//lib/syntax_tree.rb#135 + def read(filepath); end + + # This is a hook provided so that plugins can register themselves as the + # handler for a particular file type. + # + # source://syntax_tree//lib/syntax_tree.rb#150 + def register_handler(extension, handler); end + + # Searches through the given source using the given pattern and yields each + # node in the tree that matches the pattern to the given block. + # + # source://syntax_tree//lib/syntax_tree.rb#156 + def search(source, query, &block); end + + # Searches through the given file using the given pattern and yields each + # node in the tree that matches the pattern to the given block. + # + # source://syntax_tree//lib/syntax_tree.rb#165 + def search_file(filepath, query, &block); end + end +end + +# ARef represents when you're pulling a value out of a collection at a +# specific index. Put another way, it's any time you're calling the method +# #[]. +# +# collection[index] +# +# The nodes usually contains two children, the collection and the index. In +# some cases, you don't necessarily have the second child node, because you +# can call procs with a pretty esoteric syntax. In the following example, you +# wouldn't have a second child node: +# +# collection[] +# +# source://syntax_tree//lib/syntax_tree/node.rb#567 +class SyntaxTree::ARef < ::SyntaxTree::Node + # @return [ARef] a new instance of ARef + # + # source://syntax_tree//lib/syntax_tree/node.rb#577 + def initialize(collection:, index:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#632 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#584 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#588 + def child_nodes; end + + # [Node] the value being indexed + # + # source://syntax_tree//lib/syntax_tree/node.rb#569 + def collection; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#575 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#592 + def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#588 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#606 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#615 + def format(q); end + + # [nil | Args] the value being passed within the brackets + # + # source://syntax_tree//lib/syntax_tree/node.rb#572 + def index; end +end + +# ARefField represents assigning values into collections at specific indices. +# Put another way, it's any time you're calling the method #[]=. The +# ARefField node itself is just the left side of the assignment, and they're +# always wrapped in assign nodes. +# +# collection[index] = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#645 +class SyntaxTree::ARefField < ::SyntaxTree::Node + # @return [ARefField] a new instance of ARefField + # + # source://syntax_tree//lib/syntax_tree/node.rb#655 + def initialize(collection:, index:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#710 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#662 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#666 + def child_nodes; end + + # [Node] the value being indexed + # + # source://syntax_tree//lib/syntax_tree/node.rb#647 + def collection; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#653 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#670 + def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#666 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#684 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#693 + def format(q); end + + # [nil | Args] the value being passed within the brackets + # + # source://syntax_tree//lib/syntax_tree/node.rb#650 + def index; end +end + +# Alias represents the use of the +alias+ keyword with regular arguments (not +# global variables). The +alias+ keyword is used to make a method respond to +# another name as well as the current one. +# +# alias aliased_name name +# +# For the example above, in the current context you can now call aliased_name +# and it will execute the name method. When you're aliasing two methods, you +# can either provide bare words (like the example above) or you can provide +# symbols (note that this includes dynamic symbols like +# :"left-#{middle}-right"). +# +# source://syntax_tree//lib/syntax_tree/node.rb#458 +class SyntaxTree::AliasNode < ::SyntaxTree::Node + # @return [AliasNode] a new instance of AliasNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#496 + def initialize(left:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#545 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#503 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#507 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#494 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#511 + def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#507 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#525 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#529 + def format(q); end + + # [DynaSymbol | GVar | SymbolLiteral] the new name of the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#488 + def left; end + + # [Backref | DynaSymbol | GVar | SymbolLiteral] the old name of the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#491 + def right; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#549 + def var_alias?; end +end + +# Formats an argument to the alias keyword. For symbol literals it uses the +# value of the symbol directly to look like bare words. +# +# source://syntax_tree//lib/syntax_tree/node.rb#461 +class SyntaxTree::AliasNode::AliasArgumentFormatter + # @return [AliasArgumentFormatter] a new instance of AliasArgumentFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#466 + def initialize(argument); end + + # [Backref | DynaSymbol | GVar | SymbolLiteral] the argument being passed + # to alias + # + # source://syntax_tree//lib/syntax_tree/node.rb#464 + def argument; end + + # source://syntax_tree//lib/syntax_tree/node.rb#470 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#478 + def format(q); end +end + +# ArgBlock represents using a block operator on an expression. +# +# method(&expression) +# +# source://syntax_tree//lib/syntax_tree/node.rb#887 +class SyntaxTree::ArgBlock < ::SyntaxTree::Node + # @return [ArgBlock] a new instance of ArgBlock + # + # source://syntax_tree//lib/syntax_tree/node.rb#894 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#930 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#900 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#904 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#892 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#908 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#904 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#921 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#925 + def format(q); end + + # [nil | Node] the expression being turned into a block + # + # source://syntax_tree//lib/syntax_tree/node.rb#889 + def value; end +end + +# ArgParen represents wrapping arguments to a method inside a set of +# parentheses. +# +# method(argument) +# +# In the example above, there would be an ArgParen node around the Args node +# that represents the set of arguments being sent to the method method. The +# argument child node can be +nil+ if no arguments were passed, as in: +# +# method() +# +# source://syntax_tree//lib/syntax_tree/node.rb#727 +class SyntaxTree::ArgParen < ::SyntaxTree::Node + # @return [ArgParen] a new instance of ArgParen + # + # source://syntax_tree//lib/syntax_tree/node.rb#735 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#784 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#741 + def accept(visitor); end + + # [nil | Args | ArgsForward] the arguments inside the + # parentheses + # + # source://syntax_tree//lib/syntax_tree/node.rb#730 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#788 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#745 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#733 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#749 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#745 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#762 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#766 + def format(q); end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#794 + def trailing_comma?; end +end + +# Star represents using a splat operator on an expression. +# +# method(*arguments) +# +# source://syntax_tree//lib/syntax_tree/node.rb#939 +class SyntaxTree::ArgStar < ::SyntaxTree::Node + # @return [ArgStar] a new instance of ArgStar + # + # source://syntax_tree//lib/syntax_tree/node.rb#946 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#982 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#952 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#956 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#944 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#960 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#956 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#973 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#977 + def format(q); end + + # [nil | Node] the expression being splatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#941 + def value; end +end + +# Args represents a list of arguments being passed to a method call or array +# literal. +# +# method(first, second, third) +# +# source://syntax_tree//lib/syntax_tree/node.rb#821 +class SyntaxTree::Args < ::SyntaxTree::Node + # @return [Args] a new instance of Args + # + # source://syntax_tree//lib/syntax_tree/node.rb#828 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#863 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#834 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#867 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#838 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#826 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#842 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#838 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#855 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#859 + def format(q); end + + # [Array[ Node ]] the arguments that this node wraps + # + # source://syntax_tree//lib/syntax_tree/node.rb#823 + def parts; end +end + +# ArgsForward represents forwarding all kinds of arguments onto another method +# call. +# +# def request(method, path, **headers, &block); end +# +# def get(...) +# request(:GET, ...) +# end +# +# def post(...) +# request(:POST, ...) +# end +# +# In the example above, both the get and post methods are forwarding all of +# their arguments (positional, keyword, and block) on to the request method. +# The ArgsForward node appears in both the caller (the request method calls) +# and the callee (the get and post definitions). +# +# source://syntax_tree//lib/syntax_tree/node.rb#1004 +class SyntaxTree::ArgsForward < ::SyntaxTree::Node + # @return [ArgsForward] a new instance of ArgsForward + # + # source://syntax_tree//lib/syntax_tree/node.rb#1008 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1038 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1013 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1042 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1017 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1006 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1021 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1017 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1030 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1034 + def format(q); end +end + +# ArrayLiteral represents an array literal, which can optionally contain +# elements. +# +# [] +# [one, two, three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#1053 +class SyntaxTree::ArrayLiteral < ::SyntaxTree::Node + # @return [ArrayLiteral] a new instance of ArrayLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#1153 + def initialize(lbracket:, contents:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1229 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1160 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1164 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1151 + def comments; end + + # [nil | Args] the contents of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#1148 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1168 + def copy(lbracket: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1164 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1182 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1191 + def format(q); end + + # [nil | LBracket | QSymbolsBeg | QWordsBeg | SymbolsBeg | WordsBeg] the + # bracket that opens this array + # + # source://syntax_tree//lib/syntax_tree/node.rb#1145 + def lbracket; end + + private + + # If we have an empty array that contains only comments, then we're going + # to do some special printing to ensure they get indented correctly. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1259 + def empty_with_comments?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1251 + def qsymbols?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1236 + def qwords?; end +end + +# source://syntax_tree//lib/syntax_tree/node.rb#1063 +SyntaxTree::ArrayLiteral::BREAKABLE_SPACE_SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::ArrayLiteral::BreakableSpaceSeparator) + +# It's very common to use seplist with ->(q) { q.breakable_space }. We wrap +# that pattern into an object to cut down on having to create a bunch of +# lambdas all over the place. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1057 +class SyntaxTree::ArrayLiteral::BreakableSpaceSeparator + # source://syntax_tree//lib/syntax_tree/node.rb#1058 + def call(q); end +end + +# This is a special formatter used if the array literal contains no values +# but _does_ contain comments. In this case we do some special formatting to +# make sure the comments gets indented properly. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1120 +class SyntaxTree::ArrayLiteral::EmptyWithCommentsFormatter + # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#1124 + def initialize(lbracket); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1128 + def format(q); end + + # [LBracket] the opening bracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#1122 + def lbracket; end +end + +# Formats an array of multiple simple symbol literals into the %i syntax. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1094 +class SyntaxTree::ArrayLiteral::QSymbolsFormatter + # @return [QSymbolsFormatter] a new instance of QSymbolsFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#1098 + def initialize(contents); end + + # [Args] the contents of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#1096 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1102 + def format(q); end +end + +# Formats an array of multiple simple string literals into the %w syntax. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1066 +class SyntaxTree::ArrayLiteral::QWordsFormatter + # @return [QWordsFormatter] a new instance of QWordsFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#1070 + def initialize(contents); end + + # [Args] the contents of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#1068 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1074 + def format(q); end +end + +# When we're implementing the === operator for a node, we oftentimes need to +# compare two arrays. We want to skip over the === definition of array and use +# our own here, so we do that using this module. +# +# source://syntax_tree//lib/syntax_tree/node.rb#157 +module SyntaxTree::ArrayMatch + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#158 + def call(left, right); end + end +end + +# AryPtn represents matching against an array pattern using the Ruby 2.7+ +# pattern matching syntax. It’s one of the more complicated nodes, because +# the four parameters that it accepts can almost all be nil. +# +# case [1, 2, 3] +# in [Integer, Integer] +# "matched" +# in Container[Integer, Integer] +# "matched" +# in [Integer, *, Integer] +# "matched" +# end +# +# An AryPtn node is created with four parameters: an optional constant +# wrapper, an array of positional matches, an optional splat with identifier, +# and an optional array of positional matches that occur after the splat. +# All of the in clauses above would create an AryPtn node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1282 +class SyntaxTree::AryPtn < ::SyntaxTree::Node + # @return [AryPtn] a new instance of AryPtn + # + # source://syntax_tree//lib/syntax_tree/node.rb#1320 + def initialize(constant:, requireds:, rest:, posts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1388 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1329 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1333 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1318 + def comments; end + + # [nil | VarRef | ConstPathRef] the optional constant wrapper + # + # source://syntax_tree//lib/syntax_tree/node.rb#1303 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1337 + def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1333 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1359 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1370 + def format(q); end + + # [Array[ Node ]] the list of positional arguments occurring after the + # optional star if there is one + # + # source://syntax_tree//lib/syntax_tree/node.rb#1315 + def posts; end + + # [Array[ Node ]] the regular positional arguments that this array + # pattern is matching against + # + # source://syntax_tree//lib/syntax_tree/node.rb#1307 + def requireds; end + + # [nil | VarField] the optional starred identifier that grabs up a list of + # positional arguments + # + # source://syntax_tree//lib/syntax_tree/node.rb#1311 + def rest; end +end + +# Formats the optional splat of an array pattern. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1284 +class SyntaxTree::AryPtn::RestFormatter + # @return [RestFormatter] a new instance of RestFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#1288 + def initialize(value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1292 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1296 + def format(q); end + + # [VarField] the identifier that represents the remaining positionals + # + # source://syntax_tree//lib/syntax_tree/node.rb#1286 + def value; end +end + +# Assign represents assigning something to a variable or constant. Generally, +# the left side of the assignment is going to be any node that ends with the +# name "Field". +# +# variable = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#1418 +class SyntaxTree::Assign < ::SyntaxTree::Node + # @return [Assign] a new instance of Assign + # + # source://syntax_tree//lib/syntax_tree/node.rb#1429 + def initialize(target:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1479 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1436 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1440 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1427 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1444 + def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1440 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1458 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1462 + def format(q); end + + # [ARefField | ConstPathField | Field | TopConstField | VarField] the target + # to assign the result of the expression to + # + # source://syntax_tree//lib/syntax_tree/node.rb#1421 + def target; end + + # [Node] the expression to be assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#1424 + def value; end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1485 + def skip_indent?; end +end + +# Determins if the following value should be indented or not. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1396 +module SyntaxTree::AssignFormatting + class << self + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1397 + def skip_indent?(value); end + end +end + +# Assoc represents a key-value pair within a hash. It is a child node of +# either an AssocListFromArgs or a BareAssocHash. +# +# { key1: value1, key2: value2 } +# +# In the above example, the would be two Assoc nodes. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1497 +class SyntaxTree::Assoc < ::SyntaxTree::Node + # @return [Assoc] a new instance of Assoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#1507 + def initialize(key:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1548 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1514 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1518 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1505 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1522 + def copy(key: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1518 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1536 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1540 + def format(q); end + + # [Node] the key of this pair + # + # source://syntax_tree//lib/syntax_tree/node.rb#1499 + def key; end + + # [nil | Node] the value of this pair + # + # source://syntax_tree//lib/syntax_tree/node.rb#1502 + def value; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#1554 + def format_contents(q); end +end + +# AssocSplat represents double-splatting a value into a hash (either a hash +# literal or a bare hash in a method call). +# +# { **pairs } +# +# source://syntax_tree//lib/syntax_tree/node.rb#1575 +class SyntaxTree::AssocSplat < ::SyntaxTree::Node + # @return [AssocSplat] a new instance of AssocSplat + # + # source://syntax_tree//lib/syntax_tree/node.rb#1582 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1618 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1588 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1592 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1580 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1596 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1592 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1609 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1613 + def format(q); end + + # [nil | Node] the expression that is being splatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#1577 + def value; end +end + +# BEGINBlock represents the use of the +BEGIN+ keyword, which hooks into the +# lifecycle of the interpreter. Whatever is inside the block will get executed +# when the program starts. +# +# BEGIN { +# } +# +# Interestingly, the BEGIN keyword doesn't allow the do and end keywords for +# the block. Only braces are permitted. +# +# source://syntax_tree//lib/syntax_tree/node.rb#175 +class SyntaxTree::BEGINBlock < ::SyntaxTree::Node + # @return [BEGINBlock] a new instance of BEGINBlock + # + # source://syntax_tree//lib/syntax_tree/node.rb#185 + def initialize(lbrace:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#236 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#192 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#196 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#183 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#200 + def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#196 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#214 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#223 + def format(q); end + + # [LBrace] the left brace that is seen after the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#177 + def lbrace; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#180 + def statements; end +end + +# Backref represents a global variable referencing a matched value. It comes +# in the form of a $ followed by a positive integer. +# +# $1 +# +# source://syntax_tree//lib/syntax_tree/node.rb#1628 +class SyntaxTree::Backref < ::SyntaxTree::Node + # @return [Backref] a new instance of Backref + # + # source://syntax_tree//lib/syntax_tree/node.rb#1635 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1670 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1641 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1645 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1633 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1649 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1645 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1662 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1666 + def format(q); end + + # [String] the name of the global backreference variable + # + # source://syntax_tree//lib/syntax_tree/node.rb#1630 + def value; end +end + +# Backtick represents the use of the ` operator. It's usually found being used +# for an XStringLiteral, but could also be found as the name of a method being +# defined. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1678 +class SyntaxTree::Backtick < ::SyntaxTree::Node + # @return [Backtick] a new instance of Backtick + # + # source://syntax_tree//lib/syntax_tree/node.rb#1685 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1720 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1691 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1695 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1683 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1699 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1695 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1712 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1716 + def format(q); end + + # [String] the backtick in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#1680 + def value; end +end + +# BareAssocHash represents a hash of contents being passed as a method +# argument (and therefore has omitted braces). It's very similar to an +# AssocListFromArgs node. +# +# method(key1: value1, key2: value2) +# +# source://syntax_tree//lib/syntax_tree/node.rb#1834 +class SyntaxTree::BareAssocHash < ::SyntaxTree::Node + # @return [BareAssocHash] a new instance of BareAssocHash + # + # source://syntax_tree//lib/syntax_tree/node.rb#1841 + def initialize(assocs:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1876 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1847 + def accept(visitor); end + + # [Array[ Assoc | AssocSplat ]] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1836 + def assocs; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1851 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1839 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1855 + def copy(assocs: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1851 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1868 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1872 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1880 + def format_key(q, key); end +end + +# BasicVisitor is the parent class of the Visitor class that provides the +# ability to walk down the tree. It does not define any handlers, so you +# should extend this class if you want your visitor to raise an error if you +# attempt to visit a node that you don't handle. +# +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#8 +class SyntaxTree::BasicVisitor + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#105 + def visit(node); end + + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#109 + def visit_all(nodes); end + + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_child_nodes(node); end + + class << self + # This is the list of all of the valid visit methods. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#72 + def valid_visit_methods; end + + # This method is here to help folks write visitors. + # + # It's not always easy to ensure you're writing the correct method name in + # the visitor since it's perfectly valid to define methods that don't + # override these parent methods. + # + # If you use this method, you can ensure you're writing the correct method + # name. It will raise an error if the visit method you're defining isn't + # actually a method on the parent visitor. + # + # @raise [VisitMethodError] + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#86 + def visit_method(method_name); end + + # This method is here to help folks write visitors. + # + # Within the given block, every method that is defined will be checked to + # ensure it's a valid visit method using the BasicVisitor::visit_method + # method defined above. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#97 + def visit_methods; end + end +end + +# This class is used by DidYouMean to offer corrections to invalid visit +# method names. +# +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#22 +class SyntaxTree::BasicVisitor::VisitMethodChecker + # @return [VisitMethodChecker] a new instance of VisitMethodChecker + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#25 + def initialize(error); end + + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#29 + def corrections; end + + # Returns the value of attribute visit_method. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#23 + def visit_method; end +end + +# This is raised when you use the Visitor.visit_method method and it fails. +# It is correctable to through DidYouMean. +# +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#11 +class SyntaxTree::BasicVisitor::VisitMethodError < ::StandardError + include ::DidYouMean::Correctable + + # @return [VisitMethodError] a new instance of VisitMethodError + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#14 + def initialize(visit_method); end + + # Returns the value of attribute visit_method. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#12 + def visit_method; end +end + +# This module is responsible for checking all of the methods defined within +# a given block to ensure that they are valid visit methods. +# +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#45 +class SyntaxTree::BasicVisitor::VisitMethodsChecker < ::Module + # @return [VisitMethodsChecker] a new instance of VisitMethodsChecker + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#53 + def initialize; end + + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#65 + def disable!; end + + # This is the status of the checker. It's used to determine whether or not + # we should be checking the methods that are defined. It is kept as an + # instance variable so that it can be disabled later. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#51 + def status; end +end + +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#46 +class SyntaxTree::BasicVisitor::VisitMethodsChecker::Status < ::Struct + # Returns the value of attribute checking + # + # @return [Object] the current value of checking + def checking; end + + # Sets the attribute checking + # + # @param value [Object] the value to set the attribute checking to. + # @return [Object] the newly set value + def checking=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Begin represents a begin..end chain. +# +# begin +# value +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#1899 +class SyntaxTree::Begin < ::SyntaxTree::Node + # @return [Begin] a new instance of Begin + # + # source://syntax_tree//lib/syntax_tree/node.rb#1906 + def initialize(bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1951 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1912 + def accept(visitor); end + + # [BodyStmt] the bodystmt that contains the contents of this begin block + # + # source://syntax_tree//lib/syntax_tree/node.rb#1901 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1916 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1904 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1920 + def copy(bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1916 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1933 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1937 + def format(q); end +end + +# Binary represents any expression that involves two sub-expressions with an +# operator in between. This can be something that looks like a mathematical +# operation: +# +# 1 + 1 +# +# but can also be something like pushing a value onto an array: +# +# array << value +# +# source://syntax_tree//lib/syntax_tree/node.rb#2029 +class SyntaxTree::Binary < ::SyntaxTree::Node + # @return [Binary] a new instance of Binary + # + # source://syntax_tree//lib/syntax_tree/node.rb#2056 + def initialize(left:, operator:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2128 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2064 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2068 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2054 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2072 + def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2068 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2087 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2097 + def format(q); end + + # [Node] the left-hand side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#2045 + def left; end + + # [Symbol] the operator used between the two expressions + # + # source://syntax_tree//lib/syntax_tree/node.rb#2048 + def operator; end + + # [Node] the right-hand side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#2051 + def right; end +end + +# BlockArg represents declaring a block parameter on a method definition. +# +# def method(&block); end +# +# source://syntax_tree//lib/syntax_tree/node.rb#2227 +class SyntaxTree::BlockArg < ::SyntaxTree::Node + # @return [BlockArg] a new instance of BlockArg + # + # source://syntax_tree//lib/syntax_tree/node.rb#2234 + def initialize(name:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2270 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2240 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2244 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2232 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2248 + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2244 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2261 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2265 + def format(q); end + + # [nil | Ident] the name of the block argument + # + # source://syntax_tree//lib/syntax_tree/node.rb#2229 + def name; end +end + +# Block represents passing a block to a method call using the +do+ and +end+ +# keywords or the +{+ and +}+ operators. +# +# method do |value| +# end +# +# method { |value| } +# +# source://syntax_tree//lib/syntax_tree/node.rb#4312 +class SyntaxTree::BlockNode < ::SyntaxTree::Node + # @return [BlockNode] a new instance of BlockNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#4347 + def initialize(opening:, block_var:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4420 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4355 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4429 + def arity; end + + # [nil | BlockVar] the optional variable declaration within this block + # + # source://syntax_tree//lib/syntax_tree/node.rb#4339 + def block_var; end + + # [BodyStmt | Statements] the expressions to be executed within this block + # + # source://syntax_tree//lib/syntax_tree/node.rb#4342 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4359 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4345 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4363 + def copy(opening: T.unsafe(nil), block_var: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4359 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4378 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4388 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4425 + def keywords?; end + + # [LBrace | Kw] the left brace or the do keyword that opens this block + # + # source://syntax_tree//lib/syntax_tree/node.rb#4336 + def opening; end + + private + + # If we're the predicate of a loop or conditional, then we're going to have + # to go with the {..} bounds. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4471 + def forced_brace_bounds?(q); end + + # If we're a sibling of a control-flow keyword, then we're going to have to + # use the do..end bounds. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4460 + def forced_do_end_bounds?(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4487 + def format_break(q, break_opening, break_closing); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4507 + def format_flat(q, flat_opening, flat_closing); end + + # If this is nested anywhere inside certain nodes, then we can't change + # which operators/keywords we're using for the bounds of the block. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4442 + def unchangeable_bounds?(q); end +end + +# Formats the opening brace or keyword of a block. +# +# source://syntax_tree//lib/syntax_tree/node.rb#4314 +class SyntaxTree::BlockNode::BlockOpenFormatter + # @return [BlockOpenFormatter] a new instance of BlockOpenFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#4321 + def initialize(text, node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4326 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4330 + def format(q); end + + # [LBrace | Keyword] the node that is being represented + # + # source://syntax_tree//lib/syntax_tree/node.rb#4319 + def node; end + + # [String] the actual output that should be printed + # + # source://syntax_tree//lib/syntax_tree/node.rb#4316 + def text; end +end + +# BlockVar represents the parameters being declared for a block. Effectively +# this node is everything contained within the pipes. This includes all of the +# various parameter types, as well as block-local variable declarations. +# +# method do |positional, optional = value, keyword:, █ local| +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#2141 +class SyntaxTree::BlockVar < ::SyntaxTree::Node + # @return [BlockVar] a new instance of BlockVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#2151 + def initialize(params:, locals:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2209 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2158 + def accept(visitor); end + + # When a single required parameter is declared for a block, it gets + # automatically expanded if the values being yielded into it are an array. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2216 + def arg0?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2162 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2149 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2166 + def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2162 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2180 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2196 + def format(q); end + + # [Array[ Ident ]] the list of block-local variable declarations + # + # source://syntax_tree//lib/syntax_tree/node.rb#2146 + def locals; end + + # [Params] the parameters being declared with the block + # + # source://syntax_tree//lib/syntax_tree/node.rb#2143 + def params; end +end + +# We'll keep a single instance of this separator around for all block vars +# to cut down on allocations. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2194 +SyntaxTree::BlockVar::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::BlockVar::Separator) + +# Within the pipes of the block declaration, we don't want any spaces. So +# we'll separate the parameters with a comma and space but no breakables. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2186 +class SyntaxTree::BlockVar::Separator + # source://syntax_tree//lib/syntax_tree/node.rb#2187 + def call(q); end +end + +# bodystmt can't actually determine its bounds appropriately because it +# doesn't necessarily know where it started. So the parent node needs to +# report back down into this one where it goes. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2278 +class SyntaxTree::BodyStmt < ::SyntaxTree::Node + # @return [BodyStmt] a new instance of BodyStmt + # + # source://syntax_tree//lib/syntax_tree/node.rb#2297 + def initialize(statements:, rescue_clause:, else_keyword:, else_clause:, ensure_clause:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2428 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2352 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2314 + def bind(parser, start_char, start_column, end_char, end_column); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2356 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2295 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2360 + def copy(statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_keyword: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2356 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2384 + def deconstruct_keys(_keys); end + + # [nil | Statements] the optional set of statements inside the else clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#2289 + def else_clause; end + + # [nil | Kw] the optional else keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#2286 + def else_keyword; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2348 + def empty?; end + + # [nil | Ensure] the optional ensure clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#2292 + def ensure_clause; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2396 + def format(q); end + + # [nil | Rescue] the optional rescue chain attached to the begin clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#2283 + def rescue_clause; end + + # [Statements] the list of statements inside the begin clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#2280 + def statements; end +end + +# Break represents using the +break+ keyword. +# +# break +# +# It can also optionally accept arguments, as in: +# +# break 1 +# +# source://syntax_tree//lib/syntax_tree/node.rb#2634 +class SyntaxTree::Break < ::SyntaxTree::Node + # @return [Break] a new instance of Break + # + # source://syntax_tree//lib/syntax_tree/node.rb#2641 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2676 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2647 + def accept(visitor); end + + # [Args] the arguments being sent to the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#2636 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2651 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2639 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2655 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2651 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2668 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2672 + def format(q); end +end + +# CHAR irepresents a single codepoint in the script encoding. +# +# ?a +# +# In the example above, the CHAR node represents the string literal "a". You +# can use control characters with this as well, as in ?\C-a. +# +# source://syntax_tree//lib/syntax_tree/node.rb#248 +class SyntaxTree::CHAR < ::SyntaxTree::Node + # @return [CHAR] a new instance of CHAR + # + # source://syntax_tree//lib/syntax_tree/node.rb#255 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#296 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#261 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#265 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#253 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#269 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#265 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#282 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#286 + def format(q); end + + # [String] the value of the character literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#250 + def value; end +end + +# CVar represents the use of a class variable. +# +# @@variable +# +# source://syntax_tree//lib/syntax_tree/node.rb#4046 +class SyntaxTree::CVar < ::SyntaxTree::Node + # @return [CVar] a new instance of CVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#4053 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4088 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4059 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4063 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4051 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4067 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4063 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4080 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4084 + def format(q); end + + # [String] the name of the class variable + # + # source://syntax_tree//lib/syntax_tree/node.rb#4048 + def value; end +end + +# This is probably the most complicated formatter in this file. It's +# responsible for formatting chains of method calls, with or without arguments +# or blocks. In general, we want to go from something like +# +# foo.bar.baz +# +# to +# +# foo +# .bar +# .baz +# +# Of course there are a lot of caveats to that, including trailing operators +# when necessary, where comments are places, how blocks are aligned, etc. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2721 +class SyntaxTree::CallChainFormatter + # @return [CallChainFormatter] a new instance of CallChainFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#2725 + def initialize(node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2729 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2795 + def format_chain(q, children); end + + # [CallNode | MethodAddBlock] the top of the call chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#2723 + def node; end + + private + + # For certain nodes, we want to attach directly to the end and don't + # want to indent the first call. So we'll pop off the first children and + # format it separately here. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2898 + def attach_directly?(node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2908 + def format_child(q, child, skip_comments: T.unsafe(nil), skip_operator: T.unsafe(nil), skip_attached: T.unsafe(nil)); end + + class << self + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2879 + def chained?(node); end + end +end + +# CallNode represents a method call. +# +# receiver.message +# +# source://syntax_tree//lib/syntax_tree/node.rb#2946 +class SyntaxTree::CallNode < ::SyntaxTree::Node + # @return [CallNode] a new instance of CallNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#2962 + def initialize(receiver:, operator:, message:, arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3057 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2971 + def accept(visitor); end + + # [nil | ArgParen | Args] the arguments to the method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#2957 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3103 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2975 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2960 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2984 + def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2975 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3006 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3017 + def format(q); end + + # Print out the arguments to this call. If there are no arguments, then do + # nothing. + # + # source://syntax_tree//lib/syntax_tree/node.rb#3065 + def format_arguments(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3075 + def format_contents(q); end + + # [:call | Backtick | Const | Ident | Op] the message being sent + # + # source://syntax_tree//lib/syntax_tree/node.rb#2954 + def message; end + + # [nil | :"::" | Op | Period] the operator being used to send the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#2951 + def operator; end + + # [nil | Node] the receiver of the method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#2948 + def receiver; end +end + +# Wraps a call operator (which can be a string literal :: or an Op node or a +# Period node) and formats it when called. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2683 +class SyntaxTree::CallOperatorFormatter + # @return [CallOperatorFormatter] a new instance of CallOperatorFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#2687 + def initialize(operator); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2691 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2695 + def format(q); end + + # [:"::" | Op | Period] the operator being formatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#2685 + def operator; end +end + +# Case represents the beginning of a case chain. +# +# case value +# when 1 +# "one" +# when 2 +# "two" +# else +# "number" +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#3119 +class SyntaxTree::Case < ::SyntaxTree::Node + # @return [Case] a new instance of Case + # + # source://syntax_tree//lib/syntax_tree/node.rb#3132 + def initialize(keyword:, value:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3190 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3140 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3144 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3130 + def comments; end + + # [In | When] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#3127 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3148 + def copy(keyword: T.unsafe(nil), value: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3144 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3163 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3173 + def format(q); end + + # [Kw] the keyword that opens this expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#3121 + def keyword; end + + # [nil | Node] optional value being switched on + # + # source://syntax_tree//lib/syntax_tree/node.rb#3124 + def value; end +end + +# Class represents defining a class using the +class+ keyword. +# +# class Container +# end +# +# Classes can have path names as their class name in case it's being nested +# under a namespace, as in: +# +# class Namespace::Container +# end +# +# Classes can also be defined as a top-level path, in the case that it's +# already in a namespace but you want to define it at the top-level instead, +# as in: +# +# module OtherNamespace +# class ::Namespace::Container +# end +# end +# +# All of these declarations can also have an optional superclass reference, as +# in: +# +# class Child < Parent +# end +# +# That superclass can actually be any Ruby expression, it doesn't necessarily +# need to be a constant, as in: +# +# class Child < method +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#3315 +class SyntaxTree::ClassDeclaration < ::SyntaxTree::Node + # @return [ClassDeclaration] a new instance of ClassDeclaration + # + # source://syntax_tree//lib/syntax_tree/node.rb#3329 + def initialize(constant:, superclass:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3392 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3337 + def accept(visitor); end + + # [BodyStmt] the expressions to execute within the context of the class + # + # source://syntax_tree//lib/syntax_tree/node.rb#3324 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3341 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3327 + def comments; end + + # [ConstPathRef | ConstRef | TopConstRef] the name of the class being + # defined + # + # source://syntax_tree//lib/syntax_tree/node.rb#3318 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3345 + def copy(constant: T.unsafe(nil), superclass: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3341 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3360 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3370 + def format(q); end + + # [nil | Node] the optional superclass declaration + # + # source://syntax_tree//lib/syntax_tree/node.rb#3321 + def superclass; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#3399 + def format_declaration(q); end +end + +# Comma represents the use of the , operator. +# +# source://syntax_tree//lib/syntax_tree/node.rb#3413 +class SyntaxTree::Comma < ::SyntaxTree::Node + # @return [Comma] a new instance of Comma + # + # source://syntax_tree//lib/syntax_tree/node.rb#3417 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3440 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3422 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3426 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3430 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3426 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3436 + def deconstruct_keys(_keys); end + + # [String] the comma in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#3415 + def value; end +end + +# Command represents a method call with arguments and no parentheses. Note +# that Command nodes only happen when there is no explicit receiver for this +# method. +# +# method argument +# +# source://syntax_tree//lib/syntax_tree/node.rb#3451 +class SyntaxTree::Command < ::SyntaxTree::Node + # @return [Command] a new instance of Command + # + # source://syntax_tree//lib/syntax_tree/node.rb#3464 + def initialize(message:, arguments:, block:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3514 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3472 + def accept(visitor); end + + # [Args] the arguments being sent with the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#3456 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3519 + def arity; end + + # [nil | BlockNode] the optional block being passed to the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#3459 + def block; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3476 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3462 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3480 + def copy(message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3476 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3495 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3505 + def format(q); end + + # [Const | Ident] the message being sent to the implicit receiver + # + # source://syntax_tree//lib/syntax_tree/node.rb#3453 + def message; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#3525 + def align(q, node, &block); end +end + +# CommandCall represents a method call on an object with arguments and no +# parentheses. +# +# object.method argument +# +# source://syntax_tree//lib/syntax_tree/node.rb#3563 +class SyntaxTree::CommandCall < ::SyntaxTree::Node + # @return [CommandCall] a new instance of CommandCall + # + # source://syntax_tree//lib/syntax_tree/node.rb#3582 + def initialize(receiver:, operator:, message:, arguments:, block:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3686 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3599 + def accept(visitor); end + + # [nil | Args | ArgParen] the arguments going along with the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#3574 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3692 + def arity; end + + # [nil | BlockNode] the block associated with this method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#3577 + def block; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3603 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3580 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3607 + def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3603 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3631 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3643 + def format(q); end + + # [:call | Const | Ident | Op] the message being send + # + # source://syntax_tree//lib/syntax_tree/node.rb#3571 + def message; end + + # [nil | :"::" | Op | Period] the operator used to send the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#3568 + def operator; end + + # [nil | Node] the receiver of the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#3565 + def receiver; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#3698 + def argument_alignment(q, doc); end +end + +# Comment represents a comment in the source. +# +# # comment +# +# source://syntax_tree//lib/syntax_tree/node.rb#3725 +class SyntaxTree::Comment < ::SyntaxTree::Node + # @return [Comment] a new instance of Comment + # + # source://syntax_tree//lib/syntax_tree/node.rb#3734 + def initialize(value:, inline:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3793 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3767 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3771 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3763 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3775 + def copy(value: T.unsafe(nil), inline: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3771 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3785 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3789 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#3759 + def ignore?; end + + # [boolean] whether or not there is code on the same line as this comment. + # If there is, then inline will be true. + # + # source://syntax_tree//lib/syntax_tree/node.rb#3731 + def inline; end + + # [boolean] whether or not there is code on the same line as this comment. + # If there is, then inline will be true. + # + # source://syntax_tree//lib/syntax_tree/node.rb#3731 + def inline?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3743 + def leading!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#3747 + def leading?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3751 + def trailing!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#3755 + def trailing?; end + + # [String] the contents of the comment + # + # source://syntax_tree//lib/syntax_tree/node.rb#3727 + def value; end +end + +# Formats an If or Unless node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6317 +class SyntaxTree::ConditionalFormatter + # @return [ConditionalFormatter] a new instance of ConditionalFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#6324 + def initialize(keyword, node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6329 + def format(q); end + + # [String] the keyword associated with this conditional + # + # source://syntax_tree//lib/syntax_tree/node.rb#6319 + def keyword; end + + # [If | Unless] the node that is being formatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#6322 + def node; end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#6453 + def contains_conditional?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6388 + def format_break(q, force:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6380 + def format_flat(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6408 + def format_ternary(q); end +end + +# Const represents a literal value that _looks_ like a constant. This could +# actually be a reference to a constant: +# +# Constant +# +# It could also be something that looks like a constant in another context, as +# in a method call to a capitalized method: +# +# object.Constant +# +# or a symbol that starts with a capital letter: +# +# :Constant +# +# source://syntax_tree//lib/syntax_tree/node.rb#3812 +class SyntaxTree::Const < ::SyntaxTree::Node + # @return [Const] a new instance of Const + # + # source://syntax_tree//lib/syntax_tree/node.rb#3819 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3854 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3825 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3829 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3817 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3833 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3829 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3846 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3850 + def format(q); end + + # [String] the name of the constant + # + # source://syntax_tree//lib/syntax_tree/node.rb#3814 + def value; end +end + +# ConstPathField represents the child node of some kind of assignment. It +# represents when you're assigning to a constant that is being referenced as +# a child of another variable. +# +# object::Const = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#3865 +class SyntaxTree::ConstPathField < ::SyntaxTree::Node + # @return [ConstPathField] a new instance of ConstPathField + # + # source://syntax_tree//lib/syntax_tree/node.rb#3875 + def initialize(parent:, constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3919 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3882 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3886 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3873 + def comments; end + + # [Const] the constant itself + # + # source://syntax_tree//lib/syntax_tree/node.rb#3870 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3890 + def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3886 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3904 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3913 + def format(q); end + + # [Node] the source of the constant + # + # source://syntax_tree//lib/syntax_tree/node.rb#3867 + def parent; end +end + +# ConstPathRef represents referencing a constant by a path. +# +# object::Const +# +# source://syntax_tree//lib/syntax_tree/node.rb#3929 +class SyntaxTree::ConstPathRef < ::SyntaxTree::Node + # @return [ConstPathRef] a new instance of ConstPathRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#3939 + def initialize(parent:, constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3983 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3946 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3950 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3937 + def comments; end + + # [Const] the constant itself + # + # source://syntax_tree//lib/syntax_tree/node.rb#3934 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3954 + def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3950 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3968 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3977 + def format(q); end + + # [Node] the source of the constant + # + # source://syntax_tree//lib/syntax_tree/node.rb#3931 + def parent; end +end + +# ConstRef represents the name of the constant being used in a class or module +# declaration. +# +# class Container +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#3995 +class SyntaxTree::ConstRef < ::SyntaxTree::Node + # @return [ConstRef] a new instance of ConstRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#4002 + def initialize(constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4037 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4008 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4012 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4000 + def comments; end + + # [Const] the constant itself + # + # source://syntax_tree//lib/syntax_tree/node.rb#3997 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4016 + def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4012 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4029 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4033 + def format(q); end +end + +# If the predicate of a conditional or loop contains an assignment (in which +# case we can't know for certain that that assignment doesn't impact the +# statements inside the conditional) then we can't use the modifier form +# and we must use the block form. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6232 +module SyntaxTree::ContainsAssignment + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#6233 + def call(parent); end + end +end + +# The default indentation level for formatting. We allow changing this so +# that Syntax Tree can format arbitrary parts of a document. +# +# source://syntax_tree//lib/syntax_tree.rb#57 +SyntaxTree::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) + +# This is the default print width when formatting. It can be overridden in the +# CLI by passing the --print-width option or here in the API by passing the +# optional second argument to ::format. +# +# source://syntax_tree//lib/syntax_tree.rb#49 +SyntaxTree::DEFAULT_PRINT_WIDTH = T.let(T.unsafe(nil), Integer) + +# This is the default ruby version that we're going to target for formatting. +# It shouldn't really be changed except in very niche circumstances. +# +# source://syntax_tree//lib/syntax_tree.rb#53 +SyntaxTree::DEFAULT_RUBY_VERSION = T.let(T.unsafe(nil), SyntaxTree::Formatter::SemanticVersion) + +# This module provides shortcuts for creating AST nodes. +# +# source://syntax_tree//lib/syntax_tree/dsl.rb#5 +module SyntaxTree::DSL + # Create a new ARef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#40 + def ARef(collection, index); end + + # Create a new ARefField node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#45 + def ARefField(collection, index); end + + # Create a new AliasNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#35 + def AliasNode(left, right); end + + # Create a new ArgBlock node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#64 + def ArgBlock(value); end + + # Create a new ArgParen node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#54 + def ArgParen(arguments); end + + # Create a new ArgStar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#69 + def ArgStar(value); end + + # Create a new Args node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#59 + def Args(parts); end + + # Create a new ArgsForward node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#74 + def ArgsForward; end + + # Create a new ArrayLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#79 + def ArrayLiteral(lbracket, contents); end + + # Create a new AryPtn node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#88 + def AryPtn(constant, requireds, rest, posts); end + + # Create a new Assign node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#99 + def Assign(target, value); end + + # Create a new Assoc node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#104 + def Assoc(key, value); end + + # Create a new AssocSplat node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#109 + def AssocSplat(value); end + + # Create a new BEGINBlock node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#7 + def BEGINBlock(lbrace, statements); end + + # Create a new Backref node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#114 + def Backref(value); end + + # Create a new Backtick node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#119 + def Backtick(value); end + + # Create a new BareAssocHash node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#124 + def BareAssocHash(assocs); end + + # Create a new Begin node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#129 + def Begin(bodystmt); end + + # Create a new Binary node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#139 + def Binary(left, operator, right); end + + # Create a new BlockArg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#154 + def BlockArg(name); end + + # Create a new BlockNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#317 + def BlockNode(opening, block_var, bodystmt); end + + # Create a new BlockVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#149 + def BlockVar(params, locals); end + + # Create a new BodyStmt node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#159 + def BodyStmt(statements, rescue_clause, else_keyword, else_clause, ensure_clause); end + + # Create a new Break node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#177 + def Break(arguments); end + + # Create a new CHAR node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#16 + def CHAR(value); end + + # Create a new CVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#288 + def CVar(value); end + + # Create a new CallNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#182 + def CallNode(receiver, operator, message, arguments); end + + # Create a new Case node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#193 + def Case(keyword, value, consequent); end + + # Create a new ClassDeclaration node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#213 + def ClassDeclaration(constant, superclass, bodystmt, location = T.unsafe(nil)); end + + # Create a new Comma node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#228 + def Comma(value); end + + # Create a new Command node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#233 + def Command(message, arguments, block, location = T.unsafe(nil)); end + + # Create a new CommandCall node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#243 + def CommandCall(receiver, operator, message, arguments, block); end + + # Create a new Comment node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#255 + def Comment(value, inline, location = T.unsafe(nil)); end + + # Create a new Const node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#260 + def Const(value); end + + # Create a new ConstPathField node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#265 + def ConstPathField(parent, constant); end + + # Create a new ConstPathRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#274 + def ConstPathRef(parent, constant); end + + # Create a new ConstRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#283 + def ConstRef(constant); end + + # Create a new DefNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#293 + def DefNode(target, operator, name, params, bodystmt, location = T.unsafe(nil)); end + + # Create a new Defined node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#312 + def Defined(value); end + + # Create a new DynaSymbol node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#337 + def DynaSymbol(parts, quote); end + + # Create a new ENDBlock node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#21 + def ENDBlock(lbrace, statements); end + + # Create a new Else node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#342 + def Else(keyword, statements); end + + # Create a new Elsif node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#351 + def Elsif(predicate, statements, consequent); end + + # Create a new EmbDoc node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#361 + def EmbDoc(value); end + + # Create a new EmbExprBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#366 + def EmbExprBeg(value); end + + # Create a new EmbExprEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#371 + def EmbExprEnd(value); end + + # Create a new EmbVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#376 + def EmbVar(value); end + + # Create a new EndContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#30 + def EndContent(value); end + + # Create a new Ensure node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#381 + def Ensure(keyword, statements); end + + # Create a new ExcessedComma node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#390 + def ExcessedComma(value); end + + # Create a new Field node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#395 + def Field(parent, operator, name); end + + # Create a new FloatLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#405 + def FloatLiteral(value); end + + # Create a new FndPtn node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#410 + def FndPtn(constant, left, values, right); end + + # Create a new For node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#421 + def For(index, collection, statements); end + + # Create a new GVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#431 + def GVar(value); end + + # Create a new HashLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#436 + def HashLiteral(lbrace, assocs); end + + # Create a new Heredoc node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#445 + def Heredoc(beginning, ending, dedent, parts); end + + # Create a new HeredocBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#456 + def HeredocBeg(value); end + + # Create a new HeredocEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#461 + def HeredocEnd(value); end + + # Create a new HshPtn node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#466 + def HshPtn(constant, keywords, keyword_rest); end + + # Create a new IVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#521 + def IVar(value); end + + # Create a new Ident node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#476 + def Ident(value); end + + # Create a new IfNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#481 + def IfNode(predicate, statements, consequent); end + + # Create a new IfOp node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#491 + def IfOp(predicate, truthy, falsy); end + + # Create a new Imaginary node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#501 + def Imaginary(value); end + + # Create a new In node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#506 + def In(pattern, statements, consequent); end + + # Create a new Int node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#516 + def Int(value); end + + # Create a new Kw node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#526 + def Kw(value); end + + # Create a new KwRestParam node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#531 + def KwRestParam(name); end + + # Create a new LBrace node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#560 + def LBrace(value); end + + # Create a new LBracket node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#565 + def LBracket(value); end + + # Create a new LParen node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#570 + def LParen(value); end + + # Create a new Label node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#536 + def Label(value); end + + # Create a new LabelEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#541 + def LabelEnd(value); end + + # Create a new Lambda node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#546 + def Lambda(params, statements); end + + # Create a new LambdaVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#555 + def LambdaVar(params, locals); end + + # Create a new MAssign node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#575 + def MAssign(target, value); end + + # Create a new MLHS node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#585 + def MLHS(parts, comma); end + + # Create a new MLHSParen node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#590 + def MLHSParen(contents, comma); end + + # Create a new MRHS node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#608 + def MRHS(parts); end + + # Create a new MethodAddBlock node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#580 + def MethodAddBlock(call, block, location = T.unsafe(nil)); end + + # Create a new ModuleDeclaration node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#599 + def ModuleDeclaration(constant, bodystmt); end + + # Create a new Next node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#613 + def Next(arguments); end + + # Create a new Not node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#892 + def Not(statement, parentheses); end + + # Create a new Op node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#618 + def Op(value); end + + # Create a new OpAssign node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#623 + def OpAssign(target, operator, value); end + + # Create a new Params node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#633 + def Params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end + + # Create a new Paren node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#647 + def Paren(lparen, contents); end + + # Create a new Period node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#652 + def Period(value); end + + # Create a new PinnedBegin node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#134 + def PinnedBegin(statement); end + + # Create a new PinnedVarRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#944 + def PinnedVarRef(value); end + + # Create a new Program node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#657 + def Program(statements); end + + # Create a new QSymbols node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#662 + def QSymbols(beginning, elements); end + + # Create a new QSymbolsBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#671 + def QSymbolsBeg(value); end + + # Create a new QWords node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#676 + def QWords(beginning, elements); end + + # Create a new QWordsBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#685 + def QWordsBeg(value); end + + # Create a new RAssign node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#203 + def RAssign(value, operator, pattern); end + + # Create a new RBrace node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#695 + def RBrace(value); end + + # Create a new RBracket node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#700 + def RBracket(value); end + + # Create a new RParen node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#783 + def RParen(value); end + + # Create a new RangeNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#327 + def RangeNode(left, operator, right); end + + # Create a new RationalLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#690 + def RationalLiteral(value); end + + # Create a new Redo node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#705 + def Redo; end + + # Create a new RegexpBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#719 + def RegexpBeg(value); end + + # Create a new RegexpContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#710 + def RegexpContent(beginning, parts); end + + # Create a new RegexpEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#724 + def RegexpEnd(value); end + + # Create a new RegexpLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#729 + def RegexpLiteral(beginning, ending, parts); end + + # Create a new Rescue node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#748 + def Rescue(keyword, exception, statements, consequent); end + + # Create a new RescueEx node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#739 + def RescueEx(exceptions, variable); end + + # Create a new RescueMod node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#759 + def RescueMod(statement, value); end + + # Create a new RestParam node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#768 + def RestParam(name); end + + # Create a new Retry node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#773 + def Retry; end + + # Create a new ReturnNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#778 + def ReturnNode(arguments); end + + # Create a new SClass node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#788 + def SClass(target, bodystmt); end + + # Create a new Statements node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#793 + def Statements(body); end + + # Create a new StringConcat node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#803 + def StringConcat(left, right); end + + # Create a new StringContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#798 + def StringContent(parts); end + + # Create a new StringDVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#808 + def StringDVar(variable); end + + # Create a new StringEmbExpr node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#813 + def StringEmbExpr(statements); end + + # Create a new StringLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#818 + def StringLiteral(parts, quote); end + + # Create a new Super node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#823 + def Super(arguments); end + + # Create a new SymBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#828 + def SymBeg(value); end + + # Create a new SymbolContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#833 + def SymbolContent(value); end + + # Create a new SymbolLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#838 + def SymbolLiteral(value); end + + # Create a new Symbols node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#843 + def Symbols(beginning, elements); end + + # Create a new SymbolsBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#852 + def SymbolsBeg(value); end + + # Create a new TLamBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#862 + def TLamBeg(value); end + + # Create a new TLambda node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#857 + def TLambda(value); end + + # Create a new TStringBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#877 + def TStringBeg(value); end + + # Create a new TStringContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#882 + def TStringContent(value); end + + # Create a new TStringEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#887 + def TStringEnd(value); end + + # Create a new TopConstField node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#867 + def TopConstField(constant); end + + # Create a new TopConstRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#872 + def TopConstRef(constant); end + + # Create a new Unary node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#901 + def Unary(operator, statement); end + + # Create a new Undef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#910 + def Undef(symbols); end + + # Create a new UnlessNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#915 + def UnlessNode(predicate, statements, consequent); end + + # Create a new UntilNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#925 + def UntilNode(predicate, statements); end + + # Create a new VCall node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#949 + def VCall(value); end + + # Create a new VarField node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#934 + def VarField(value); end + + # Create a new VarRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#939 + def VarRef(value); end + + # Create a new VoidStmt node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#954 + def VoidStmt; end + + # Create a new When node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#959 + def When(arguments, statements, consequent); end + + # Create a new WhileNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#969 + def WhileNode(predicate, statements); end + + # Create a new Word node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#978 + def Word(parts); end + + # Create a new Words node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#983 + def Words(beginning, elements); end + + # Create a new WordsBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#992 + def WordsBeg(value); end + + # Create a new XString node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#997 + def XString(parts); end + + # Create a new XStringLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#1002 + def XStringLiteral(parts); end + + # Create a new YieldNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#1007 + def YieldNode(arguments); end + + # Create a new ZSuper node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#1012 + def ZSuper; end +end + +# Provides the ability to index source files into a database, then query for +# the nodes. +# +# source://syntax_tree//lib/syntax_tree/database.rb#6 +module SyntaxTree::Database; end + +# Query for the attributes of a node, optionally also filtering by type. +# +# source://syntax_tree//lib/syntax_tree/database.rb#99 +class SyntaxTree::Database::AttrQuery + # @return [AttrQuery] a new instance of AttrQuery + # + # source://syntax_tree//lib/syntax_tree/database.rb#102 + def initialize(type, attrs); end + + # Returns the value of attribute attrs. + # + # source://syntax_tree//lib/syntax_tree/database.rb#100 + def attrs; end + + # source://syntax_tree//lib/syntax_tree/database.rb#107 + def each(database, &block); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/database.rb#100 + def type; end +end + +# source://syntax_tree//lib/syntax_tree/database.rb#276 +class SyntaxTree::Database::Connection + # @return [Connection] a new instance of Connection + # + # source://syntax_tree//lib/syntax_tree/database.rb#279 + def initialize(raw_connection); end + + # source://syntax_tree//lib/syntax_tree/database.rb#283 + def execute(query, binds = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/database.rb#287 + def index_file(filepath); end + + # source://syntax_tree//lib/syntax_tree/database.rb#292 + def last_insert_row_id; end + + # source://syntax_tree//lib/syntax_tree/database.rb#296 + def prepare; end + + # Returns the value of attribute raw_connection. + # + # source://syntax_tree//lib/syntax_tree/database.rb#277 + def raw_connection; end + + # source://syntax_tree//lib/syntax_tree/database.rb#326 + def search(query); end +end + +# source://syntax_tree//lib/syntax_tree/database.rb#7 +class SyntaxTree::Database::IndexingVisitor < ::SyntaxTree::FieldVisitor + # @return [IndexingVisitor] a new instance of IndexingVisitor + # + # source://syntax_tree//lib/syntax_tree/database.rb#10 + def initialize(database, filepath); end + + # Returns the value of attribute database. + # + # source://syntax_tree//lib/syntax_tree/database.rb#8 + def database; end + + # Returns the value of attribute filepath. + # + # source://syntax_tree//lib/syntax_tree/database.rb#8 + def filepath; end + + # Returns the value of attribute node_id. + # + # source://syntax_tree//lib/syntax_tree/database.rb#8 + def node_id; end + + private + + # source://syntax_tree//lib/syntax_tree/database.rb#18 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/database.rb#21 + def field(name, value); end + + # source://syntax_tree//lib/syntax_tree/database.rb#31 + def list(name, values); end + + # source://syntax_tree//lib/syntax_tree/database.rb#41 + def node(node, _name); end + + # source://syntax_tree//lib/syntax_tree/database.rb#67 + def pairs(name, values); end + + # source://syntax_tree//lib/syntax_tree/database.rb#64 + def text(name, value); end +end + +# Query for the results of either query. +# +# source://syntax_tree//lib/syntax_tree/database.rb#136 +class SyntaxTree::Database::OrQuery + # @return [OrQuery] a new instance of OrQuery + # + # source://syntax_tree//lib/syntax_tree/database.rb#139 + def initialize(left, right); end + + # source://syntax_tree//lib/syntax_tree/database.rb#144 + def each(database, &block); end + + # Returns the value of attribute left. + # + # source://syntax_tree//lib/syntax_tree/database.rb#137 + def left; end + + # Returns the value of attribute right. + # + # source://syntax_tree//lib/syntax_tree/database.rb#137 + def right; end +end + +# A pattern matching expression that will be compiled into a query. +# +# source://syntax_tree//lib/syntax_tree/database.rb#166 +class SyntaxTree::Database::Pattern + # @return [Pattern] a new instance of Pattern + # + # source://syntax_tree//lib/syntax_tree/database.rb#172 + def initialize(query); end + + # source://syntax_tree//lib/syntax_tree/database.rb#176 + def compile; end + + # Returns the value of attribute query. + # + # source://syntax_tree//lib/syntax_tree/database.rb#170 + def query; end + + private + + # Shortcut for combining two queries into one that returns the results of + # if either query matches. + # + # source://syntax_tree//lib/syntax_tree/database.rb#195 + def combine_or(left, right); end + + # in foo | bar + # + # source://syntax_tree//lib/syntax_tree/database.rb#200 + def compile_binary(node); end + + # in Ident + # + # source://syntax_tree//lib/syntax_tree/database.rb#207 + def compile_const(node); end + + # in SyntaxTree::Ident + # + # source://syntax_tree//lib/syntax_tree/database.rb#219 + def compile_const_path_ref(node); end + + # @raise [CompilationError] + # + # source://syntax_tree//lib/syntax_tree/database.rb#189 + def compile_error(node); end + + # in Ident[value: String] + # + # source://syntax_tree//lib/syntax_tree/database.rb#234 + def compile_hshptn(node); end + + # source://syntax_tree//lib/syntax_tree/database.rb#258 + def compile_node(node); end + + # in Foo + # + # source://syntax_tree//lib/syntax_tree/database.rb#248 + def compile_var_ref(node); end +end + +# source://syntax_tree//lib/syntax_tree/database.rb#167 +class SyntaxTree::Database::Pattern::CompilationError < ::StandardError; end + +# A lazy query result. +# +# source://syntax_tree//lib/syntax_tree/database.rb#151 +class SyntaxTree::Database::QueryResult + # @return [QueryResult] a new instance of QueryResult + # + # source://syntax_tree//lib/syntax_tree/database.rb#154 + def initialize(database, query); end + + # Returns the value of attribute database. + # + # source://syntax_tree//lib/syntax_tree/database.rb#152 + def database; end + + # source://syntax_tree//lib/syntax_tree/database.rb#159 + def each(&block); end + + # Returns the value of attribute query. + # + # source://syntax_tree//lib/syntax_tree/database.rb#152 + def query; end +end + +# Query for a specific type of node. +# +# source://syntax_tree//lib/syntax_tree/database.rb#85 +class SyntaxTree::Database::TypeQuery + # @return [TypeQuery] a new instance of TypeQuery + # + # source://syntax_tree//lib/syntax_tree/database.rb#88 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/database.rb#92 + def each(database, &block); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/database.rb#86 + def type; end +end + +# Def represents defining a regular method on the current self object. +# +# def method(param) result end +# def object.method(param) result end +# +# source://syntax_tree//lib/syntax_tree/node.rb#4098 +class SyntaxTree::DefNode < ::SyntaxTree::Node + # @return [DefNode] a new instance of DefNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#4117 + def initialize(target:, operator:, name:, params:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4217 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4127 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4230 + def arity; end + + # [BodyStmt | Node] the expressions to be executed by the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#4112 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4131 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4115 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4135 + def copy(target: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), params: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4131 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4159 + def deconstruct_keys(_keys); end + + # Returns true if the method was found in the source in the "endless" form, + # i.e. where the method body is defined using the `=` operator after the + # method name and parameters. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4226 + def endless?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4171 + def format(q); end + + # [Backtick | Const | Ident | Kw | Op] the name of the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#4106 + def name; end + + # [nil | Op | Period] the operator being used to declare the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#4103 + def operator; end + + # [nil | Params | Paren] the parameter declaration for the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#4109 + def params; end + + # [nil | Node] the target where the method is being defined + # + # source://syntax_tree//lib/syntax_tree/node.rb#4100 + def target; end +end + +# Defined represents the use of the +defined?+ operator. It can be used with +# and without parentheses. +# +# defined?(variable) +# +# source://syntax_tree//lib/syntax_tree/node.rb#4249 +class SyntaxTree::Defined < ::SyntaxTree::Node + # @return [Defined] a new instance of Defined + # + # source://syntax_tree//lib/syntax_tree/node.rb#4256 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4299 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4262 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4266 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4254 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4270 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4266 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4283 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4287 + def format(q); end + + # [Node] the value being sent to the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#4251 + def value; end +end + +# DynaSymbol represents a symbol literal that uses quotes to dynamically +# define its value. +# +# :"#{variable}" +# +# They can also be used as a special kind of dynamic hash key, as in: +# +# { "#{key}": value } +# +# source://syntax_tree//lib/syntax_tree/node.rb#4663 +class SyntaxTree::DynaSymbol < ::SyntaxTree::Node + # @return [DynaSymbol] a new instance of DynaSymbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#4674 + def initialize(parts:, quote:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4736 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4681 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4685 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4672 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4689 + def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4685 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4703 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4707 + def format(q); end + + # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the + # dynamic symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#4666 + def parts; end + + # [nil | String] the quote used to delimit the dynamic symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#4669 + def quote; end + + private + + # Here we determine the quotes to use for a dynamic symbol. It's bound by a + # lot of rules because it could be in many different contexts with many + # different kinds of escaping. + # + # source://syntax_tree//lib/syntax_tree/node.rb#4746 + def quotes(q); end +end + +# ENDBlock represents the use of the +END+ keyword, which hooks into the +# lifecycle of the interpreter. Whatever is inside the block will get executed +# when the program ends. +# +# END { +# } +# +# Interestingly, the END keyword doesn't allow the do and end keywords for the +# block. Only braces are permitted. +# +# source://syntax_tree//lib/syntax_tree/node.rb#310 +class SyntaxTree::ENDBlock < ::SyntaxTree::Node + # @return [ENDBlock] a new instance of ENDBlock + # + # source://syntax_tree//lib/syntax_tree/node.rb#320 + def initialize(lbrace:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#371 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#327 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#331 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#318 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#335 + def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#331 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#349 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#358 + def format(q); end + + # [LBrace] the left brace that is seen after the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#312 + def lbrace; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#315 + def statements; end +end + +# Else represents the end of an +if+, +unless+, or +case+ chain. +# +# if variable +# else +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#4792 +class SyntaxTree::Else < ::SyntaxTree::Node + # @return [Else] a new instance of Else + # + # source://syntax_tree//lib/syntax_tree/node.rb#4802 + def initialize(keyword:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4853 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4809 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4813 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4800 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4817 + def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4813 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4831 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4840 + def format(q); end + + # [Kw] the else keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#4794 + def keyword; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#4797 + def statements; end +end + +# Elsif represents another clause in an +if+ or +unless+ chain. +# +# if variable +# elsif other_variable +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#4865 +class SyntaxTree::Elsif < ::SyntaxTree::Node + # @return [Elsif] a new instance of Elsif + # + # source://syntax_tree//lib/syntax_tree/node.rb#4878 + def initialize(predicate:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4942 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4886 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4890 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4876 + def comments; end + + # [nil | Elsif | Else] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#4873 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4894 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4890 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4909 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4919 + def format(q); end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#4867 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#4870 + def statements; end +end + +# EmbDoc represents a multi-line comment. +# +# =begin +# first line +# second line +# =end +# +# source://syntax_tree//lib/syntax_tree/node.rb#4955 +class SyntaxTree::EmbDoc < ::SyntaxTree::Node + # @return [EmbDoc] a new instance of EmbDoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#4959 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5027 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4995 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4999 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4991 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5003 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4999 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5012 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5016 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4987 + def ignore?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4983 + def inline?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4967 + def leading!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4971 + def leading?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4975 + def trailing!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4979 + def trailing?; end + + # [String] the contents of the comment + # + # source://syntax_tree//lib/syntax_tree/node.rb#4957 + def value; end +end + +# EmbExprBeg represents the beginning token for using interpolation inside of +# a parent node that accepts string content (like a string or regular +# expression). +# +# "Hello, #{person}!" +# +# source://syntax_tree//lib/syntax_tree/node.rb#5038 +class SyntaxTree::EmbExprBeg < ::SyntaxTree::Node + # @return [EmbExprBeg] a new instance of EmbExprBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#5042 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5068 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5047 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5051 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5055 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5051 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5064 + def deconstruct_keys(_keys); end + + # [String] the #{ used in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#5040 + def value; end +end + +# EmbExprEnd represents the ending token for using interpolation inside of a +# parent node that accepts string content (like a string or regular +# expression). +# +# "Hello, #{person}!" +# +# source://syntax_tree//lib/syntax_tree/node.rb#5079 +class SyntaxTree::EmbExprEnd < ::SyntaxTree::Node + # @return [EmbExprEnd] a new instance of EmbExprEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#5083 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5109 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5088 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5092 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5096 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5092 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5105 + def deconstruct_keys(_keys); end + + # [String] the } used in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#5081 + def value; end +end + +# EmbVar represents the use of shorthand interpolation for an instance, class, +# or global variable into a parent node that accepts string content (like a +# string or regular expression). +# +# "#@variable" +# +# In the example above, an EmbVar node represents the # because it forces +# +# source://syntax_tree//lib/syntax_tree/node.rb#5122 +class SyntaxTree::EmbVar < ::SyntaxTree::Node + # @return [EmbVar] a new instance of EmbVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#5126 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5152 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5131 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5135 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5139 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5135 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5148 + def deconstruct_keys(_keys); end + + # [String] the # used in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#5124 + def value; end +end + +# EndContent represents the use of __END__ syntax, which allows individual +# scripts to keep content after the main ruby code that can be read through +# the DATA constant. +# +# puts DATA.read +# +# __END__ +# some other content that is not executed by the program +# +# source://syntax_tree//lib/syntax_tree/node.rb#386 +class SyntaxTree::EndContent < ::SyntaxTree::Node + # @return [EndContent] a new instance of EndContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#393 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#442 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#399 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#403 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#391 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#407 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#403 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#420 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#424 + def format(q); end + + # [String] the content after the script + # + # source://syntax_tree//lib/syntax_tree/node.rb#388 + def value; end +end + +# Ensure represents the use of the +ensure+ keyword and its subsequent +# statements. +# +# begin +# ensure +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#5164 +class SyntaxTree::Ensure < ::SyntaxTree::Node + # @return [Ensure] a new instance of Ensure + # + # source://syntax_tree//lib/syntax_tree/node.rb#5174 + def initialize(keyword:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5223 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5181 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5185 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5172 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5189 + def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5185 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5203 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5212 + def format(q); end + + # [Kw] the ensure keyword that began this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5166 + def keyword; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#5169 + def statements; end +end + +# ExcessedComma represents a trailing comma in a list of block parameters. It +# changes the block parameters such that they will destructure. +# +# [[1, 2, 3], [2, 3, 4]].each do |first, second,| +# end +# +# In the above example, an ExcessedComma node would appear in the third +# position of the Params node that is used to declare that block. The third +# position typically represents a rest-type parameter, but in this case is +# used to indicate that a trailing comma was used. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5239 +class SyntaxTree::ExcessedComma < ::SyntaxTree::Node + # @return [ExcessedComma] a new instance of ExcessedComma + # + # source://syntax_tree//lib/syntax_tree/node.rb#5246 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5281 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5252 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5256 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5244 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5260 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5256 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5273 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5277 + def format(q); end + + # [String] the comma + # + # source://syntax_tree//lib/syntax_tree/node.rb#5241 + def value; end +end + +# Field is always the child of an assignment. It represents assigning to a +# “field” on an object. +# +# object.variable = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#5291 +class SyntaxTree::Field < ::SyntaxTree::Node + # @return [Field] a new instance of Field + # + # source://syntax_tree//lib/syntax_tree/node.rb#5304 + def initialize(parent:, operator:, name:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5354 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5312 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5316 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5302 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5321 + def copy(parent: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5316 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5336 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5346 + def format(q); end + + # [Const | Ident] the name of the field being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#5299 + def name; end + + # [:"::" | Op | Period] the operator being used for the assignment + # + # source://syntax_tree//lib/syntax_tree/node.rb#5296 + def operator; end + + # [Node] the parent object that owns the field being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#5293 + def parent; end +end + +# This is the parent class of a lot of built-in visitors for Syntax Tree. It +# reflects visiting each of the fields on every node in turn. It itself does +# not do anything with these fields, it leaves that behavior up to the +# subclass to implement. +# +# In order to properly use this class, you will need to subclass it and +# implement #comments, #field, #list, #node, #pairs, and #text. Those are +# documented here. +# +# == comments(node) +# +# This accepts the node that is being visited and does something depending on +# the comments attached to the node. +# +# == field(name, value) +# +# This accepts the name of the field being visited as a string (like "value") +# and the actual value of that field. The value can be a subclass of Node or +# any other type that can be held within the tree. +# +# == list(name, values) +# +# This accepts the name of the field being visited as well as a list of +# values. This is used, for example, when visiting something like the body of +# a Statements node. +# +# == node(name, node) +# +# This is the parent serialization method for each node. It is called with the +# node itself, as well as the type of the node as a string. The type is an +# internally used value that usually resembles the name of the ripper event +# that generated the node. The method should yield to the given block which +# then calls through to visit each of the fields on the node. +# +# == text(name, value) +# +# This accepts the name of the field being visited as well as a string value +# representing the value of the field. +# +# == pairs(name, values) +# +# This accepts the name of the field being visited as well as a list of pairs +# that represent the value of the field. It is used only in a couple of +# circumstances, like when visiting the list of optional parameters defined on +# a method. +# +# source://syntax_tree//lib/syntax_tree/field_visitor.rb#50 +class SyntaxTree::FieldVisitor < ::SyntaxTree::BasicVisitor + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#163 + def visit_BEGIN(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#245 + def visit_CHAR(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#342 + def visit_END(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1018 + def visit___end__(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#68 + def visit_alias(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#52 + def visit_aref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#60 + def visit_aref_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#76 + def visit_arg_block(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#83 + def visit_arg_paren(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#90 + def visit_arg_star(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#97 + def visit_args(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#104 + def visit_args_forward(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#108 + def visit_array(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#115 + def visit_aryptn(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#125 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#133 + def visit_assoc(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#141 + def visit_assoc_splat(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#148 + def visit_backref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#152 + def visit_backtick(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#156 + def visit_bare_assoc_hash(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#170 + def visit_begin(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#177 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#186 + def visit_block(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#201 + def visit_block_var(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#194 + def visit_blockarg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#209 + def visit_bodystmt(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#219 + def visit_break(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#226 + def visit_call(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#236 + def visit_case(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#249 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#258 + def visit_comma(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#262 + def visit_command(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#271 + def visit_command_call(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#282 + def visit_comment(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#286 + def visit_const(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#290 + def visit_const_path_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#298 + def visit_const_path_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#306 + def visit_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#313 + def visit_cvar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#317 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#328 + def visit_defined(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#335 + def visit_dyna_symbol(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#349 + def visit_else(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#356 + def visit_elsif(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#365 + def visit_embdoc(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#369 + def visit_embexpr_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#373 + def visit_embexpr_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#377 + def visit_embvar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#381 + def visit_ensure(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#388 + def visit_excessed_comma(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#392 + def visit_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#401 + def visit_float(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#405 + def visit_fndptn(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#415 + def visit_for(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#424 + def visit_gvar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#428 + def visit_hash(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#435 + def visit_heredoc(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#442 + def visit_heredoc_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#446 + def visit_heredoc_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#450 + def visit_hshptn(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#459 + def visit_ident(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#463 + def visit_if(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#472 + def visit_if_op(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#481 + def visit_imaginary(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#485 + def visit_in(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#494 + def visit_int(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#498 + def visit_ivar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#502 + def visit_kw(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#506 + def visit_kwrest_param(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#513 + def visit_label(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#517 + def visit_label_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#521 + def visit_lambda(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#529 + def visit_lambda_var(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#537 + def visit_lbrace(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#541 + def visit_lbracket(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#545 + def visit_lparen(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#549 + def visit_massign(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#557 + def visit_method_add_block(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#565 + def visit_mlhs(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#572 + def visit_mlhs_paren(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#579 + def visit_module(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#587 + def visit_mrhs(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#594 + def visit_next(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#601 + def visit_not(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#608 + def visit_op(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#612 + def visit_opassign(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#621 + def visit_params(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#634 + def visit_paren(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#641 + def visit_period(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#645 + def visit_pinned_begin(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#652 + def visit_pinned_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#659 + def visit_program(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#666 + def visit_qsymbols(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#673 + def visit_qsymbols_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#677 + def visit_qwords(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#684 + def visit_qwords_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#688 + def visit_range(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#697 + def visit_rassign(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#706 + def visit_rational(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#710 + def visit_rbrace(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#714 + def visit_rbracket(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#718 + def visit_redo(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#722 + def visit_regexp_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#726 + def visit_regexp_content(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#730 + def visit_regexp_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#734 + def visit_regexp_literal(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#742 + def visit_rescue(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#751 + def visit_rescue_ex(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#759 + def visit_rescue_mod(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#767 + def visit_rest_param(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#774 + def visit_retry(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#778 + def visit_return(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#785 + def visit_rparen(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#789 + def visit_sclass(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#797 + def visit_statements(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#804 + def visit_string_concat(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#812 + def visit_string_content(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#816 + def visit_string_dvar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#823 + def visit_string_embexpr(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#830 + def visit_string_literal(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#837 + def visit_super(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#844 + def visit_symbeg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#848 + def visit_symbol_content(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#852 + def visit_symbol_literal(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#859 + def visit_symbols(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#866 + def visit_symbols_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#870 + def visit_tlambda(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#874 + def visit_tlambeg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#878 + def visit_top_const_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#885 + def visit_top_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#892 + def visit_tstring_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#896 + def visit_tstring_content(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#900 + def visit_tstring_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#904 + def visit_unary(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#912 + def visit_undef(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#919 + def visit_unless(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#928 + def visit_until(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#936 + def visit_var_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#943 + def visit_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#950 + def visit_vcall(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#957 + def visit_void_stmt(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#961 + def visit_when(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#970 + def visit_while(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#978 + def visit_word(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#985 + def visit_words(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#992 + def visit_words_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#996 + def visit_xstring(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1000 + def visit_xstring_literal(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1007 + def visit_yield(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1014 + def visit_zsuper(node); end + + private + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1025 + def visit_token(node, type); end +end + +# FloatLiteral represents a floating point number literal. +# +# 1.0 +# +# source://syntax_tree//lib/syntax_tree/node.rb#5364 +class SyntaxTree::FloatLiteral < ::SyntaxTree::Node + # @return [FloatLiteral] a new instance of FloatLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#5371 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5406 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5377 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5381 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5369 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5385 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5381 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5398 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5402 + def format(q); end + + # [String] the value of the floating point number literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#5366 + def value; end +end + +# Formats either a Break, Next, or Return node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2438 +class SyntaxTree::FlowControlFormatter + # @return [FlowControlFormatter] a new instance of FlowControlFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#2445 + def initialize(keyword, node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2450 + def format(q); end + + # [String] the keyword to print + # + # source://syntax_tree//lib/syntax_tree/node.rb#2440 + def keyword; end + + # [Break | Next | Return] the node being formatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#2443 + def node; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#2599 + def format_arguments(q, opening, closing); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2589 + def format_array_contents(q, array); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2609 + def skip_parens?(node); end +end + +# FndPtn represents matching against a pattern where you find a pattern in an +# array using the Ruby 3.0+ pattern matching syntax. +# +# case value +# in [*, 7, *] +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#5418 +class SyntaxTree::FndPtn < ::SyntaxTree::Node + # @return [FndPtn] a new instance of FndPtn + # + # source://syntax_tree//lib/syntax_tree/node.rb#5435 + def initialize(constant:, left:, values:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5504 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5444 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5448 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5433 + def comments; end + + # [nil | VarRef | ConstPathRef] the optional constant wrapper + # + # source://syntax_tree//lib/syntax_tree/node.rb#5420 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5452 + def copy(constant: T.unsafe(nil), left: T.unsafe(nil), values: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5448 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5468 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5479 + def format(q); end + + # [VarField] the splat on the left-hand side + # + # source://syntax_tree//lib/syntax_tree/node.rb#5423 + def left; end + + # [VarField] the splat on the right-hand side + # + # source://syntax_tree//lib/syntax_tree/node.rb#5430 + def right; end + + # [Array[ Node ]] the list of positional expressions in the pattern that + # are being matched + # + # source://syntax_tree//lib/syntax_tree/node.rb#5427 + def values; end +end + +# For represents using a +for+ loop. +# +# for value in list do +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#5516 +class SyntaxTree::For < ::SyntaxTree::Node + # @return [For] a new instance of For + # + # source://syntax_tree//lib/syntax_tree/node.rb#5530 + def initialize(index:, collection:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5590 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5538 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5542 + def child_nodes; end + + # [Node] the object being enumerated in the loop + # + # source://syntax_tree//lib/syntax_tree/node.rb#5522 + def collection; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5528 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5546 + def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5542 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5561 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5571 + def format(q); end + + # [MLHS | VarField] the variable declaration being used to + # pull values out of the object being enumerated + # + # source://syntax_tree//lib/syntax_tree/node.rb#5519 + def index; end + + # [Statements] the statements to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#5525 + def statements; end +end + +# A slightly enhanced PP that knows how to format recursively including +# comments. +# +# source://syntax_tree//lib/syntax_tree/formatter.rb#6 +class SyntaxTree::Formatter < ::PrettierPrint + # @return [Formatter] a new instance of Formatter + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#95 + def initialize(source, *args, options: T.unsafe(nil)); end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def disable_auto_ternary; end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def disable_auto_ternary?; end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#115 + def format(node, stackable: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#175 + def format_each(nodes); end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#179 + def grandparent; end + + # This is a simplified version of prettyprint's group. It doesn't provide + # any of the more advanced options because we don't need them and they take + # up expensive computation time. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#194 + def group; end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#183 + def parent; end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#187 + def parents; end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def quote; end + + # A similar version to the super, except that it calls back into the + # separator proc with the instance of `self`. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#208 + def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end + + # Returns the value of attribute source. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#83 + def source; end + + # Returns the value of attribute stack. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#83 + def stack; end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def target_ruby_version; end + + # This is a much simplified version of prettyprint's text. It avoids + # calculating width by pushing the string directly onto the target. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#224 + def text(string); end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def trailing_comma; end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def trailing_comma?; end + + class << self + # source://syntax_tree//lib/syntax_tree/formatter.rb#108 + def format(source, node, base_indentation = T.unsafe(nil)); end + end +end + +# source://syntax_tree//lib/syntax_tree/formatter.rb#80 +SyntaxTree::Formatter::COMMENT_PRIORITY = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/formatter.rb#81 +SyntaxTree::Formatter::HEREDOC_PRIORITY = T.let(T.unsafe(nil), Integer) + +# We want to minimize as much as possible the number of options that are +# available in syntax tree. For the most part, if users want non-default +# formatting, they should override the format methods on the specific nodes +# themselves. However, because of some history with prettier and the fact +# that folks have become entrenched in their ways, we decided to provide a +# small amount of configurability. +# +# source://syntax_tree//lib/syntax_tree/formatter.rb#23 +class SyntaxTree::Formatter::Options + # @return [Options] a new instance of Options + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#29 + def initialize(quote: T.unsafe(nil), trailing_comma: T.unsafe(nil), disable_auto_ternary: T.unsafe(nil), target_ruby_version: T.unsafe(nil)); end + + # Returns the value of attribute disable_auto_ternary. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#24 + def disable_auto_ternary; end + + # Returns the value of attribute quote. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#24 + def quote; end + + # Returns the value of attribute target_ruby_version. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#24 + def target_ruby_version; end + + # Returns the value of attribute trailing_comma. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#24 + def trailing_comma; end +end + +# Unfortunately, Gem::Version.new is not ractor-safe because it performs +# global caching using a class variable. This works around that by just +# setting the instance variables directly. +# +# source://syntax_tree//lib/syntax_tree/formatter.rb#10 +class SyntaxTree::Formatter::SemanticVersion < ::Gem::Version + # @return [SemanticVersion] a new instance of SemanticVersion + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#11 + def initialize(version); end +end + +# GVar represents a global variable literal. +# +# $variable +# +# source://syntax_tree//lib/syntax_tree/node.rb#5600 +class SyntaxTree::GVar < ::SyntaxTree::Node + # @return [GVar] a new instance of GVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#5607 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5642 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5613 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5617 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5605 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5621 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5617 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5634 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5638 + def format(q); end + + # [String] the name of the global variable + # + # source://syntax_tree//lib/syntax_tree/node.rb#5602 + def value; end +end + +# This holds references to objects that respond to both #parse and #format +# so that we can use them in the CLI. +# +# source://syntax_tree//lib/syntax_tree.rb#43 +SyntaxTree::HANDLERS = T.let(T.unsafe(nil), Hash) + +# This module is responsible for formatting the assocs contained within a +# hash or bare hash. It first determines if every key in the hash can use +# labels. If it can, it uses labels. Otherwise it uses hash rockets. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1728 +module SyntaxTree::HashKeyFormatter + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#1786 + def for(container); end + end +end + +# When formatting a single assoc node without the context of the parent +# hash, this formatter is used. It uses whatever is present in the node, +# because there is nothing to be consistent with. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1775 +class SyntaxTree::HashKeyFormatter::Identity + # source://syntax_tree//lib/syntax_tree/node.rb#1776 + def format_key(q, key); end +end + +# Formats the keys of a hash literal using labels. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1730 +class SyntaxTree::HashKeyFormatter::Labels + # source://syntax_tree//lib/syntax_tree/node.rb#1733 + def format_key(q, key); end +end + +# source://syntax_tree//lib/syntax_tree/node.rb#1731 +SyntaxTree::HashKeyFormatter::Labels::LABEL = T.let(T.unsafe(nil), Regexp) + +# Formats the keys of a hash literal using hash rockets. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1756 +class SyntaxTree::HashKeyFormatter::Rockets + # source://syntax_tree//lib/syntax_tree/node.rb#1757 + def format_key(q, key); end +end + +# HashLiteral represents a hash literal. +# +# { key => value } +# +# source://syntax_tree//lib/syntax_tree/node.rb#5651 +class SyntaxTree::HashLiteral < ::SyntaxTree::Node + # @return [HashLiteral] a new instance of HashLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#5687 + def initialize(lbrace:, assocs:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5728 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5694 + def accept(visitor); end + + # [Array[ Assoc | AssocSplat ]] the optional contents of the hash + # + # source://syntax_tree//lib/syntax_tree/node.rb#5682 + def assocs; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5698 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5685 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5702 + def copy(lbrace: T.unsafe(nil), assocs: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5698 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5716 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5720 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5733 + def format_key(q, key); end + + # [LBrace] the left brace that opens this hash + # + # source://syntax_tree//lib/syntax_tree/node.rb#5679 + def lbrace; end + + private + + # If we have an empty hash that contains only comments, then we're going + # to do some special printing to ensure they get indented correctly. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#5741 + def empty_with_comments?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5745 + def format_contents(q); end +end + +# This is a special formatter used if the hash literal contains no values +# but _does_ contain comments. In this case we do some special formatting to +# make sure the comments gets indented properly. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5655 +class SyntaxTree::HashLiteral::EmptyWithCommentsFormatter + # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#5659 + def initialize(lbrace); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5663 + def format(q); end + + # [LBrace] the opening brace + # + # source://syntax_tree//lib/syntax_tree/node.rb#5657 + def lbrace; end +end + +# Heredoc represents a heredoc string literal. +# +# <<~DOC +# contents +# DOC +# +# source://syntax_tree//lib/syntax_tree/node.rb#5774 +class SyntaxTree::Heredoc < ::SyntaxTree::Node + # @return [Heredoc] a new instance of Heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5791 + def initialize(beginning:, location:, ending: T.unsafe(nil), dedent: T.unsafe(nil), parts: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5873 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5800 + def accept(visitor); end + + # [HeredocBeg] the opening of the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5776 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5804 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5789 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5808 + def copy(beginning: T.unsafe(nil), location: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5804 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5823 + def deconstruct_keys(_keys); end + + # [Integer] how far to dedent the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5782 + def dedent; end + + # [HeredocEnd] the ending of the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5779 + def ending; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5838 + def format(q); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # heredoc string literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#5786 + def parts; end +end + +# This is a very specific behavior where you want to force a newline, but +# don't want to force the break parent. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5835 +SyntaxTree::Heredoc::SEPARATOR = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# HeredocBeg represents the beginning declaration of a heredoc. +# +# <<~DOC +# contents +# DOC +# +# In the example above the HeredocBeg node represents <<~DOC. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5886 +class SyntaxTree::HeredocBeg < ::SyntaxTree::Node + # @return [HeredocBeg] a new instance of HeredocBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#5893 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5928 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5899 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5903 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5891 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5907 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5903 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5920 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5924 + def format(q); end + + # [String] the opening declaration of the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5888 + def value; end +end + +# HeredocEnd represents the closing declaration of a heredoc. +# +# <<~DOC +# contents +# DOC +# +# In the example above the HeredocEnd node represents the closing DOC. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5940 +class SyntaxTree::HeredocEnd < ::SyntaxTree::Node + # @return [HeredocEnd] a new instance of HeredocEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#5947 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5982 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5953 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5957 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5945 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5961 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5957 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5974 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5978 + def format(q); end + + # [String] the closing declaration of the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5942 + def value; end +end + +# HshPtn represents matching against a hash pattern using the Ruby 2.7+ +# pattern matching syntax. +# +# case value +# in { key: } +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#5994 +class SyntaxTree::HshPtn < ::SyntaxTree::Node + # @return [HshPtn] a new instance of HshPtn + # + # source://syntax_tree//lib/syntax_tree/node.rb#6054 + def initialize(constant:, keywords:, keyword_rest:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6147 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6062 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6066 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6052 + def comments; end + + # [nil | VarRef | ConstPathRef] the optional constant wrapper + # + # source://syntax_tree//lib/syntax_tree/node.rb#6042 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6070 + def copy(constant: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6066 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6085 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6095 + def format(q); end + + # [nil | VarField] an optional parameter to gather up all remaining keywords + # + # source://syntax_tree//lib/syntax_tree/node.rb#6049 + def keyword_rest; end + + # [Array[ [DynaSymbol | Label, nil | Node] ]] the set of tuples + # representing the keywords that should be matched against in the pattern + # + # source://syntax_tree//lib/syntax_tree/node.rb#6046 + def keywords; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#6158 + def format_contents(q, parts, nested); end +end + +# Formats a key-value pair in a hash pattern. The value is optional. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5996 +class SyntaxTree::HshPtn::KeywordFormatter + # @return [KeywordFormatter] a new instance of KeywordFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#6003 + def initialize(key, value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6008 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6012 + def format(q); end + + # [Label] the keyword being used + # + # source://syntax_tree//lib/syntax_tree/node.rb#5998 + def key; end + + # [Node] the optional value for the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#6001 + def value; end +end + +# Formats the optional double-splat from the pattern. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6023 +class SyntaxTree::HshPtn::KeywordRestFormatter + # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#6027 + def initialize(keyword_rest); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6031 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6035 + def format(q); end + + # [VarField] the parameter that matches the remaining keywords + # + # source://syntax_tree//lib/syntax_tree/node.rb#6025 + def keyword_rest; end +end + +# IVar represents an instance variable literal. +# +# @variable +# +# source://syntax_tree//lib/syntax_tree/node.rb#6878 +class SyntaxTree::IVar < ::SyntaxTree::Node + # @return [IVar] a new instance of IVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#6885 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6920 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6891 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6895 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6883 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6899 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6895 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6912 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6916 + def format(q); end + + # [String] the name of the instance variable + # + # source://syntax_tree//lib/syntax_tree/node.rb#6880 + def value; end +end + +# Ident represents an identifier anywhere in code. It can represent a very +# large number of things, depending on where it is in the syntax tree. +# +# value +# +# source://syntax_tree//lib/syntax_tree/node.rb#6181 +class SyntaxTree::Ident < ::SyntaxTree::Node + # @return [Ident] a new instance of Ident + # + # source://syntax_tree//lib/syntax_tree/node.rb#6188 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6223 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6194 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6198 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6186 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6202 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6198 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6215 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6219 + def format(q); end + + # [String] the value of the identifier + # + # source://syntax_tree//lib/syntax_tree/node.rb#6183 + def value; end +end + +# If represents the first clause in an +if+ chain. +# +# if predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#6471 +class SyntaxTree::IfNode < ::SyntaxTree::Node + # @return [IfNode] a new instance of IfNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#6484 + def initialize(predicate:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6529 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6492 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6496 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6482 + def comments; end + + # [nil | Elsif | Else] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#6479 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6500 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6496 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6515 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6525 + def format(q); end + + # Checks if the node was originally found in the modifier form. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#6535 + def modifier?; end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#6473 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#6476 + def statements; end +end + +# IfOp represents a ternary clause. +# +# predicate ? truthy : falsy +# +# source://syntax_tree//lib/syntax_tree/node.rb#6544 +class SyntaxTree::IfOp < ::SyntaxTree::Node + # @return [IfOp] a new instance of IfOp + # + # source://syntax_tree//lib/syntax_tree/node.rb#6557 + def initialize(predicate:, truthy:, falsy:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6631 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6565 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6569 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6555 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6573 + def copy(predicate: T.unsafe(nil), truthy: T.unsafe(nil), falsy: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6569 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6588 + def deconstruct_keys(_keys); end + + # [Node] the expression to be executed if the predicate is falsy + # + # source://syntax_tree//lib/syntax_tree/node.rb#6552 + def falsy; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6598 + def format(q); end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#6546 + def predicate; end + + # [Node] the expression to be executed if the predicate is truthy + # + # source://syntax_tree//lib/syntax_tree/node.rb#6549 + def truthy; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#6638 + def format_break(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6661 + def format_flat(q); end +end + +# Imaginary represents an imaginary number literal. +# +# 1i +# +# source://syntax_tree//lib/syntax_tree/node.rb#6680 +class SyntaxTree::Imaginary < ::SyntaxTree::Node + # @return [Imaginary] a new instance of Imaginary + # + # source://syntax_tree//lib/syntax_tree/node.rb#6687 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6722 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6693 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6697 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6685 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6701 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6697 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6714 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6718 + def format(q); end + + # [String] the value of the imaginary number literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#6682 + def value; end +end + +# In represents using the +in+ keyword within the Ruby 2.7+ pattern matching +# syntax. +# +# case value +# in pattern +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#6734 +class SyntaxTree::In < ::SyntaxTree::Node + # @return [In] a new instance of In + # + # source://syntax_tree//lib/syntax_tree/node.rb#6747 + def initialize(pattern:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6812 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6755 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6759 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6745 + def comments; end + + # [nil | In | Else] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#6742 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6763 + def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6759 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6778 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6788 + def format(q); end + + # [Node] the pattern to check against + # + # source://syntax_tree//lib/syntax_tree/node.rb#6736 + def pattern; end + + # [Statements] the expressions to execute if the pattern matched + # + # source://syntax_tree//lib/syntax_tree/node.rb#6739 + def statements; end +end + +# This class can be used to build an index of the structure of Ruby files. We +# define an index as the list of constants and methods defined within a file. +# +# This index strives to be as fast as possible to better support tools like +# IDEs. Because of that, it has different backends depending on what +# functionality is available. +# +# source://syntax_tree//lib/syntax_tree/index.rb#10 +module SyntaxTree::Index + class << self + # This method accepts source code and then indexes it. + # + # source://syntax_tree//lib/syntax_tree/index.rb#674 + def index(source, backend: T.unsafe(nil)); end + + # This method accepts a filepath and then indexes it. + # + # source://syntax_tree//lib/syntax_tree/index.rb#679 + def index_file(filepath, backend: T.unsafe(nil)); end + end +end + +# This entry represents a method definition that was created using the alias +# keyword. +# +# source://syntax_tree//lib/syntax_tree/index.rb#85 +class SyntaxTree::Index::AliasMethodDefinition + # @return [AliasMethodDefinition] a new instance of AliasMethodDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#88 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#86 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#86 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#86 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#86 + def nesting; end +end + +# This entry represents a class definition using the class keyword. +# +# source://syntax_tree//lib/syntax_tree/index.rb#22 +class SyntaxTree::Index::ClassDefinition + # @return [ClassDefinition] a new instance of ClassDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#25 + def initialize(nesting, name, superclass, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def nesting; end + + # Returns the value of attribute superclass. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def superclass; end +end + +# This entry represents a constant assignment. +# +# source://syntax_tree//lib/syntax_tree/index.rb#35 +class SyntaxTree::Index::ConstantDefinition + # @return [ConstantDefinition] a new instance of ConstantDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#38 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#36 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#36 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#36 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#36 + def nesting; end +end + +# This class handles parsing comments from Ruby source code in the case that +# we use the instruction sequence backend. Because the instruction sequence +# backend doesn't provide comments (since they are dropped) we provide this +# interface to lazily parse them out. +# +# source://syntax_tree//lib/syntax_tree/index.rb#152 +class SyntaxTree::Index::EntryComments + include ::Enumerable + + # @return [EntryComments] a new instance of EntryComments + # + # source://syntax_tree//lib/syntax_tree/index.rb#156 + def initialize(file_comments, location); end + + # source://syntax_tree//lib/syntax_tree/index.rb#161 + def each(&block); end + + # Returns the value of attribute file_comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#154 + def file_comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#154 + def location; end +end + +# When you're using the instruction sequence backend, this class is used to +# lazily parse comments out of the source code. +# +# source://syntax_tree//lib/syntax_tree/index.rb#98 +class SyntaxTree::Index::FileComments + # @return [FileComments] a new instance of FileComments + # + # source://syntax_tree//lib/syntax_tree/index.rb#139 + def initialize(source); end + + # source://syntax_tree//lib/syntax_tree/index.rb#143 + def comments; end + + # Returns the value of attribute source. + # + # source://syntax_tree//lib/syntax_tree/index.rb#137 + def source; end +end + +# This represents the Ruby source in the form of a file. When it needs to +# be read we'll read the file. +# +# source://syntax_tree//lib/syntax_tree/index.rb#115 +class SyntaxTree::Index::FileComments::FileSource + # @return [FileSource] a new instance of FileSource + # + # source://syntax_tree//lib/syntax_tree/index.rb#118 + def initialize(filepath); end + + # Returns the value of attribute filepath. + # + # source://syntax_tree//lib/syntax_tree/index.rb#116 + def filepath; end + + # source://syntax_tree//lib/syntax_tree/index.rb#122 + def source; end +end + +# We use the ripper library to pull out source comments. +# +# source://syntax_tree//lib/syntax_tree/index.rb#100 +class SyntaxTree::Index::FileComments::Parser < ::Ripper + # @return [Parser] a new instance of Parser + # + # source://syntax_tree//lib/syntax_tree/index.rb#103 + def initialize(*_arg0); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#101 + def comments; end + + # source://syntax_tree//lib/syntax_tree/index.rb#108 + def on_comment(value); end +end + +# This represents the Ruby source in the form of a string. When it needs +# to be read the string is returned. +# +# source://syntax_tree//lib/syntax_tree/index.rb#129 +class SyntaxTree::Index::FileComments::StringSource + # @return [StringSource] a new instance of StringSource + # + # source://syntax_tree//lib/syntax_tree/index.rb#132 + def initialize(source); end + + # Returns the value of attribute source. + # + # source://syntax_tree//lib/syntax_tree/index.rb#130 + def source; end +end + +# The class defined here is used to perform the indexing, depending on what +# functionality is available from the runtime. +# +# source://syntax_tree//lib/syntax_tree/index.rb#670 +SyntaxTree::Index::INDEX_BACKEND = SyntaxTree::Index::ISeqBackend + +# This backend creates the index using RubyVM::InstructionSequence, which is +# faster than using the Syntax Tree parser, but is not available on all +# runtimes. +# +# source://syntax_tree//lib/syntax_tree/index.rb#177 +class SyntaxTree::Index::ISeqBackend + # source://syntax_tree//lib/syntax_tree/index.rb#184 + def index(source); end + + # source://syntax_tree//lib/syntax_tree/index.rb#191 + def index_file(filepath); end + + private + + # source://syntax_tree//lib/syntax_tree/index.rb#242 + def find_attr_arguments(insns, index); end + + # source://syntax_tree//lib/syntax_tree/index.rb#205 + def find_constant_path(insns, index); end + + # source://syntax_tree//lib/syntax_tree/index.rb#273 + def index_iseq(iseq, file_comments); end + + # source://syntax_tree//lib/syntax_tree/index.rb#200 + def location_for(iseq); end + + # source://syntax_tree//lib/syntax_tree/index.rb#258 + def method_definition(nesting, name, location, file_comments); end +end + +# source://syntax_tree//lib/syntax_tree/index.rb#182 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/index.rb#181 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_SCOPED = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/index.rb#178 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_CLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/index.rb#180 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_MODULE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/index.rb#179 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer) + +# This is a location for an index entry. +# +# source://syntax_tree//lib/syntax_tree/index.rb#12 +class SyntaxTree::Index::Location + # @return [Location] a new instance of Location + # + # source://syntax_tree//lib/syntax_tree/index.rb#15 + def initialize(line, column); end + + # Returns the value of attribute column. + # + # source://syntax_tree//lib/syntax_tree/index.rb#13 + def column; end + + # Returns the value of attribute line. + # + # source://syntax_tree//lib/syntax_tree/index.rb#13 + def line; end +end + +# This entry represents a method definition using the def keyword. +# +# source://syntax_tree//lib/syntax_tree/index.rb#59 +class SyntaxTree::Index::MethodDefinition + # @return [MethodDefinition] a new instance of MethodDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#62 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#60 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#60 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#60 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#60 + def nesting; end +end + +# This entry represents a module definition using the module keyword. +# +# source://syntax_tree//lib/syntax_tree/index.rb#47 +class SyntaxTree::Index::ModuleDefinition + # @return [ModuleDefinition] a new instance of ModuleDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#50 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#48 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#48 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#48 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#48 + def nesting; end +end + +# This backend creates the index using the Syntax Tree parser and a visitor. +# It is not as fast as using the instruction sequences directly, but is +# supported on all runtimes. +# +# source://syntax_tree//lib/syntax_tree/index.rb#452 +class SyntaxTree::Index::ParserBackend + # source://syntax_tree//lib/syntax_tree/index.rb#659 + def index(source); end + + # source://syntax_tree//lib/syntax_tree/index.rb#663 + def index_file(filepath); end +end + +# source://syntax_tree//lib/syntax_tree/index.rb#453 +class SyntaxTree::Index::ParserBackend::ConstantNameVisitor < ::SyntaxTree::Visitor + # source://syntax_tree//lib/syntax_tree/index.rb#458 + def visit_const_path_ref(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#454 + def visit_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#462 + def visit_var_ref(node); end +end + +# source://syntax_tree//lib/syntax_tree/index.rb#467 +class SyntaxTree::Index::ParserBackend::IndexVisitor < ::SyntaxTree::Visitor + # @return [IndexVisitor] a new instance of IndexVisitor + # + # source://syntax_tree//lib/syntax_tree/index.rb#470 + def initialize; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#468 + def nesting; end + + # Returns the value of attribute results. + # + # source://syntax_tree//lib/syntax_tree/index.rb#468 + def results; end + + # Returns the value of attribute statements. + # + # source://syntax_tree//lib/syntax_tree/index.rb#468 + def statements; end + + # source://syntax_tree//lib/syntax_tree/index.rb#477 + def visit_alias(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#496 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#515 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#547 + def visit_command(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#584 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#608 + def visit_module(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#626 + def visit_program(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#631 + def visit_statements(node); end + + private + + # source://syntax_tree//lib/syntax_tree/index.rb#639 + def comments_for(node); end +end + +# This entry represents a singleton method definition using the def keyword +# with a specified target. +# +# source://syntax_tree//lib/syntax_tree/index.rb#72 +class SyntaxTree::Index::SingletonMethodDefinition + # @return [SingletonMethodDefinition] a new instance of SingletonMethodDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#75 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#73 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#73 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#73 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#73 + def nesting; end +end + +# Int represents an integer number literal. +# +# 1 +# +# source://syntax_tree//lib/syntax_tree/node.rb#6822 +class SyntaxTree::Int < ::SyntaxTree::Node + # @return [Int] a new instance of Int + # + # source://syntax_tree//lib/syntax_tree/node.rb#6829 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6869 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6835 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6839 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6827 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6843 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6839 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6853 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6857 + def format(q); end + + # [String] the value of the integer + # + # source://syntax_tree//lib/syntax_tree/node.rb#6824 + def value; end +end + +# This visitor transforms the AST into a hash that contains only primitives +# that can be easily serialized into JSON. +# +# source://syntax_tree//lib/syntax_tree/json_visitor.rb#8 +class SyntaxTree::JSONVisitor < ::SyntaxTree::FieldVisitor + # @return [JSONVisitor] a new instance of JSONVisitor + # + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#11 + def initialize; end + + # Returns the value of attribute target. + # + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#9 + def target; end + + private + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#17 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#21 + def field(name, value); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#25 + def list(name, values); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#29 + def node(node, type); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#38 + def pairs(name, values); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#42 + def text(name, value); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#46 + def visit_location(location); end +end + +# Kw represents the use of a keyword. It can be almost anywhere in the syntax +# tree, so you end up seeing it quite a lot. +# +# if value +# end +# +# In the above example, there would be two Kw nodes: one for the if and one +# for the end. Note that anything that matches the list of keywords in Ruby +# will use a Kw, so if you use a keyword in a symbol literal for instance: +# +# :if +# +# then the contents of the symbol node will contain a Kw node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6938 +class SyntaxTree::Kw < ::SyntaxTree::Node + # @return [Kw] a new instance of Kw + # + # source://syntax_tree//lib/syntax_tree/node.rb#6948 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6981 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6955 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6959 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6946 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6963 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6959 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6973 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6977 + def format(q); end + + # [Symbol] the symbol version of the value + # + # source://syntax_tree//lib/syntax_tree/node.rb#6943 + def name; end + + # [String] the value of the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#6940 + def value; end +end + +# KwRestParam represents defining a parameter in a method definition that +# accepts all remaining keyword parameters. +# +# def method(**kwargs) end +# +# source://syntax_tree//lib/syntax_tree/node.rb#6991 +class SyntaxTree::KwRestParam < ::SyntaxTree::Node + # @return [KwRestParam] a new instance of KwRestParam + # + # source://syntax_tree//lib/syntax_tree/node.rb#6998 + def initialize(name:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7034 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7004 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7008 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6996 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7012 + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7008 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7025 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7029 + def format(q); end + + # [nil | Ident] the name of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#6993 + def name; end +end + +# LBrace represents the use of a left brace, i.e., {. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7316 +class SyntaxTree::LBrace < ::SyntaxTree::Node + # @return [LBrace] a new instance of LBrace + # + # source://syntax_tree//lib/syntax_tree/node.rb#7323 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7358 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7329 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7333 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7321 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7337 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7333 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7350 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7354 + def format(q); end + + # [String] the left brace + # + # source://syntax_tree//lib/syntax_tree/node.rb#7318 + def value; end + + class << self + # Because some nodes keep around a { token so that comments can be attached + # to it if they occur in the source, oftentimes an LBrace is a child of + # another node. This means it's required at initialization time. To make it + # easier to create LBrace nodes without any specific value, this method + # provides a default node. + # + # source://syntax_tree//lib/syntax_tree/node.rb#7367 + def default; end + end +end + +# LBracket represents the use of a left bracket, i.e., [. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7373 +class SyntaxTree::LBracket < ::SyntaxTree::Node + # @return [LBracket] a new instance of LBracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#7380 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7415 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7386 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7390 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7378 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7394 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7390 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7407 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7411 + def format(q); end + + # [String] the left bracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#7375 + def value; end + + class << self + # Because some nodes keep around a [ token so that comments can be attached + # to it if they occur in the source, oftentimes an LBracket is a child of + # another node. This means it's required at initialization time. To make it + # easier to create LBracket nodes without any specific value, this method + # provides a default node. + # + # source://syntax_tree//lib/syntax_tree/node.rb#7424 + def default; end + end +end + +# LParen represents the use of a left parenthesis, i.e., (. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7430 +class SyntaxTree::LParen < ::SyntaxTree::Node + # @return [LParen] a new instance of LParen + # + # source://syntax_tree//lib/syntax_tree/node.rb#7437 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7472 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7443 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7447 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7435 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7451 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7447 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7464 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7468 + def format(q); end + + # [String] the left parenthesis + # + # source://syntax_tree//lib/syntax_tree/node.rb#7432 + def value; end + + class << self + # Because some nodes keep around a ( token so that comments can be attached + # to it if they occur in the source, oftentimes an LParen is a child of + # another node. This means it's required at initialization time. To make it + # easier to create LParen nodes without any specific value, this method + # provides a default node. + # + # source://syntax_tree//lib/syntax_tree/node.rb#7481 + def default; end + end +end + +# Label represents the use of an identifier to associate with an object. You +# can find it in a hash key, as in: +# +# { key: value } +# +# In this case "key:" would be the body of the label. You can also find it in +# pattern matching, as in: +# +# case value +# in key: +# end +# +# In this case "key:" would be the body of the label. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7052 +class SyntaxTree::Label < ::SyntaxTree::Node + # @return [Label] a new instance of Label + # + # source://syntax_tree//lib/syntax_tree/node.rb#7059 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7094 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7065 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7069 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7057 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7073 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7069 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7086 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7090 + def format(q); end + + # [String] the value of the label + # + # source://syntax_tree//lib/syntax_tree/node.rb#7054 + def value; end +end + +# LabelEnd represents the end of a dynamic symbol. +# +# { "key": value } +# +# In the example above, LabelEnd represents the "\":" token at the end of the +# hash key. This node is important for determining the type of quote being +# used by the label. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7106 +class SyntaxTree::LabelEnd < ::SyntaxTree::Node + # @return [LabelEnd] a new instance of LabelEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#7110 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7136 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7115 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7119 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7123 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7119 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7132 + def deconstruct_keys(_keys); end + + # [String] the end of the label + # + # source://syntax_tree//lib/syntax_tree/node.rb#7108 + def value; end +end + +# Lambda represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# +# source://syntax_tree//lib/syntax_tree/node.rb#7145 +class SyntaxTree::Lambda < ::SyntaxTree::Node + # @return [Lambda] a new instance of Lambda + # + # source://syntax_tree//lib/syntax_tree/node.rb#7155 + def initialize(params:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7239 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7162 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7166 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7153 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7170 + def copy(params: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7166 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7184 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7193 + def format(q); end + + # [LambdaVar | Paren] the parameter declaration for this lambda + # + # source://syntax_tree//lib/syntax_tree/node.rb#7147 + def params; end + + # [BodyStmt | Statements] the expressions to be executed in this lambda + # + # source://syntax_tree//lib/syntax_tree/node.rb#7150 + def statements; end +end + +# LambdaVar represents the parameters being declared for a lambda. Effectively +# this node is everything contained within the parentheses. This includes all +# of the various parameter types, as well as block-local variable +# declarations. +# +# -> (positional, optional = value, keyword:, █ local) do +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#7253 +class SyntaxTree::LambdaVar < ::SyntaxTree::Node + # @return [LambdaVar] a new instance of LambdaVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#7263 + def initialize(params:, locals:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7309 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7270 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7274 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7261 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7278 + def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7274 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7292 + def deconstruct_keys(_keys); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#7296 + def empty?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7300 + def format(q); end + + # [Array[ Ident ]] the list of block-local variable declarations + # + # source://syntax_tree//lib/syntax_tree/node.rb#7258 + def locals; end + + # [Params] the parameters being declared with the block + # + # source://syntax_tree//lib/syntax_tree/node.rb#7255 + def params; end +end + +# Syntax Tree additionally ships with a language server conforming to the +# language server protocol. It can be invoked through the CLI by running: +# +# stree lsp +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#14 +class SyntaxTree::LanguageServer + # @return [LanguageServer] a new instance of LanguageServer + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#217 + def initialize(input: T.unsafe(nil), output: T.unsafe(nil), print_width: T.unsafe(nil)); end + + # Returns the value of attribute input. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#215 + def input; end + + # Returns the value of attribute output. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#215 + def output; end + + # Returns the value of attribute print_width. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#215 + def print_width; end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#228 + def run; end + + private + + # source://syntax_tree//lib/syntax_tree/language_server.rb#280 + def capabilities; end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#293 + def format(source, extension); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#317 + def inlay_hints(source); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#333 + def log(message); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#327 + def write(value); end +end + +# This class provides inlay hints for the language server. For more +# information, see the spec here: +# https://github.com/microsoft/language-server-protocol/issues/956. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#18 +class SyntaxTree::LanguageServer::InlayHints < ::SyntaxTree::Visitor + # @return [InlayHints] a new instance of InlayHints + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#43 + def initialize; end + + # Returns the value of attribute hints. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#41 + def hints; end + + # Returns the value of attribute stack. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#41 + def stack; end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#48 + def visit(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#67 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#81 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#102 + def visit_if_op(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#124 + def visit_rescue(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#145 + def visit_unary(node); end + + private + + # source://syntax_tree//lib/syntax_tree/language_server.rb#156 + def parentheses(location); end +end + +# This represents a hint that is going to be displayed in the editor. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#20 +class SyntaxTree::LanguageServer::InlayHints::Hint + # @return [Hint] a new instance of Hint + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#23 + def initialize(line:, character:, label:); end + + # Returns the value of attribute character. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#21 + def character; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#21 + def label; end + + # Returns the value of attribute line. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#21 + def line; end + + # This is the shape that the LSP expects. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#30 + def to_json(*opts); end +end + +# This is a small module that effectively mirrors pattern matching. We're +# using it so that we can support truffleruby without having to ignore the +# language server. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#174 +module SyntaxTree::LanguageServer::Request + class << self + # source://syntax_tree//lib/syntax_tree/language_server.rb#203 + def [](value); end + end +end + +# Represents a hash pattern. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#176 +class SyntaxTree::LanguageServer::Request::Shape + # @return [Shape] a new instance of Shape + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#179 + def initialize(values); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#183 + def ===(other); end + + # Returns the value of attribute values. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#177 + def values; end +end + +# Represents an array pattern. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#191 +class SyntaxTree::LanguageServer::Request::Tuple + # @return [Tuple] a new instance of Tuple + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#194 + def initialize(values); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#198 + def ===(other); end + + # Returns the value of attribute values. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#192 + def values; end +end + +# Represents the location of a node in the tree from the source code. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5 +class SyntaxTree::Location + # @return [Location] a new instance of Location + # + # source://syntax_tree//lib/syntax_tree/node.rb#13 + def initialize(start_line:, start_char:, start_column:, end_line:, end_char:, end_column:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#33 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#50 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#54 + def deconstruct_keys(_keys); end + + # Returns the value of attribute end_char. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def end_char; end + + # Returns the value of attribute end_column. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def end_column; end + + # Returns the value of attribute end_line. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def end_line; end + + # source://syntax_tree//lib/syntax_tree/node.rb#29 + def lines; end + + # Returns the value of attribute start_char. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def start_char; end + + # Returns the value of attribute start_column. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def start_column; end + + # Returns the value of attribute start_line. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def start_line; end + + # source://syntax_tree//lib/syntax_tree/node.rb#39 + def to(other); end + + class << self + # A convenience method that is typically used when you don't care about the + # location of a node, but need to create a Location instance to pass to a + # constructor. + # + # source://syntax_tree//lib/syntax_tree/node.rb#90 + def default; end + + # source://syntax_tree//lib/syntax_tree/node.rb#76 + def fixed(line:, char:, column:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#65 + def token(line:, char:, column:, size:); end + end +end + +# Formats an Until or While node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11378 +class SyntaxTree::LoopFormatter + # @return [LoopFormatter] a new instance of LoopFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#11385 + def initialize(keyword, node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11390 + def format(q); end + + # [String] the name of the keyword used for this loop + # + # source://syntax_tree//lib/syntax_tree/node.rb#11380 + def keyword; end + + # [Until | While] the node that is being formatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#11383 + def node; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#11437 + def format_break(q); end +end + +# MAssign is a parent node of any kind of multiple assignment. This includes +# splitting out variables on the left like: +# +# first, second, third = value +# +# as well as splitting out variables on the right, as in: +# +# value = first, second, third +# +# Both sides support splats, as well as variables following them. There's also +# destructuring behavior that you can achieve with the following: +# +# first, = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#7500 +class SyntaxTree::MAssign < ::SyntaxTree::Node + # @return [MAssign] a new instance of MAssign + # + # source://syntax_tree//lib/syntax_tree/node.rb#7510 + def initialize(target:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7554 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7517 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7521 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7508 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7525 + def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7521 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7539 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7543 + def format(q); end + + # [MLHS | MLHSParen] the target of the multiple assignment + # + # source://syntax_tree//lib/syntax_tree/node.rb#7502 + def target; end + + # [Node] the value being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#7505 + def value; end +end + +# MLHS represents a list of values being destructured on the left-hand side +# of a multiple assignment. +# +# first, second, third = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#7638 +class SyntaxTree::MLHS < ::SyntaxTree::Node + # @return [MLHS] a new instance of MLHS + # + # source://syntax_tree//lib/syntax_tree/node.rb#7655 + def initialize(parts:, location:, comma: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7693 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7662 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7666 + def child_nodes; end + + # [boolean] whether or not there is a trailing comma at the end of this + # list, which impacts destructuring. It's an attr_accessor so that while + # the syntax tree is being built it can be set by its parent node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7650 + def comma; end + + # [boolean] whether or not there is a trailing comma at the end of this + # list, which impacts destructuring. It's an attr_accessor so that while + # the syntax tree is being built it can be set by its parent node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7650 + def comma=(_arg0); end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7653 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7670 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil), comma: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7666 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7684 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7688 + def format(q); end + + # [ + # Array[ + # ARefField | ArgStar | ConstPathField | Field | Ident | MLHSParen | + # TopConstField | VarField + # ] + # ] the parts of the left-hand side of a multiple assignment + # + # source://syntax_tree//lib/syntax_tree/node.rb#7645 + def parts; end +end + +# MLHSParen represents parentheses being used to destruct values in a multiple +# assignment on the left hand side. +# +# (left, right) = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#7704 +class SyntaxTree::MLHSParen < ::SyntaxTree::Node + # @return [MLHSParen] a new instance of MLHSParen + # + # source://syntax_tree//lib/syntax_tree/node.rb#7716 + def initialize(contents:, location:, comma: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7769 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7723 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7727 + def child_nodes; end + + # [boolean] whether or not there is a trailing comma at the end of this + # list, which impacts destructuring. It's an attr_accessor so that while + # the syntax tree is being built it can be set by its parent node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7711 + def comma; end + + # [boolean] whether or not there is a trailing comma at the end of this + # list, which impacts destructuring. It's an attr_accessor so that while + # the syntax tree is being built it can be set by its parent node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7711 + def comma=(_arg0); end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7714 + def comments; end + + # [MLHS | MLHSParen] the contents inside of the parentheses + # + # source://syntax_tree//lib/syntax_tree/node.rb#7706 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7731 + def copy(contents: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7727 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7744 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7748 + def format(q); end +end + +# MRHS represents the values that are being assigned on the right-hand side of +# a multiple assignment. +# +# values = first, second, third +# +# source://syntax_tree//lib/syntax_tree/node.rb#7869 +class SyntaxTree::MRHS < ::SyntaxTree::Node + # @return [MRHS] a new instance of MRHS + # + # source://syntax_tree//lib/syntax_tree/node.rb#7876 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7911 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7882 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7886 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7874 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7890 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7886 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7903 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7907 + def format(q); end + + # [Array[Node]] the parts that are being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#7871 + def parts; end +end + +# This visitor transforms the AST into a Ruby pattern matching expression that +# would match correctly against the AST. +# +# source://syntax_tree//lib/syntax_tree/match_visitor.rb#6 +class SyntaxTree::MatchVisitor < ::SyntaxTree::FieldVisitor + # @return [MatchVisitor] a new instance of MatchVisitor + # + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#9 + def initialize(q); end + + # Returns the value of attribute q. + # + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#7 + def q; end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#13 + def visit(node); end + + private + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#30 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#44 + def field(name, value); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#52 + def list(name, values); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#65 + def node(node, _type); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#86 + def pairs(name, values); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#112 + def text(name, value); end +end + +# This module is responsible for rendering mermaid (https://mermaid.js.org/) +# flow charts. +# +# source://syntax_tree//lib/syntax_tree/mermaid.rb#9 +module SyntaxTree::Mermaid + class << self + # Escape a label to be used in the mermaid syntax. This is used to escape + # HTML entities such that they render properly within the quotes. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#158 + def escape(label); end + + # Create a new flowchart. If a block is given, it will be yielded to and + # the flowchart will be rendered. Otherwise, the flowchart will be + # returned. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#165 + def flowchart; end + end +end + +# This is the main class that handles rendering a flowchart. It keeps track +# of its nodes and links and renders them according to the mermaid syntax. +# +# source://syntax_tree//lib/syntax_tree/mermaid.rb#12 +class SyntaxTree::Mermaid::FlowChart + # @return [FlowChart] a new instance of FlowChart + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#15 + def initialize; end + + # Retrieve a node that has already been added to the flowchart by its id. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#25 + def fetch(id); end + + # Add a link to the flowchart between two nodes with an optional label. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#30 + def link(from, to, label = T.unsafe(nil), type: T.unsafe(nil), color: T.unsafe(nil)); end + + # Returns the value of attribute links. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 + def links; end + + # Add a node to the flowchart with an optional label. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#39 + def node(id, label = T.unsafe(nil), shape: T.unsafe(nil)); end + + # Returns the value of attribute nodes. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 + def nodes; end + + # Returns the value of attribute output. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 + def output; end + + # Returns the value of attribute prefix. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 + def prefix; end + + # Return the rendered flowchart. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#64 + def render; end + + # Add a subgraph to the flowchart. Within the given block, all of the + # nodes will be rendered within the subgraph. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#49 + def subgraph(label); end +end + +# This class represents a link between two nodes in a flowchart. It is not +# meant to be interacted with directly, but rather used as a data structure +# by the FlowChart class. +# +# source://syntax_tree//lib/syntax_tree/mermaid.rb#78 +class SyntaxTree::Mermaid::Link + # @return [Link] a new instance of Link + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#84 + def initialize(from, to, label, type, color); end + + # Returns the value of attribute color. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def color; end + + # Returns the value of attribute from. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def from; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def label; end + + # source://syntax_tree//lib/syntax_tree/mermaid.rb#95 + def render; end + + # Returns the value of attribute to. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def to; end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def type; end + + private + + # source://syntax_tree//lib/syntax_tree/mermaid.rb#108 + def sides; end +end + +# source://syntax_tree//lib/syntax_tree/mermaid.rb#80 +SyntaxTree::Mermaid::Link::COLORS = T.let(T.unsafe(nil), Array) + +# source://syntax_tree//lib/syntax_tree/mermaid.rb#79 +SyntaxTree::Mermaid::Link::TYPES = T.let(T.unsafe(nil), Array) + +# This class represents a node in a flowchart. Unlike the Link class, it can +# be used directly. It is the return value of the #node method, and is meant +# to be passed around to #link methods to create links between nodes. +# +# source://syntax_tree//lib/syntax_tree/mermaid.rb#121 +class SyntaxTree::Mermaid::Node + # @return [Node] a new instance of Node + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#126 + def initialize(id, label, shape); end + + # Returns the value of attribute id. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 + def id; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 + def label; end + + # source://syntax_tree//lib/syntax_tree/mermaid.rb#134 + def render; end + + # Returns the value of attribute shape. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 + def shape; end + + private + + # source://syntax_tree//lib/syntax_tree/mermaid.rb#141 + def bounds; end +end + +# source://syntax_tree//lib/syntax_tree/mermaid.rb#122 +SyntaxTree::Mermaid::Node::SHAPES = T.let(T.unsafe(nil), Array) + +# This visitor transforms the AST into a mermaid flow chart. +# +# source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#5 +class SyntaxTree::MermaidVisitor < ::SyntaxTree::FieldVisitor + # @return [MermaidVisitor] a new instance of MermaidVisitor + # + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#8 + def initialize; end + + # Returns the value of attribute flowchart. + # + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6 + def flowchart; end + + # Returns the value of attribute target. + # + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6 + def target; end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#13 + def visit_program(node); end + + private + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#20 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#24 + def field(name, value); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#37 + def list(name, values); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#43 + def node(node, type); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#55 + def pairs(name, values); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#65 + def text(name, value); end +end + +# MethodAddBlock represents a method call with a block argument. +# +# method {} +# +# source://syntax_tree//lib/syntax_tree/node.rb#7563 +class SyntaxTree::MethodAddBlock < ::SyntaxTree::Node + # @return [MethodAddBlock] a new instance of MethodAddBlock + # + # source://syntax_tree//lib/syntax_tree/node.rb#7573 + def initialize(call:, block:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7622 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7580 + def accept(visitor); end + + # [BlockNode] the block being sent with the method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#7568 + def block; end + + # [ARef | CallNode | Command | CommandCall | Super | ZSuper] the method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#7565 + def call; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7584 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7571 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7588 + def copy(call: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7584 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7602 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7606 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7627 + def format_contents(q); end +end + +# ModuleDeclaration represents defining a module using the +module+ keyword. +# +# module Namespace +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#7779 +class SyntaxTree::ModuleDeclaration < ::SyntaxTree::Node + # @return [ModuleDeclaration] a new instance of ModuleDeclaration + # + # source://syntax_tree//lib/syntax_tree/node.rb#7789 + def initialize(constant:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7849 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7796 + def accept(visitor); end + + # [BodyStmt] the expressions to be executed in the context of the module + # + # source://syntax_tree//lib/syntax_tree/node.rb#7784 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7800 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7787 + def comments; end + + # [ConstPathRef | ConstRef | TopConstRef] the name of the module + # + # source://syntax_tree//lib/syntax_tree/node.rb#7781 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7804 + def copy(constant: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7800 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7818 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7827 + def format(q); end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#7856 + def format_declaration(q); end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for mutating the tree before it is formatted. +# +# source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#6 +class SyntaxTree::MutationVisitor < ::SyntaxTree::BasicVisitor + # @return [MutationVisitor] a new instance of MutationVisitor + # + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#9 + def initialize; end + + # Create a new mutation based on the given query that will mutate the node + # using the given block. The block should return a new node that will take + # the place of the given node in the tree. These blocks frequently make use + # of the `copy` method on nodes to create a new node with the same + # properties as the original node. + # + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#18 + def mutate(query, &block); end + + # Returns the value of attribute mutations. + # + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#7 + def mutations; end + + # This is the base visit method for each node in the tree. It first creates + # a copy of the node using the visit_* methods defined below. Then it checks + # each mutation in sequence and calls it if it finds a match. + # + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#25 + def visit(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#38 + def visit_BEGIN(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#46 + def visit_CHAR(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#51 + def visit_END(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#59 + def visit___end__(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#64 + def visit_alias(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#69 + def visit_aref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#74 + def visit_aref_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#89 + def visit_arg_block(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#79 + def visit_arg_paren(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#94 + def visit_arg_star(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#84 + def visit_args(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#99 + def visit_args_forward(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#104 + def visit_array(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#112 + def visit_aryptn(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#122 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#127 + def visit_assoc(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#132 + def visit_assoc_splat(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#137 + def visit_backref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#142 + def visit_backtick(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#147 + def visit_bare_assoc_hash(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#152 + def visit_begin(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#162 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#295 + def visit_block(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#167 + def visit_block_var(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#172 + def visit_blockarg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#177 + def visit_bodystmt(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#187 + def visit_break(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#192 + def visit_call(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#202 + def visit_case(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#216 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#225 + def visit_comma(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#230 + def visit_command(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#239 + def visit_command_call(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#249 + def visit_comment(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#254 + def visit_const(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#259 + def visit_const_path_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#264 + def visit_const_path_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#269 + def visit_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#274 + def visit_cvar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#279 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#290 + def visit_defined(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#313 + def visit_dyna_symbol(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#318 + def visit_else(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#326 + def visit_elsif(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#334 + def visit_embdoc(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#339 + def visit_embexpr_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#344 + def visit_embexpr_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#349 + def visit_embvar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#354 + def visit_ensure(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#362 + def visit_excessed_comma(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#367 + def visit_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#375 + def visit_float(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#380 + def visit_fndptn(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#390 + def visit_for(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#395 + def visit_gvar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#400 + def visit_hash(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#405 + def visit_heredoc(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#414 + def visit_heredoc_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#419 + def visit_heredoc_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#424 + def visit_hshptn(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#434 + def visit_ident(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#439 + def visit_if(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#448 + def visit_if_op(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#453 + def visit_imaginary(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#458 + def visit_in(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#466 + def visit_int(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#471 + def visit_ivar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#476 + def visit_kw(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#481 + def visit_kwrest_param(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#486 + def visit_label(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#491 + def visit_label_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#496 + def visit_lambda(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#504 + def visit_lambda_var(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#509 + def visit_lbrace(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#514 + def visit_lbracket(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#519 + def visit_lparen(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#524 + def visit_massign(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#529 + def visit_method_add_block(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#534 + def visit_mlhs(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#539 + def visit_mlhs_paren(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#544 + def visit_module(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#552 + def visit_mrhs(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#557 + def visit_next(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#812 + def visit_not(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#562 + def visit_op(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#567 + def visit_opassign(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#572 + def visit_params(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#588 + def visit_paren(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#593 + def visit_period(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#157 + def visit_pinned_begin(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#854 + def visit_pinned_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#598 + def visit_program(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#603 + def visit_qsymbols(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#611 + def visit_qsymbols_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#616 + def visit_qwords(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#624 + def visit_qwords_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#304 + def visit_range(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#211 + def visit_rassign(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#629 + def visit_rational(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#634 + def visit_rbrace(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#639 + def visit_rbracket(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#644 + def visit_redo(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#654 + def visit_regexp_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#649 + def visit_regexp_content(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#659 + def visit_regexp_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#664 + def visit_regexp_literal(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#674 + def visit_rescue(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#669 + def visit_rescue_ex(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#684 + def visit_rescue_mod(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#689 + def visit_rest_param(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#694 + def visit_retry(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#699 + def visit_return(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#704 + def visit_rparen(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#709 + def visit_sclass(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#714 + def visit_statements(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#724 + def visit_string_concat(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#719 + def visit_string_content(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#729 + def visit_string_dvar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#734 + def visit_string_embexpr(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#739 + def visit_string_literal(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#744 + def visit_super(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#749 + def visit_symbeg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#754 + def visit_symbol_content(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#759 + def visit_symbol_literal(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#764 + def visit_symbols(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#772 + def visit_symbols_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#777 + def visit_tlambda(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#782 + def visit_tlambeg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#787 + def visit_top_const_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#792 + def visit_top_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#797 + def visit_tstring_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#802 + def visit_tstring_content(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#807 + def visit_tstring_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#817 + def visit_unary(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#822 + def visit_undef(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#827 + def visit_unless(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#836 + def visit_until(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#844 + def visit_var_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#849 + def visit_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#859 + def visit_vcall(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#864 + def visit_void_stmt(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#869 + def visit_when(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#878 + def visit_while(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#886 + def visit_word(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#891 + def visit_words(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#899 + def visit_words_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#904 + def visit_xstring(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#909 + def visit_xstring_literal(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#914 + def visit_yield(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#919 + def visit_zsuper(node); end +end + +# Next represents using the +next+ keyword. +# +# next +# +# The +next+ keyword can also optionally be called with an argument: +# +# next value +# +# +next+ can even be called with multiple arguments, but only if parentheses +# are omitted, as in: +# +# next first, second, third +# +# If a single value is being given, parentheses can be used, as in: +# +# next(value) +# +# source://syntax_tree//lib/syntax_tree/node.rb#7933 +class SyntaxTree::Next < ::SyntaxTree::Node + # @return [Next] a new instance of Next + # + # source://syntax_tree//lib/syntax_tree/node.rb#7940 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7975 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7946 + def accept(visitor); end + + # [Args] the arguments passed to the next keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#7935 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7950 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7938 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7954 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7950 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7967 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7971 + def format(q); end +end + +# This is the parent node of all of the syntax tree nodes. It's pretty much +# exclusively here to make it easier to operate with the tree in cases where +# you're trying to monkey-patch or strictly type. +# +# source://syntax_tree//lib/syntax_tree/node.rb#105 +class SyntaxTree::Node + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#109 + def accept(visitor); end + + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#113 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#149 + def construct_keys; end + + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#117 + def deconstruct; end + + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#121 + def deconstruct_keys(keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#133 + def end_char; end + + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#125 + def format(q); end + + # [Location] the location of this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#107 + def location; end + + # source://syntax_tree//lib/syntax_tree/node.rb#137 + def pretty_print(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#129 + def start_char; end + + # source://syntax_tree//lib/syntax_tree/node.rb#141 + def to_json(*opts); end + + # source://syntax_tree//lib/syntax_tree/node.rb#145 + def to_mermaid; end +end + +# Not represents the unary +not+ method being called on an expression. +# +# not value +# +# source://syntax_tree//lib/syntax_tree/node.rb#11077 +class SyntaxTree::Not < ::SyntaxTree::Node + # @return [Not] a new instance of Not + # + # source://syntax_tree//lib/syntax_tree/node.rb#11088 + def initialize(statement:, parentheses:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11150 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11095 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11099 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11086 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11103 + def copy(statement: T.unsafe(nil), parentheses: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11099 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11117 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11126 + def format(q); end + + # [boolean] whether or not parentheses were used + # + # source://syntax_tree//lib/syntax_tree/node.rb#11082 + def parentheses; end + + # [boolean] whether or not parentheses were used + # + # source://syntax_tree//lib/syntax_tree/node.rb#11082 + def parentheses?; end + + # [nil | Node] the statement on which to operate + # + # source://syntax_tree//lib/syntax_tree/node.rb#11079 + def statement; end +end + +# Op represents an operator literal in the source. +# +# 1 + 2 +# +# In the example above, the Op node represents the + operator. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7985 +class SyntaxTree::Op < ::SyntaxTree::Node + # @return [Op] a new instance of Op + # + # source://syntax_tree//lib/syntax_tree/node.rb#7995 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8028 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8002 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8006 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7993 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8010 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8006 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8020 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8024 + def format(q); end + + # [Symbol] the symbol version of the value + # + # source://syntax_tree//lib/syntax_tree/node.rb#7990 + def name; end + + # [String] the operator + # + # source://syntax_tree//lib/syntax_tree/node.rb#7987 + def value; end +end + +# OpAssign represents assigning a value to a variable or constant using an +# operator like += or ||=. +# +# variable += value +# +# source://syntax_tree//lib/syntax_tree/node.rb#8038 +class SyntaxTree::OpAssign < ::SyntaxTree::Node + # @return [OpAssign] a new instance of OpAssign + # + # source://syntax_tree//lib/syntax_tree/node.rb#8052 + def initialize(target:, operator:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8111 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8060 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8064 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8050 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8068 + def copy(target: T.unsafe(nil), operator: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8064 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8083 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8093 + def format(q); end + + # [Op] the operator being used for the assignment + # + # source://syntax_tree//lib/syntax_tree/node.rb#8044 + def operator; end + + # [ARefField | ConstPathField | Field | TopConstField | VarField] the target + # to assign the result of the expression to + # + # source://syntax_tree//lib/syntax_tree/node.rb#8041 + def target; end + + # [Node] the expression to be assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#8047 + def value; end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#8118 + def skip_indent?; end +end + +# The list of nodes that represent patterns inside of pattern matching so that +# when a pattern is being printed it knows if it's nested. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6174 +SyntaxTree::PATTERNS = T.let(T.unsafe(nil), Array) + +# Params represents defining parameters on a method or lambda. +# +# def method(param) end +# +# source://syntax_tree//lib/syntax_tree/node.rb#8196 +class SyntaxTree::Params < ::SyntaxTree::Node + # @return [Params] a new instance of Params + # + # source://syntax_tree//lib/syntax_tree/node.rb#8298 + def initialize(location:, requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8428 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8328 + def accept(visitor); end + + # Returns a range representing the possible number of arguments accepted + # by this params node not including the block. For example: + # + # def foo(a, b = 1, c:, d: 2, &block) + # ... + # end + # + # has arity 2..4. + # + # source://syntax_tree//lib/syntax_tree/node.rb#8451 + def arity; end + + # [nil | BlockArg] the optional block parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8293 + def block; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8332 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8296 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8346 + def copy(location: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8332 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8374 + def deconstruct_keys(_keys); end + + # Params nodes are the most complicated in the tree. Occasionally you want + # to know if they are "empty", which means not having any parameters + # declared. This logic accesses every kind of parameter and determines if + # it's missing. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#8323 + def empty?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8388 + def format(q); end + + # [nil | :nil | ArgsForward | KwRestParam] the optional keyword rest + # parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8290 + def keyword_rest; end + + # [Array[ [ Label, nil | Node ] ]] any keyword parameters and their + # optional default values + # + # source://syntax_tree//lib/syntax_tree/node.rb#8286 + def keywords; end + + # [Array[ [ Ident, Node ] ]] any optional parameters and their default + # values + # + # source://syntax_tree//lib/syntax_tree/node.rb#8274 + def optionals; end + + # [Array[ Ident | MLHSParen ]] any positional parameters that exist after a + # rest parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8282 + def posts; end + + # [Array[ Ident | MLHSParen ]] any required parameters + # + # source://syntax_tree//lib/syntax_tree/node.rb#8270 + def requireds; end + + # [nil | ArgsForward | ExcessedComma | RestParam] the optional rest + # parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8278 + def rest; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#8467 + def format_contents(q, parts); end +end + +# Formats the keyword position of the parameters. This includes the label, +# as well as an optional default value. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8224 +class SyntaxTree::Params::KeywordFormatter + # @return [KeywordFormatter] a new instance of KeywordFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8231 + def initialize(name, value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8236 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8240 + def format(q); end + + # [Ident] the name of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8226 + def name; end + + # [nil | Node] the value of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8229 + def value; end +end + +# Formats the keyword_rest position of the parameters. This can be the **nil +# syntax, the ... syntax, or the ** syntax. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8252 +class SyntaxTree::Params::KeywordRestFormatter + # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8256 + def initialize(value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8260 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8264 + def format(q); end + + # [:nil | ArgsForward | KwRestParam] the value of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8254 + def value; end +end + +# Formats the optional position of the parameters. This includes the label, +# as well as the default value. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8199 +class SyntaxTree::Params::OptionalFormatter + # @return [OptionalFormatter] a new instance of OptionalFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8206 + def initialize(name, value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8211 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8215 + def format(q); end + + # [Ident] the name of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8201 + def name; end + + # [Node] the value of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8204 + def value; end +end + +# Paren represents using balanced parentheses in a couple places in a Ruby +# program. In general parentheses can be used anywhere a Ruby expression can +# be used. +# +# (1 + 2) +# +# source://syntax_tree//lib/syntax_tree/node.rb#8479 +class SyntaxTree::Paren < ::SyntaxTree::Node + # @return [Paren] a new instance of Paren + # + # source://syntax_tree//lib/syntax_tree/node.rb#8489 + def initialize(lparen:, contents:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8545 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8496 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8500 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8487 + def comments; end + + # [nil | Node] the expression inside the parentheses + # + # source://syntax_tree//lib/syntax_tree/node.rb#8484 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8504 + def copy(lparen: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8500 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8518 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8527 + def format(q); end + + # [LParen] the left parenthesis that opened this statement + # + # source://syntax_tree//lib/syntax_tree/node.rb#8481 + def lparen; end +end + +# If you have a modifier statement (for instance a modifier if statement or a +# modifier while loop) there are times when you need to wrap the entire +# statement in parentheses. This occurs when you have something like: +# +# foo[:foo] = +# if bar? +# baz +# end +# +# Normally we would shorten this to an inline version, which would result in: +# +# foo[:foo] = baz if bar? +# +# but this actually has different semantic meaning. The first example will +# result in a nil being inserted into the hash for the :foo key, whereas the +# second example will result in an empty hash because the if statement applies +# to the entire assignment. +# +# We can fix this in a couple of ways. We can use the then keyword, as in: +# +# foo[:foo] = if bar? then baz end +# +# But this isn't used very often. We can also just leave it as is with the +# multi-line version, but for a short predicate and short value it looks +# verbose. The last option and the one used here is to add parentheses on +# both sides of the expression, as in: +# +# foo[:foo] = (baz if bar?) +# +# This approach maintains the nice conciseness of the inline version, while +# keeping the correct semantic meaning. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8155 +module SyntaxTree::Parentheses + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#8175 + def break(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8167 + def flat(q); end + end +end + +# source://syntax_tree//lib/syntax_tree/node.rb#8156 +SyntaxTree::Parentheses::NODES = T.let(T.unsafe(nil), Array) + +# Parser is a subclass of the Ripper library that subscribes to the stream of +# tokens and nodes coming from the parser and builds up a syntax tree. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#6 +class SyntaxTree::Parser < ::Ripper + # @return [Parser] a new instance of Parser + # + # source://syntax_tree//lib/syntax_tree/parser.rb#116 + def initialize(source, *_arg1); end + + # [Array[ Comment | EmbDoc ]] the list of comments that have been found + # while parsing the source. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#114 + def comments; end + + # [Array[ SingleByteString | MultiByteString ]] the list of objects that + # represent the start of each line in character offsets + # + # source://syntax_tree//lib/syntax_tree/parser.rb#105 + def line_counts; end + + # [String] the source being parsed + # + # source://syntax_tree//lib/syntax_tree/parser.rb#101 + def source; end + + # [Array[ untyped ]] a running list of tokens that have been found in the + # source. This list changes a lot as certain nodes will "consume" these + # tokens to determine their bounds. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#110 + def tokens; end + + private + + # Attaches comments to the nodes in the tree that most closely correspond to + # the location of the comments. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2911 + def attach_comments(program, comments); end + + # This represents the current place in the source string that we've gotten + # to so far. We have a memoized line_counts object that we can use to get + # the number of characters that we've had to go through to get to the + # beginning of this line, then we add the number of columns into this line + # that we've gone through. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#197 + def char_pos; end + + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#295 + def consume_error(name, location); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#312 + def consume_keyword(name); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#318 + def consume_operator(name); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#300 + def consume_token(type); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#306 + def consume_tstring_end(location); end + + # This represents the current column we're in relative to the beginning of + # the current line. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#203 + def current_column; end + + # A helper function to find a :: operator. We do special handling instead of + # using find_token here because we don't pop off all of the :: operators so + # you could end up getting the wrong information if you have for instance + # ::X::Y::Z. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#328 + def find_colon2_before(const); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#272 + def find_keyword(name); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#277 + def find_keyword_between(name, left, right); end + + # Finds the next position in the source string that begins a statement. This + # is used to bind statements lists and make sure they don't include a + # preceding comment. For example, we want the following comment to be + # attached to the class node and not the statement node: + # + # ... + # end + # + # By finding the next non-space character, we can make sure that the bounds + # of the statement list are correct. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#349 + def find_next_statement_start(position); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#290 + def find_operator(name); end + + # As we build up a list of tokens, we'll periodically need to go backwards + # and find the ones that we've already hit in order to determine the + # location information for nodes that use them. For example, if you have a + # module node then you'll look backward for a kw token to determine your + # start location. + # + # This works with nesting since we're deleting tokens from the list once + # they've been used up. For example if you had nested module declarations + # then the innermost declaration would grab the last kw node that matches + # "module" (which would happen to be the innermost keyword). Then the outer + # one would only be able to grab the first one. In this way all of the + # tokens act as their own stack. + # + # If we're expecting to be able to find a token and consume it, but can't + # actually find it, then we need to raise an error. This is _usually_ caused + # by a syntax error in the source that we're printing. It could also be + # caused by accidentally attempting to consume a token twice by two + # different parser event handlers. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#254 + def find_token(type); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#259 + def find_token_between(type, left, right); end + + # Returns the current location that is being looked at for the parser for + # the purpose of locating the error. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#210 + def find_token_error(location); end + + # Ripper doesn't support capturing lambda local variables until 3.2. To + # mitigate this, we have to parse that code for ourselves. We use the range + # from the parentheses to find where we _should_ be looking. Then we check + # if the resulting tokens match a pattern that we determine means that the + # declaration has block-local variables. Once it does, we parse those out + # and convert them into Ident nodes. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2362 + def lambda_locals(source); end + + # Responsible for finding the nearest nodes to the given comment within the + # context of the given encapsulating node. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2946 + def nearest_nodes(node, comment); end + + # :call-seq: + # on_BEGIN: (Statements statements) -> BEGINBlock + # + # source://syntax_tree//lib/syntax_tree/parser.rb#371 + def on_BEGIN(statements); end + + # :call-seq: + # on_CHAR: (String value) -> CHAR + # + # source://syntax_tree//lib/syntax_tree/parser.rb#395 + def on_CHAR(value); end + + # :call-seq: + # on_END: (Statements statements) -> ENDBlock + # + # source://syntax_tree//lib/syntax_tree/parser.rb#410 + def on_END(statements); end + + # :call-seq: + # on___end__: (String value) -> EndContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#434 + def on___end__(value); end + + # :call-seq: + # on_alias: ( + # (DynaSymbol | SymbolLiteral) left, + # (DynaSymbol | SymbolLiteral) right + # ) -> AliasNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#453 + def on_alias(left, right); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_alias_error(error, *_arg1); end + + # :call-seq: + # on_aref: (untyped collection, (nil | Args) index) -> ARef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#465 + def on_aref(collection, index); end + + # :call-seq: + # on_aref_field: ( + # untyped collection, + # (nil | Args) index + # ) -> ARefField + # + # source://syntax_tree//lib/syntax_tree/parser.rb#481 + def on_aref_field(collection, index); end + + # :call-seq: + # on_arg_paren: ( + # (nil | Args | ArgsForward) arguments + # ) -> ArgParen + # + # source://syntax_tree//lib/syntax_tree/parser.rb#500 + def on_arg_paren(arguments); end + + # :call-seq: + # on_args_add: (Args arguments, untyped argument) -> Args + # + # source://syntax_tree//lib/syntax_tree/parser.rb#522 + def on_args_add(arguments, argument); end + + # :call-seq: + # on_args_add_block: ( + # Args arguments, + # (false | untyped) block + # ) -> Args + # + # source://syntax_tree//lib/syntax_tree/parser.rb#543 + def on_args_add_block(arguments, block); end + + # :call-seq: + # on_args_add_star: (Args arguments, untyped star) -> Args + # + # source://syntax_tree//lib/syntax_tree/parser.rb#581 + def on_args_add_star(arguments, argument); end + + # :call-seq: + # on_args_forward: () -> ArgsForward + # + # source://syntax_tree//lib/syntax_tree/parser.rb#603 + def on_args_forward; end + + # :call-seq: + # on_args_new: () -> Args + # + # source://syntax_tree//lib/syntax_tree/parser.rb#611 + def on_args_new; end + + # :call-seq: + # on_array: ((nil | Args) contents) -> + # ArrayLiteral | QSymbols | QWords | Symbols | Words + # + # source://syntax_tree//lib/syntax_tree/parser.rb#622 + def on_array(contents); end + + # :call-seq: + # on_aryptn: ( + # (nil | VarRef) constant, + # (nil | Array[untyped]) requireds, + # (nil | VarField) rest, + # (nil | Array[untyped]) posts + # ) -> AryPtn + # + # source://syntax_tree//lib/syntax_tree/parser.rb#701 + def on_aryptn(constant, requireds, rest, posts); end + + # :call-seq: + # on_assign: ( + # ( + # ARefField | + # ConstPathField | + # Field | + # TopConstField | + # VarField + # ) target, + # untyped value + # ) -> Assign + # + # source://syntax_tree//lib/syntax_tree/parser.rb#756 + def on_assign(target, value); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_assign_error(error, *_arg1); end + + # :call-seq: + # on_assoc_new: (untyped key, untyped value) -> Assoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#766 + def on_assoc_new(key, value); end + + # :call-seq: + # on_assoc_splat: (untyped value) -> AssocSplat + # + # source://syntax_tree//lib/syntax_tree/parser.rb#775 + def on_assoc_splat(value); end + + # :call-seq: + # on_backref: (String value) -> Backref + # + # source://syntax_tree//lib/syntax_tree/parser.rb#790 + def on_backref(value); end + + # :call-seq: + # on_backtick: (String value) -> Backtick + # + # source://syntax_tree//lib/syntax_tree/parser.rb#805 + def on_backtick(value); end + + # :call-seq: + # on_bare_assoc_hash: ( + # Array[AssocNew | AssocSplat] assocs + # ) -> BareAssocHash + # + # source://syntax_tree//lib/syntax_tree/parser.rb#826 + def on_bare_assoc_hash(assocs); end + + # :call-seq: + # on_begin: (untyped bodystmt) -> Begin | PinnedBegin + # + # source://syntax_tree//lib/syntax_tree/parser.rb#835 + def on_begin(bodystmt); end + + # :call-seq: + # on_binary: ( + # untyped left, + # (Op | Symbol) operator, + # untyped right + # ) -> Binary + # + # source://syntax_tree//lib/syntax_tree/parser.rb#874 + def on_binary(left, operator, right); end + + # :call-seq: + # on_block_var: (Params params, (nil | Array[Ident]) locals) -> BlockVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#906 + def on_block_var(params, locals); end + + # :call-seq: + # on_blockarg: (Ident name) -> BlockArg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#946 + def on_blockarg(name); end + + # :call-seq: + # on_bodystmt: ( + # Statements statements, + # (nil | Rescue) rescue_clause, + # (nil | Statements) else_clause, + # (nil | Ensure) ensure_clause + # ) -> BodyStmt + # + # source://syntax_tree//lib/syntax_tree/parser.rb#962 + def on_bodystmt(statements, rescue_clause, else_clause, ensure_clause); end + + # :call-seq: + # on_brace_block: ( + # (nil | BlockVar) block_var, + # Statements statements + # ) -> BlockNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#988 + def on_brace_block(block_var, statements); end + + # :call-seq: + # on_break: (Args arguments) -> Break + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1025 + def on_break(arguments); end + + # :call-seq: + # on_call: ( + # untyped receiver, + # (:"::" | Op | Period) operator, + # (:call | Backtick | Const | Ident | Op) message + # ) -> CallNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1040 + def on_call(receiver, operator, message); end + + # :call-seq: + # on_case: (untyped value, untyped consequent) -> Case | RAssign + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1061 + def on_case(value, consequent); end + + # :call-seq: + # on_class: ( + # (ConstPathRef | ConstRef | TopConstRef) constant, + # untyped superclass, + # BodyStmt bodystmt + # ) -> ClassDeclaration + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1096 + def on_class(constant, superclass, bodystmt); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_class_name_error(error, *_arg1); end + + # :call-seq: + # on_comma: (String value) -> Comma + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1120 + def on_comma(value); end + + # :call-seq: + # on_command: ((Const | Ident) message, Args arguments) -> Command + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1139 + def on_command(message, arguments); end + + # :call-seq: + # on_command_call: ( + # untyped receiver, + # (:"::" | Op | Period) operator, + # (Const | Ident | Op) message, + # (nil | Args) arguments + # ) -> CommandCall + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1155 + def on_command_call(receiver, operator, message, arguments); end + + # :call-seq: + # on_comment: (String value) -> Comment + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1170 + def on_comment(value); end + + # :call-seq: + # on_const: (String value) -> Const + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1208 + def on_const(value); end + + # :call-seq: + # on_const_path_field: (untyped parent, Const constant) -> + # ConstPathField | Field + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1224 + def on_const_path_field(parent, constant); end + + # :call-seq: + # on_const_path_ref: (untyped parent, Const constant) -> ConstPathRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1243 + def on_const_path_ref(parent, constant); end + + # :call-seq: + # on_const_ref: (Const constant) -> ConstRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1253 + def on_const_ref(constant); end + + # :call-seq: + # on_cvar: (String value) -> CVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1259 + def on_cvar(value); end + + # :call-seq: + # on_def: ( + # (Backtick | Const | Ident | Kw | Op) name, + # (nil | Params | Paren) params, + # untyped bodystmt + # ) -> DefNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1278 + def on_def(name, params, bodystmt); end + + # :call-seq: + # on_defined: (untyped value) -> Defined + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1346 + def on_defined(value); end + + # :call-seq: + # on_defs: ( + # untyped target, + # (Op | Period) operator, + # (Backtick | Const | Ident | Kw | Op) name, + # (Params | Paren) params, + # BodyStmt bodystmt + # ) -> DefNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1370 + def on_defs(target, operator, name, params, bodystmt); end + + # :call-seq: + # on_do_block: (BlockVar block_var, BodyStmt bodystmt) -> BlockNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1435 + def on_do_block(block_var, bodystmt); end + + # :call-seq: + # on_dot2: ((nil | untyped) left, (nil | untyped) right) -> RangeNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1459 + def on_dot2(left, right); end + + # :call-seq: + # on_dot3: ((nil | untyped) left, (nil | untyped) right) -> RangeNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1475 + def on_dot3(left, right); end + + # :call-seq: + # on_dyna_symbol: (StringContent string_content) -> DynaSymbol + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1491 + def on_dyna_symbol(string_content); end + + # :call-seq: + # on_else: (Statements statements) -> Else + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1517 + def on_else(statements); end + + # :call-seq: + # on_elsif: ( + # untyped predicate, + # Statements statements, + # (nil | Elsif | Else) consequent + # ) -> Elsif + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1558 + def on_elsif(predicate, statements, consequent); end + + # :call-seq: + # on_embdoc: (String value) -> EmbDoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1588 + def on_embdoc(value); end + + # :call-seq: + # on_embdoc_beg: (String value) -> EmbDoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1595 + def on_embdoc_beg(value); end + + # :call-seq: + # on_embdoc_end: (String value) -> EmbDoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1606 + def on_embdoc_end(value); end + + # :call-seq: + # on_embexpr_beg: (String value) -> EmbExprBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1630 + def on_embexpr_beg(value); end + + # :call-seq: + # on_embexpr_end: (String value) -> EmbExprEnd + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1649 + def on_embexpr_end(value); end + + # :call-seq: + # on_embvar: (String value) -> EmbVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1668 + def on_embvar(value); end + + # :call-seq: + # on_ensure: (Statements statements) -> Ensure + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1687 + def on_ensure(statements); end + + # The handler for this event accepts no parameters (though in previous + # versions of Ruby it accepted a string literal with a value of ","). + # + # :call-seq: + # on_excessed_comma: () -> ExcessedComma + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1714 + def on_excessed_comma(*_arg0); end + + # :call-seq: + # on_fcall: ((Const | Ident) value) -> CallNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1722 + def on_fcall(value); end + + # :call-seq: + # on_field: ( + # untyped parent, + # (:"::" | Op | Period) operator + # (Const | Ident) name + # ) -> Field + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1738 + def on_field(parent, operator, name); end + + # :call-seq: + # on_float: (String value) -> FloatLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1749 + def on_float(value); end + + # :call-seq: + # on_fndptn: ( + # (nil | untyped) constant, + # VarField left, + # Array[untyped] values, + # VarField right + # ) -> FndPtn + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1769 + def on_fndptn(constant, left, values, right); end + + # :call-seq: + # on_for: ( + # (MLHS | VarField) value, + # untyped collection, + # Statements statements + # ) -> For + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1821 + def on_for(index, collection, statements); end + + # :call-seq: + # on_gvar: (String value) -> GVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1859 + def on_gvar(value); end + + # :call-seq: + # on_hash: ((nil | Array[AssocNew | AssocSplat]) assocs) -> HashLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1874 + def on_hash(assocs); end + + # :call-seq: + # on_heredoc_beg: (String value) -> HeredocBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1887 + def on_heredoc_beg(value); end + + # :call-seq: + # on_heredoc_dedent: (StringContent string, Integer width) -> Heredoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1906 + def on_heredoc_dedent(string, width); end + + # :call-seq: + # on_heredoc_end: (String value) -> Heredoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1920 + def on_heredoc_end(value); end + + # :call-seq: + # on_hshptn: ( + # (nil | untyped) constant, + # Array[[Label | StringContent, untyped]] keywords, + # (nil | VarField) keyword_rest + # ) -> HshPtn + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1956 + def on_hshptn(constant, keywords, keyword_rest); end + + # :call-seq: + # on_ident: (String value) -> Ident + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2026 + def on_ident(value); end + + # :call-seq: + # on_if: ( + # untyped predicate, + # Statements statements, + # (nil | Elsif | Else) consequent + # ) -> IfNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2045 + def on_if(predicate, statements, consequent); end + + # :call-seq: + # on_if_mod: (untyped predicate, untyped statement) -> IfNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2085 + def on_if_mod(predicate, statement); end + + # :call-seq: + # on_ifop: (untyped predicate, untyped truthy, untyped falsy) -> IfOp + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2074 + def on_ifop(predicate, truthy, falsy); end + + # :call-seq: + # on_imaginary: (String value) -> Imaginary + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2107 + def on_imaginary(value); end + + # :call-seq: + # on_in: (RAssign pattern, nil statements, nil consequent) -> RAssign + # | ( + # untyped pattern, + # Statements statements, + # (nil | In | Else) consequent + # ) -> In + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2127 + def on_in(pattern, statements, consequent); end + + # :call-seq: + # on_int: (String value) -> Int + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2172 + def on_int(value); end + + # :call-seq: + # on_ivar: (String value) -> IVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2187 + def on_ivar(value); end + + # :call-seq: + # on_kw: (String value) -> Kw + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2202 + def on_kw(value); end + + # :call-seq: + # on_kwrest_param: ((nil | Ident) name) -> KwRestParam + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2221 + def on_kwrest_param(name); end + + # :call-seq: + # on_label: (String value) -> Label + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2230 + def on_label(value); end + + # :call-seq: + # on_label_end: (String value) -> LabelEnd + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2245 + def on_label_end(value); end + + # :call-seq: + # on_lambda: ( + # (Params | Paren) params, + # (BodyStmt | Statements) statements + # ) -> Lambda + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2267 + def on_lambda(params, statements); end + + # :call-seq: + # on_lambda_var: (Params params, Array[ Ident ] locals) -> LambdaVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2349 + def on_lambda_var(params, locals); end + + # :call-seq: + # on_lbrace: (String value) -> LBrace + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2432 + def on_lbrace(value); end + + # :call-seq: + # on_lbracket: (String value) -> LBracket + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2451 + def on_lbracket(value); end + + # :call-seq: + # on_lparen: (String value) -> LParen + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2470 + def on_lparen(value); end + + # :call-seq: + # on_massign: ((MLHS | MLHSParen) target, untyped value) -> MAssign + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2493 + def on_massign(target, value); end + + # :call-seq: + # on_method_add_arg: ( + # CallNode call, + # (ArgParen | Args) arguments + # ) -> CallNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2509 + def on_method_add_arg(call, arguments); end + + # :call-seq: + # on_method_add_block: ( + # (Break | Call | Command | CommandCall, Next) call, + # Block block + # ) -> Break | MethodAddBlock + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2527 + def on_method_add_block(call, block); end + + # :call-seq: + # on_mlhs_add: ( + # MLHS mlhs, + # (ARefField | Field | Ident | MLHSParen | VarField) part + # ) -> MLHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2556 + def on_mlhs_add(mlhs, part); end + + # :call-seq: + # on_mlhs_add_post: (MLHS left, MLHS right) -> MLHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2565 + def on_mlhs_add_post(left, right); end + + # :call-seq: + # on_mlhs_add_star: ( + # MLHS mlhs, + # (nil | ARefField | Field | Ident | VarField) part + # ) -> MLHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2577 + def on_mlhs_add_star(mlhs, part); end + + # :call-seq: + # on_mlhs_new: () -> MLHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2590 + def on_mlhs_new; end + + # :call-seq: + # on_mlhs_paren: ((MLHS | MLHSParen) contents) -> MLHSParen + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2600 + def on_mlhs_paren(contents); end + + # :call-seq: + # on_module: ( + # (ConstPathRef | ConstRef | TopConstRef) constant, + # BodyStmt bodystmt + # ) -> ModuleDeclaration + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2618 + def on_module(constant, bodystmt); end + + # :call-seq: + # on_mrhs_add: (MRHS mrhs, untyped part) -> MRHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2650 + def on_mrhs_add(mrhs, part); end + + # :call-seq: + # on_mrhs_add_star: (MRHS mrhs, untyped value) -> MRHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2659 + def on_mrhs_add_star(mrhs, value); end + + # :call-seq: + # on_mrhs_new: () -> MRHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2640 + def on_mrhs_new; end + + # :call-seq: + # on_mrhs_new_from_args: (Args arguments) -> MRHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2681 + def on_mrhs_new_from_args(arguments); end + + # :call-seq: + # on_next: (Args arguments) -> Next + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2687 + def on_next(arguments); end + + # :call-seq: + # on_op: (String value) -> Op + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2706 + def on_op(value); end + + # :call-seq: + # on_opassign: ( + # ( + # ARefField | + # ConstPathField | + # Field | + # TopConstField | + # VarField + # ) target, + # Op operator, + # untyped value + # ) -> OpAssign + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2735 + def on_opassign(target, operator, value); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_param_error(error, *_arg1); end + + # :call-seq: + # on_params: ( + # (nil | Array[Ident]) requireds, + # (nil | Array[[Ident, untyped]]) optionals, + # (nil | ArgsForward | ExcessedComma | RestParam) rest, + # (nil | Array[Ident]) posts, + # (nil | Array[[Ident, nil | untyped]]) keywords, + # (nil | :nil | ArgsForward | KwRestParam) keyword_rest, + # (nil | :& | BlockArg) block + # ) -> Params + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2758 + def on_params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end + + # :call-seq: + # on_paren: (untyped contents) -> Paren + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2823 + def on_paren(contents); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_parse_error(error, *_arg1); end + + # :call-seq: + # on_period: (String value) -> Period + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2873 + def on_period(value); end + + # :call-seq: + # on_program: (Statements statements) -> Program + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2888 + def on_program(statements); end + + # :call-seq: + # on_qsymbols_add: (QSymbols qsymbols, TStringContent element) -> QSymbols + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3000 + def on_qsymbols_add(qsymbols, element); end + + # :call-seq: + # on_qsymbols_beg: (String value) -> QSymbolsBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3010 + def on_qsymbols_beg(value); end + + # :call-seq: + # on_qsymbols_new: () -> QSymbols + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3029 + def on_qsymbols_new; end + + # :call-seq: + # on_qwords_add: (QWords qwords, TStringContent element) -> QWords + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3041 + def on_qwords_add(qwords, element); end + + # :call-seq: + # on_qwords_beg: (String value) -> QWordsBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3051 + def on_qwords_beg(value); end + + # :call-seq: + # on_qwords_new: () -> QWords + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3070 + def on_qwords_new; end + + # :call-seq: + # on_rational: (String value) -> RationalLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3082 + def on_rational(value); end + + # :call-seq: + # on_rbrace: (String value) -> RBrace + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3097 + def on_rbrace(value); end + + # :call-seq: + # on_rbracket: (String value) -> RBracket + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3116 + def on_rbracket(value); end + + # :call-seq: + # on_redo: () -> Redo + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3135 + def on_redo; end + + # :call-seq: + # on_regexp_add: ( + # RegexpContent regexp_content, + # (StringDVar | StringEmbExpr | TStringContent) part + # ) -> RegexpContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3146 + def on_regexp_add(regexp_content, part); end + + # :call-seq: + # on_regexp_beg: (String value) -> RegexpBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3156 + def on_regexp_beg(value); end + + # :call-seq: + # on_regexp_end: (String value) -> RegexpEnd + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3175 + def on_regexp_end(value); end + + # :call-seq: + # on_regexp_literal: ( + # RegexpContent regexp_content, + # (nil | RegexpEnd) ending + # ) -> RegexpLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3193 + def on_regexp_literal(regexp_content, ending); end + + # :call-seq: + # on_regexp_new: () -> RegexpContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3211 + def on_regexp_new; end + + # :call-seq: + # on_rescue: ( + # (nil | [untyped] | MRHS | MRHSAddStar) exceptions, + # (nil | Field | VarField) variable, + # Statements statements, + # (nil | Rescue) consequent + # ) -> Rescue + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3228 + def on_rescue(exceptions, variable, statements, consequent); end + + # :call-seq: + # on_rescue_mod: (untyped statement, untyped value) -> RescueMod + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3281 + def on_rescue_mod(statement, value); end + + # :call-seq: + # on_rest_param: ((nil | Ident) name) -> RestParam + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3293 + def on_rest_param(name); end + + # :call-seq: + # on_retry: () -> Retry + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3302 + def on_retry; end + + # :call-seq: + # on_return: (Args arguments) -> ReturnNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3310 + def on_return(arguments); end + + # :call-seq: + # on_return0: () -> ReturnNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3321 + def on_return0; end + + # :call-seq: + # on_rparen: (String value) -> RParen + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3329 + def on_rparen(value); end + + # :call-seq: + # on_sclass: (untyped target, BodyStmt bodystmt) -> SClass + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3348 + def on_sclass(target, bodystmt); end + + # :call-seq: + # on_semicolon: (String value) -> Semicolon + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3381 + def on_semicolon(value); end + + # stmts_add is a parser event that represents a single statement inside a + # list of statements within any lexical block. It accepts as arguments the + # parent stmts node as well as an stmt which can be any expression in + # Ruby. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3400 + def on_stmts_add(statements, statement); end + + # :call-seq: + # on_stmts_new: () -> Statements + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3413 + def on_stmts_new; end + + # :call-seq: + # on_string_add: ( + # String string, + # (StringEmbExpr | StringDVar | TStringContent) part + # ) -> StringContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3426 + def on_string_add(string, part); end + + # :call-seq: + # on_string_concat: ( + # (StringConcat | StringLiteral) left, + # StringLiteral right + # ) -> StringConcat + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3443 + def on_string_concat(left, right); end + + # :call-seq: + # on_string_content: () -> StringContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3453 + def on_string_content; end + + # :call-seq: + # on_string_dvar: ((Backref | VarRef) variable) -> StringDVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3463 + def on_string_dvar(variable); end + + # :call-seq: + # on_string_embexpr: (Statements statements) -> StringEmbExpr + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3474 + def on_string_embexpr(statements); end + + # :call-seq: + # on_string_literal: (String string) -> Heredoc | StringLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3504 + def on_string_literal(string); end + + # :call-seq: + # on_super: ((ArgParen | Args) arguments) -> Super + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3544 + def on_super(arguments); end + + # symbeg is a token that represents the beginning of a symbol literal. In + # most cases it will contain just ":" as in the value, but if its a dynamic + # symbol being defined it will contain ":'" or ":\"". + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3556 + def on_symbeg(value); end + + # :call-seq: + # on_symbol: ( + # (Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op) value + # ) -> SymbolContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3577 + def on_symbol(value); end + + # :call-seq: + # on_symbol_literal: ( + # ( + # Backtick | Const | CVar | GVar | Ident | + # IVar | Kw | Op | SymbolContent + # ) value + # ) -> SymbolLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3590 + def on_symbol_literal(value); end + + # :call-seq: + # on_symbols_add: (Symbols symbols, Word word) -> Symbols + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3606 + def on_symbols_add(symbols, word); end + + # :call-seq: + # on_symbols_beg: (String value) -> SymbolsBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3616 + def on_symbols_beg(value); end + + # :call-seq: + # on_symbols_new: () -> Symbols + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3635 + def on_symbols_new; end + + # :call-seq: + # on_tlambda: (String value) -> TLambda + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3647 + def on_tlambda(value); end + + # :call-seq: + # on_tlambeg: (String value) -> TLamBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3666 + def on_tlambeg(value); end + + # :call-seq: + # on_top_const_field: (Const constant) -> TopConstRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3685 + def on_top_const_field(constant); end + + # :call-seq: + # on_top_const_ref: (Const constant) -> TopConstRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3696 + def on_top_const_ref(constant); end + + # :call-seq: + # on_tstring_beg: (String value) -> TStringBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3707 + def on_tstring_beg(value); end + + # :call-seq: + # on_tstring_content: (String value) -> TStringContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3726 + def on_tstring_content(value); end + + # :call-seq: + # on_tstring_end: (String value) -> TStringEnd + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3741 + def on_tstring_end(value); end + + # :call-seq: + # on_unary: (:not operator, untyped statement) -> Not + # | (Symbol operator, untyped statement) -> Unary + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3761 + def on_unary(operator, statement); end + + # :call-seq: + # on_undef: (Array[DynaSymbol | SymbolLiteral] symbols) -> Undef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3804 + def on_undef(symbols); end + + # :call-seq: + # on_unless: ( + # untyped predicate, + # Statements statements, + # ((nil | Elsif | Else) consequent) + # ) -> UnlessNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3819 + def on_unless(predicate, statements, consequent); end + + # :call-seq: + # on_unless_mod: (untyped predicate, untyped statement) -> UnlessNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3848 + def on_unless_mod(predicate, statement); end + + # :call-seq: + # on_until: (untyped predicate, Statements statements) -> UntilNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3862 + def on_until(predicate, statements); end + + # :call-seq: + # on_until_mod: (untyped predicate, untyped statement) -> UntilNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3893 + def on_until_mod(predicate, statement); end + + # :call-seq: + # on_var_alias: (GVar left, (Backref | GVar) right) -> AliasNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3906 + def on_var_alias(left, right); end + + # :call-seq: + # on_var_field: ( + # (nil | Const | CVar | GVar | Ident | IVar) value + # ) -> VarField + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3920 + def on_var_field(value); end + + # :call-seq: + # on_var_ref: ((Const | CVar | GVar | Ident | IVar | Kw) value) -> VarRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3935 + def on_var_ref(value); end + + # :call-seq: + # on_vcall: (Ident ident) -> VCall + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3941 + def on_vcall(ident); end + + # :call-seq: + # on_void_stmt: () -> VoidStmt + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3947 + def on_void_stmt; end + + # :call-seq: + # on_when: ( + # Args arguments, + # Statements statements, + # (nil | Else | When) consequent + # ) -> When + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3960 + def on_when(arguments, statements, consequent); end + + # :call-seq: + # on_while: (untyped predicate, Statements statements) -> WhileNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3992 + def on_while(predicate, statements); end + + # :call-seq: + # on_while_mod: (untyped predicate, untyped statement) -> WhileNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4023 + def on_while_mod(predicate, statement); end + + # :call-seq: + # on_word_add: ( + # Word word, + # (StringEmbExpr | StringDVar | TStringContent) part + # ) -> Word + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4039 + def on_word_add(word, part); end + + # :call-seq: + # on_word_new: () -> Word + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4048 + def on_word_new; end + + # :call-seq: + # on_words_add: (Words words, Word word) -> Words + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4058 + def on_words_add(words, word); end + + # :call-seq: + # on_words_beg: (String value) -> WordsBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4068 + def on_words_beg(value); end + + # :call-seq: + # on_words_new: () -> Words + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4087 + def on_words_new; end + + # :call-seq: + # on_xstring_add: ( + # XString xstring, + # (StringEmbExpr | StringDVar | TStringContent) part + # ) -> XString + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4106 + def on_xstring_add(xstring, part); end + + # :call-seq: + # on_xstring_literal: (XString xstring) -> Heredoc | XStringLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4130 + def on_xstring_literal(xstring); end + + # :call-seq: + # on_xstring_new: () -> XString + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4115 + def on_xstring_new; end + + # :call-seq: + # on_yield: ((Args | Paren) arguments) -> YieldNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4153 + def on_yield(arguments); end + + # :call-seq: + # on_yield0: () -> YieldNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4164 + def on_yield0; end + + # :call-seq: + # on_zsuper: () -> ZSuper + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4172 + def on_zsuper; end +end + +# Represents a line in the source. If this class is being used, it means +# that there are characters in the string that are multi-byte, so we will +# build up an array of indices, such that array[byteindex] will be equal to +# the index of the character within the string. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#38 +class SyntaxTree::Parser::MultiByteString + # @return [MultiByteString] a new instance of MultiByteString + # + # source://syntax_tree//lib/syntax_tree/parser.rb#41 + def initialize(start, line); end + + # Technically it's possible for the column index to be a negative value if + # there's a BOM at the beginning of the file, which is the reason we need + # to compare it to 0 here. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#55 + def [](byteindex); end + + # Returns the value of attribute indices. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#39 + def indices; end + + # Returns the value of attribute start. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#39 + def start; end +end + +# A special parser error so that we can get nice syntax displays on the +# error message when prettier prints out the results. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#9 +class SyntaxTree::Parser::ParseError < ::StandardError + # @return [ParseError] a new instance of ParseError + # + # source://syntax_tree//lib/syntax_tree/parser.rb#12 + def initialize(error, lineno, column); end + + # Returns the value of attribute column. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#10 + def column; end + + # Returns the value of attribute lineno. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#10 + def lineno; end +end + +# Ugh... I really do not like this class. Basically, ripper doesn't provide +# enough information about where pins are located in the tree. It only gives +# events for ^ ops and var_ref nodes. You have to piece it together +# yourself. +# +# Note that there are edge cases here that we straight up do not address, +# because I honestly think it's going to be faster to write a new parser +# than to address them. For example, this will not work properly: +# +# foo in ^((bar = 0; bar; baz)) +# +# If someone actually does something like that, we'll have to find another +# way to make this work. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#656 +class SyntaxTree::Parser::PinVisitor < ::SyntaxTree::Visitor + # @return [PinVisitor] a new instance of PinVisitor + # + # source://syntax_tree//lib/syntax_tree/parser.rb#659 + def initialize(pins); end + + # Returns the value of attribute pins. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#657 + def pins; end + + # Returns the value of attribute stack. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#657 + def stack; end + + # source://syntax_tree//lib/syntax_tree/parser.rb#664 + def visit(node); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#672 + def visit_var_ref(node); end + + class << self + # source://syntax_tree//lib/syntax_tree/parser.rb#677 + def visit(node, tokens); end + end +end + +# Semicolons are tokens that get added to the token list but never get +# attached to the AST. Because of this they only need to track their +# associated location so they can be used for computing bounds. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#3371 +class SyntaxTree::Parser::Semicolon + # @return [Semicolon] a new instance of Semicolon + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3374 + def initialize(location); end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3372 + def location; end +end + +# Represents a line in the source. If this class is being used, it means +# that every character in the string is 1 byte in length, so we can just +# return the start of the line + the index. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#22 +class SyntaxTree::Parser::SingleByteString + # @return [SingleByteString] a new instance of SingleByteString + # + # source://syntax_tree//lib/syntax_tree/parser.rb#25 + def initialize(start); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#29 + def [](byteindex); end + + # Returns the value of attribute start. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#23 + def start; end +end + +# This represents all of the tokens coming back from the lexer. It is +# replacing a simple array because it keeps track of the last deleted token +# from the list for better error messages. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#63 +class SyntaxTree::Parser::TokenList + # @return [TokenList] a new instance of TokenList + # + # source://syntax_tree//lib/syntax_tree/parser.rb#66 + def initialize; end + + # source://syntax_tree//lib/syntax_tree/parser.rb#71 + def <<(token); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#75 + def [](index); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#79 + def any?(&block); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#91 + def delete(value); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#95 + def delete_at(index); end + + # Returns the value of attribute last_deleted. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#64 + def last_deleted; end + + # source://syntax_tree//lib/syntax_tree/parser.rb#83 + def reverse_each(&block); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#87 + def rindex(&block); end + + # Returns the value of attribute tokens. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#64 + def tokens; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in Const[value: "SyntaxTree"] +# end +# +# the pattern is the `Const[value: "SyntaxTree"]` expression. Within Syntax +# Tree, every node generates these kinds of expressions using the +# #construct_keys method. +# +# The pattern gets compiled into an object that responds to call by running +# the #compile method. This method itself will run back through Syntax Tree to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = SyntaxTree::Pattern.new("Const[value: 'SyntaxTree']").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a SyntaxTree::Pattern::CompilationError will be +# raised. +# +# source://syntax_tree//lib/syntax_tree/pattern.rb#39 +class SyntaxTree::Pattern + # @return [Pattern] a new instance of Pattern + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#61 + def initialize(query); end + + # source://syntax_tree//lib/syntax_tree/pattern.rb#65 + def compile; end + + # Returns the value of attribute query. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#59 + def query; end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#80 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#86 + def combine_or(left, right); end + + # in [foo, bar, baz] + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#109 + def compile_aryptn(node); end + + # in foo | bar + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#134 + def compile_binary(node); end + + # in Ident + # in String + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#142 + def compile_const(node); end + + # in SyntaxTree::Ident + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#159 + def compile_const_path_ref(node); end + + # in :"" + # in :"foo" + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#172 + def compile_dyna_symbol(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#91 + def compile_error(node); end + + # in Ident[value: String] + # in { value: String } + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#188 + def compile_hshptn(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#260 + def compile_node(node); end + + # in /foo/ + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#214 + def compile_regexp_literal(node); end + + # in "" + # in "foo" + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#226 + def compile_string_literal(node); end + + # in :+ + # in :foo + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#238 + def compile_symbol_literal(node); end + + # in Foo + # in nil + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#246 + def compile_var_ref(node); end + + # There are a couple of nodes (string literals, dynamic symbols, and regexp) + # that contain list of parts. This can include plain string content, + # interpolated expressions, and interpolated variables. We only support + # plain string content, so this method will extract out the plain string + # content if it is the only element in the list. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#100 + def extract_string(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://syntax_tree//lib/syntax_tree/pattern.rb#42 +class SyntaxTree::Pattern::CompilationError < ::StandardError + # @return [CompilationError] a new instance of CompilationError + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#43 + def initialize(repr); end +end + +# Period represents the use of the +.+ operator. It is usually found in method +# calls. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8553 +class SyntaxTree::Period < ::SyntaxTree::Node + # @return [Period] a new instance of Period + # + # source://syntax_tree//lib/syntax_tree/node.rb#8560 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8595 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8566 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8570 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8558 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8574 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8570 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8587 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8591 + def format(q); end + + # [String] the period + # + # source://syntax_tree//lib/syntax_tree/node.rb#8555 + def value; end +end + +# PinnedBegin represents a pinning a nested statement within pattern matching. +# +# case value +# in ^(statement) +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#1962 +class SyntaxTree::PinnedBegin < ::SyntaxTree::Node + # @return [PinnedBegin] a new instance of PinnedBegin + # + # source://syntax_tree//lib/syntax_tree/node.rb#1969 + def initialize(statement:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2014 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1975 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1979 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1967 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1983 + def copy(statement: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1979 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1996 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2000 + def format(q); end + + # [Node] the expression being pinned + # + # source://syntax_tree//lib/syntax_tree/node.rb#1964 + def statement; end +end + +# PinnedVarRef represents a pinned variable reference within a pattern +# matching pattern. +# +# case value +# in ^variable +# end +# +# This can be a plain local variable like the example above. It can also be a +# a class variable, a global variable, or an instance variable. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11661 +class SyntaxTree::PinnedVarRef < ::SyntaxTree::Node + # @return [PinnedVarRef] a new instance of PinnedVarRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#11668 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11706 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11674 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11678 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11666 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11682 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11678 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11695 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11699 + def format(q); end + + # [Const | CVar | GVar | Ident | IVar] the value of this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11663 + def value; end +end + +# This visitor pretty-prints the AST into an equivalent s-expression. +# +# source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#5 +class SyntaxTree::PrettyPrintVisitor < ::SyntaxTree::FieldVisitor + # @return [PrettyPrintVisitor] a new instance of PrettyPrintVisitor + # + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#8 + def initialize(q); end + + # Returns the value of attribute q. + # + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#6 + def q; end + + # This is here because we need to make sure the operator is cast to a string + # before we print it out. + # + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#14 + def visit_binary(node); end + + # This is here to make it a little nicer to look at labels since they + # typically have their : at the end of the value. + # + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#25 + def visit_label(node); end + + private + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#36 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#45 + def field(_name, value); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#50 + def list(_name, values); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#55 + def node(_node, type); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#62 + def pairs(_name, values); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#78 + def text(_name, value); end +end + +# Program represents the overall syntax tree. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8601 +class SyntaxTree::Program < ::SyntaxTree::Node + # @return [Program] a new instance of Program + # + # source://syntax_tree//lib/syntax_tree/node.rb#8608 + def initialize(statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8648 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8614 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8618 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8606 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8622 + def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8618 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8635 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8639 + def format(q); end + + # [Statements] the top-level expressions of the program + # + # source://syntax_tree//lib/syntax_tree/node.rb#8603 + def statements; end +end + +# QSymbols represents a symbol literal array without interpolation. +# +# %i[one two three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#8657 +class SyntaxTree::QSymbols < ::SyntaxTree::Node + # @return [QSymbols] a new instance of QSymbols + # + # source://syntax_tree//lib/syntax_tree/node.rb#8667 + def initialize(beginning:, elements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8727 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8674 + def accept(visitor); end + + # [QSymbolsBeg] the token that opens this array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8659 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8678 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8665 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8682 + def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8678 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8696 + def deconstruct_keys(_keys); end + + # [Array[ TStringContent ]] the elements of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#8662 + def elements; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8705 + def format(q); end +end + +# QSymbolsBeg represents the beginning of a symbol literal array. +# +# %i[one two three] +# +# In the snippet above, QSymbolsBeg represents the "%i[" token. Note that +# these kinds of arrays can start with a lot of different delimiter types +# (e.g., %i| or %i<). +# +# source://syntax_tree//lib/syntax_tree/node.rb#8740 +class SyntaxTree::QSymbolsBeg < ::SyntaxTree::Node + # @return [QSymbolsBeg] a new instance of QSymbolsBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#8744 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8770 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8749 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8753 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8757 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8753 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8766 + def deconstruct_keys(_keys); end + + # [String] the beginning of the array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8742 + def value; end +end + +# QWords represents a string literal array without interpolation. +# +# %w[one two three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#8779 +class SyntaxTree::QWords < ::SyntaxTree::Node + # @return [QWords] a new instance of QWords + # + # source://syntax_tree//lib/syntax_tree/node.rb#8789 + def initialize(beginning:, elements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8845 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8796 + def accept(visitor); end + + # [QWordsBeg] the token that opens this array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8781 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8800 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8787 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8804 + def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8800 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8814 + def deconstruct_keys(_keys); end + + # [Array[ TStringContent ]] the elements of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#8784 + def elements; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8823 + def format(q); end +end + +# QWordsBeg represents the beginning of a string literal array. +# +# %w[one two three] +# +# In the snippet above, QWordsBeg represents the "%w[" token. Note that these +# kinds of arrays can start with a lot of different delimiter types (e.g., +# %w| or %w<). +# +# source://syntax_tree//lib/syntax_tree/node.rb#8858 +class SyntaxTree::QWordsBeg < ::SyntaxTree::Node + # @return [QWordsBeg] a new instance of QWordsBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#8862 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8888 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8867 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8871 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8875 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8871 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8884 + def deconstruct_keys(_keys); end + + # [String] the beginning of the array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8860 + def value; end +end + +# Responsible for providing information about quotes to be used for strings +# and dynamic symbols. +# +# source://syntax_tree//lib/syntax_tree/node.rb#4615 +module SyntaxTree::Quotes + class << self + # If there is some part of this string that matches an escape sequence or + # that contains the interpolation pattern ("#{"), then we are locked into + # whichever quote the user chose. (If they chose single quotes, then double + # quoting would activate the escape sequence, and if they chose double + # quotes, then single quotes would deactivate it.) + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4624 + def locked?(node, quote); end + + # Find the matching closing quote for the given opening quote. + # + # source://syntax_tree//lib/syntax_tree/node.rb#4631 + def matching(quote); end + + # Escape and unescape single and double quotes as needed to be able to + # enclose +content+ with +enclosing+. + # + # source://syntax_tree//lib/syntax_tree/node.rb#4637 + def normalize(content, enclosing); end + end +end + +# The matching pairs of quotes that can be used with % literals. +# +# source://syntax_tree//lib/syntax_tree/node.rb#4617 +SyntaxTree::Quotes::PAIRS = T.let(T.unsafe(nil), Hash) + +# RAssign represents a single-line pattern match. +# +# value in pattern +# value => pattern +# +# source://syntax_tree//lib/syntax_tree/node.rb#3201 +class SyntaxTree::RAssign < ::SyntaxTree::Node + # @return [RAssign] a new instance of RAssign + # + # source://syntax_tree//lib/syntax_tree/node.rb#3215 + def initialize(value:, operator:, pattern:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3277 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3223 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3227 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3213 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3231 + def copy(value: T.unsafe(nil), operator: T.unsafe(nil), pattern: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3227 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3246 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3256 + def format(q); end + + # [Kw | Op] the operator being used to match against the pattern, which is + # either => or in + # + # source://syntax_tree//lib/syntax_tree/node.rb#3207 + def operator; end + + # [Node] the pattern on the right-hand side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#3210 + def pattern; end + + # [Node] the left-hand expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#3203 + def value; end +end + +# RBrace represents the use of a right brace, i.e., +++. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8945 +class SyntaxTree::RBrace < ::SyntaxTree::Node + # @return [RBrace] a new instance of RBrace + # + # source://syntax_tree//lib/syntax_tree/node.rb#8949 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8975 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8954 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8958 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8962 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8958 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8971 + def deconstruct_keys(_keys); end + + # [String] the right brace + # + # source://syntax_tree//lib/syntax_tree/node.rb#8947 + def value; end +end + +# RBracket represents the use of a right bracket, i.e., +]+. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8981 +class SyntaxTree::RBracket < ::SyntaxTree::Node + # @return [RBracket] a new instance of RBracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#8985 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9011 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8990 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8994 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8998 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8994 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9007 + def deconstruct_keys(_keys); end + + # [String] the right bracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#8983 + def value; end +end + +# RParen represents the use of a right parenthesis, i.e., +)+. +# +# source://syntax_tree//lib/syntax_tree/node.rb#9751 +class SyntaxTree::RParen < ::SyntaxTree::Node + # @return [RParen] a new instance of RParen + # + # source://syntax_tree//lib/syntax_tree/node.rb#9755 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9781 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9760 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9764 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9768 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9764 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9777 + def deconstruct_keys(_keys); end + + # [String] the parenthesis + # + # source://syntax_tree//lib/syntax_tree/node.rb#9753 + def value; end +end + +# RangeNode represents using the .. or the ... operator between two +# expressions. Usually this is to create a range object. +# +# 1..2 +# +# Sometimes this operator is used to create a flip-flop. +# +# if value == 5 .. value == 10 +# end +# +# One of the sides of the expression may be nil, but not both. +# +# source://syntax_tree//lib/syntax_tree/node.rb#4540 +class SyntaxTree::RangeNode < ::SyntaxTree::Node + # @return [RangeNode] a new instance of RangeNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#4553 + def initialize(left:, operator:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4607 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4561 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4565 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4551 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4569 + def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4565 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4584 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4594 + def format(q); end + + # [nil | Node] the left side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#4542 + def left; end + + # [Op] the operator used for this range + # + # source://syntax_tree//lib/syntax_tree/node.rb#4545 + def operator; end + + # [nil | Node] the right side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#4548 + def right; end +end + +# RationalLiteral represents the use of a rational number literal. +# +# 1r +# +# source://syntax_tree//lib/syntax_tree/node.rb#8897 +class SyntaxTree::RationalLiteral < ::SyntaxTree::Node + # @return [RationalLiteral] a new instance of RationalLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#8904 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8939 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8910 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8914 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8902 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8918 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8914 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8931 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8935 + def format(q); end + + # [String] the rational number literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8899 + def value; end +end + +# Redo represents the use of the +redo+ keyword. +# +# redo +# +# source://syntax_tree//lib/syntax_tree/node.rb#9020 +class SyntaxTree::Redo < ::SyntaxTree::Node + # @return [Redo] a new instance of Redo + # + # source://syntax_tree//lib/syntax_tree/node.rb#9024 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9054 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9029 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9033 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9022 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9037 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9033 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9046 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9050 + def format(q); end +end + +# RegexpBeg represents the start of a regular expression literal. +# +# /.+/ +# +# In the example above, RegexpBeg represents the first / token. Regular +# expression literals can also be declared using the %r syntax, as in: +# +# %r{.+} +# +# source://syntax_tree//lib/syntax_tree/node.rb#9116 +class SyntaxTree::RegexpBeg < ::SyntaxTree::Node + # @return [RegexpBeg] a new instance of RegexpBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#9120 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9146 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9125 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9129 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9133 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9129 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9142 + def deconstruct_keys(_keys); end + + # [String] the beginning of the regular expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#9118 + def value; end +end + +# RegexpContent represents the body of a regular expression. +# +# /.+ #{pattern} .+/ +# +# In the example above, a RegexpContent node represents everything contained +# within the forward slashes. +# +# source://syntax_tree//lib/syntax_tree/node.rb#9065 +class SyntaxTree::RegexpContent < ::SyntaxTree::Node + # @return [RegexpContent] a new instance of RegexpContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#9073 + def initialize(beginning:, parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9101 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9079 + def accept(visitor); end + + # [String] the opening of the regular expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#9067 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9083 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9087 + def copy(beginning: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9083 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9097 + def deconstruct_keys(_keys); end + + # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the + # regular expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#9071 + def parts; end +end + +# RegexpEnd represents the end of a regular expression literal. +# +# /.+/m +# +# In the example above, the RegexpEnd event represents the /m at the end of +# the regular expression literal. You can also declare regular expression +# literals using %r, as in: +# +# %r{.+}m +# +# source://syntax_tree//lib/syntax_tree/node.rb#9161 +class SyntaxTree::RegexpEnd < ::SyntaxTree::Node + # @return [RegexpEnd] a new instance of RegexpEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#9165 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9191 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9170 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9174 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9178 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9174 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9187 + def deconstruct_keys(_keys); end + + # [String] the end of the regular expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#9163 + def value; end +end + +# RegexpLiteral represents a regular expression literal. +# +# /.+/ +# +# source://syntax_tree//lib/syntax_tree/node.rb#9200 +class SyntaxTree::RegexpLiteral < ::SyntaxTree::Node + # @return [RegexpLiteral] a new instance of RegexpLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#9214 + def initialize(beginning:, ending:, parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9296 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9222 + def accept(visitor); end + + # [String] the beginning of the regular expression literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#9202 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9226 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9212 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9230 + def copy(beginning: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9226 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9245 + def deconstruct_keys(_keys); end + + # [String] the ending of the regular expression literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#9205 + def ending; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9256 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9302 + def options; end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # regular expression literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#9209 + def parts; end + + private + + # If the first part of this regex is plain string content, we have a space + # or an =, and we're contained within a command or command_call node, then + # we want to use braces because otherwise we could end up with an ambiguous + # operator, e.g. foo / bar/ or foo /=bar/ + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#9318 + def ambiguous?(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#9308 + def include?(pattern); end +end + +# Rescue represents the use of the rescue keyword inside of a BodyStmt node. +# +# begin +# rescue +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#9408 +class SyntaxTree::Rescue < ::SyntaxTree::Node + # @return [Rescue] a new instance of Rescue + # + # source://syntax_tree//lib/syntax_tree/node.rb#9424 + def initialize(keyword:, exception:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9520 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9455 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9433 + def bind_end(end_char, end_column); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9459 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9422 + def comments; end + + # [nil | Rescue] the optional next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#9419 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9463 + def copy(keyword: T.unsafe(nil), exception: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9459 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9485 + def deconstruct_keys(_keys); end + + # [nil | RescueEx] the exceptions being rescued + # + # source://syntax_tree//lib/syntax_tree/node.rb#9413 + def exception; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9496 + def format(q); end + + # [Kw] the rescue keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#9410 + def keyword; end + + # [Statements] the expressions to evaluate when an error is rescued + # + # source://syntax_tree//lib/syntax_tree/node.rb#9416 + def statements; end +end + +# RescueEx represents the list of exceptions being rescued in a rescue clause. +# +# begin +# rescue Exception => exception +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#9333 +class SyntaxTree::RescueEx < ::SyntaxTree::Node + # @return [RescueEx] a new instance of RescueEx + # + # source://syntax_tree//lib/syntax_tree/node.rb#9344 + def initialize(exceptions:, variable:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9396 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9351 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9355 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9342 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9359 + def copy(exceptions: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9355 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9373 + def deconstruct_keys(_keys); end + + # [nil | Node] the list of exceptions being rescued + # + # source://syntax_tree//lib/syntax_tree/node.rb#9335 + def exceptions; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9382 + def format(q); end + + # [nil | Field | VarField] the expression being used to capture the raised + # exception + # + # source://syntax_tree//lib/syntax_tree/node.rb#9339 + def variable; end +end + +# RescueMod represents the use of the modifier form of a +rescue+ clause. +# +# expression rescue value +# +# source://syntax_tree//lib/syntax_tree/node.rb#9531 +class SyntaxTree::RescueMod < ::SyntaxTree::Node + # @return [RescueMod] a new instance of RescueMod + # + # source://syntax_tree//lib/syntax_tree/node.rb#9541 + def initialize(statement:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9597 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9548 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9552 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9539 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9556 + def copy(statement: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9552 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9570 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9579 + def format(q); end + + # [Node] the expression to execute + # + # source://syntax_tree//lib/syntax_tree/node.rb#9533 + def statement; end + + # [Node] the value to use if the executed expression raises an error + # + # source://syntax_tree//lib/syntax_tree/node.rb#9536 + def value; end +end + +# RestParam represents defining a parameter in a method definition that +# accepts all remaining positional parameters. +# +# def method(*rest) end +# +# source://syntax_tree//lib/syntax_tree/node.rb#9608 +class SyntaxTree::RestParam < ::SyntaxTree::Node + # @return [RestParam] a new instance of RestParam + # + # source://syntax_tree//lib/syntax_tree/node.rb#9615 + def initialize(name:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9651 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9621 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9625 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9613 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9629 + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9625 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9642 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9646 + def format(q); end + + # [nil | Ident] the name of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#9610 + def name; end +end + +# Retry represents the use of the +retry+ keyword. +# +# retry +# +# source://syntax_tree//lib/syntax_tree/node.rb#9660 +class SyntaxTree::Retry < ::SyntaxTree::Node + # @return [Retry] a new instance of Retry + # + # source://syntax_tree//lib/syntax_tree/node.rb#9664 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9694 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9669 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9673 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9662 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9677 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9673 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9686 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9690 + def format(q); end +end + +# Return represents using the +return+ keyword with arguments. +# +# return value +# +# source://syntax_tree//lib/syntax_tree/node.rb#9703 +class SyntaxTree::ReturnNode < ::SyntaxTree::Node + # @return [ReturnNode] a new instance of ReturnNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#9710 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9745 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9716 + def accept(visitor); end + + # [nil | Args] the arguments being passed to the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#9705 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9720 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9708 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9724 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9720 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9737 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9741 + def format(q); end +end + +# SClass represents a block of statements that should be evaluated within the +# context of the singleton class of an object. It's frequently used to define +# singleton methods. +# +# class << self +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#9793 +class SyntaxTree::SClass < ::SyntaxTree::Node + # @return [SClass] a new instance of SClass + # + # source://syntax_tree//lib/syntax_tree/node.rb#9803 + def initialize(target:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9854 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9810 + def accept(visitor); end + + # [BodyStmt] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#9798 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9814 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9801 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9818 + def copy(target: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9814 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9832 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9841 + def format(q); end + + # [Node] the target of the singleton class to enter + # + # source://syntax_tree//lib/syntax_tree/node.rb#9795 + def target; end +end + +# Provides an interface for searching for a pattern of nodes against a +# subtree of an AST. +# +# source://syntax_tree//lib/syntax_tree/search.rb#6 +class SyntaxTree::Search + # @return [Search] a new instance of Search + # + # source://syntax_tree//lib/syntax_tree/search.rb#9 + def initialize(pattern); end + + # Returns the value of attribute pattern. + # + # source://syntax_tree//lib/syntax_tree/search.rb#7 + def pattern; end + + # source://syntax_tree//lib/syntax_tree/search.rb#13 + def scan(root); end +end + +# Everything that has a block of code inside of it has a list of statements. +# Normally we would just track those as a node that has an array body, but we +# have some special handling in order to handle empty statement lists. They +# need to have the right location information, so all of the parent node of +# stmts nodes will report back down the location information. We then +# propagate that onto void_stmt nodes inside the stmts in order to make sure +# all comments get printed appropriately. +# +# source://syntax_tree//lib/syntax_tree/node.rb#9867 +class SyntaxTree::Statements < ::SyntaxTree::Node + # @return [Statements] a new instance of Statements + # + # source://syntax_tree//lib/syntax_tree/node.rb#9874 + def initialize(body:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10000 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9927 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9880 + def bind(parser, start_char, start_column, end_char, end_column); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9909 + def bind_end(end_char, end_column); end + + # [Array[ Node ]] the list of expressions contained within this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9869 + def body; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9931 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9872 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9935 + def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9931 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9948 + def deconstruct_keys(_keys); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#9921 + def empty?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9952 + def format(q); end + + private + + # As efficiently as possible, gather up all of the comments that have been + # found while this statements list was being parsed and add them into the + # body. + # + # source://syntax_tree//lib/syntax_tree/node.rb#10009 + def attach_comments(parser, start_char, end_char); end +end + +# StringConcat represents concatenating two strings together using a backward +# slash. +# +# "first" \ +# "second" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10124 +class SyntaxTree::StringConcat < ::SyntaxTree::Node + # @return [StringConcat] a new instance of StringConcat + # + # source://syntax_tree//lib/syntax_tree/node.rb#10135 + def initialize(left:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10179 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10142 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10146 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10133 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10150 + def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10146 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10164 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10168 + def format(q); end + + # [Heredoc | StringConcat | StringLiteral] the left side of the + # concatenation + # + # source://syntax_tree//lib/syntax_tree/node.rb#10127 + def left; end + + # [StringLiteral] the right side of the concatenation + # + # source://syntax_tree//lib/syntax_tree/node.rb#10130 + def right; end +end + +# StringContent represents the contents of a string-like value. +# +# "string" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10051 +class SyntaxTree::StringContent < ::SyntaxTree::Node + # @return [StringContent] a new instance of StringContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#10059 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10086 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10065 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10069 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10057 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10073 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10069 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10082 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10090 + def format(q); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # string + # + # source://syntax_tree//lib/syntax_tree/node.rb#10054 + def parts; end +end + +# StringDVar represents shorthand interpolation of a variable into a string. +# It allows you to take an instance variable, class variable, or global +# variable and omit the braces when interpolating. +# +# "#@variable" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10190 +class SyntaxTree::StringDVar < ::SyntaxTree::Node + # @return [StringDVar] a new instance of StringDVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#10197 + def initialize(variable:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10234 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10203 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10207 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10195 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10211 + def copy(variable: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10207 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10224 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10228 + def format(q); end + + # [Backref | VarRef] the variable being interpolated + # + # source://syntax_tree//lib/syntax_tree/node.rb#10192 + def variable; end +end + +# StringEmbExpr represents interpolated content. It can be contained within a +# couple of different parent nodes, including regular expressions, strings, +# and dynamic symbols. +# +# "string #{expression}" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10245 +class SyntaxTree::StringEmbExpr < ::SyntaxTree::Node + # @return [StringEmbExpr] a new instance of StringEmbExpr + # + # source://syntax_tree//lib/syntax_tree/node.rb#10252 + def initialize(statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10309 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10258 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10262 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10250 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10266 + def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10262 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10279 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10283 + def format(q); end + + # [Statements] the expressions to be interpolated + # + # source://syntax_tree//lib/syntax_tree/node.rb#10247 + def statements; end +end + +# StringLiteral represents a string literal. +# +# "string" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10318 +class SyntaxTree::StringLiteral < ::SyntaxTree::Node + # @return [StringLiteral] a new instance of StringLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#10329 + def initialize(parts:, quote:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10403 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10336 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10340 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10327 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10344 + def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10340 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10358 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10362 + def format(q); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # string literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10321 + def parts; end + + # [nil | String] which quote was used by the string literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10324 + def quote; end +end + +# Super represents using the +super+ keyword with arguments. It can optionally +# use parentheses. +# +# super(value) +# +# source://syntax_tree//lib/syntax_tree/node.rb#10414 +class SyntaxTree::Super < ::SyntaxTree::Node + # @return [Super] a new instance of Super + # + # source://syntax_tree//lib/syntax_tree/node.rb#10421 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10465 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10427 + def accept(visitor); end + + # [ArgParen | Args] the arguments to the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#10416 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10431 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10419 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10435 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10431 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10448 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10452 + def format(q); end +end + +# SymBeg represents the beginning of a symbol literal. +# +# :symbol +# +# SymBeg is also used for dynamic symbols, as in: +# +# :"symbol" +# +# Finally, SymBeg is also used for symbols using the %s syntax, as in: +# +# %s[symbol] +# +# The value of this node is a string. In most cases (as in the first example +# above) it will contain just ":". In the case of dynamic symbols it will +# contain ":'" or ":\"". In the case of %s symbols, it will contain the start +# of the symbol including the %s and the delimiter. +# +# source://syntax_tree//lib/syntax_tree/node.rb#10486 +class SyntaxTree::SymBeg < ::SyntaxTree::Node + # @return [SymBeg] a new instance of SymBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#10490 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10516 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10495 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10499 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10503 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10499 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10512 + def deconstruct_keys(_keys); end + + # [String] the beginning of the symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#10488 + def value; end +end + +# SymbolContent represents symbol contents and is always the child of a +# SymbolLiteral node. +# +# :symbol +# +# source://syntax_tree//lib/syntax_tree/node.rb#10526 +class SyntaxTree::SymbolContent < ::SyntaxTree::Node + # @return [SymbolContent] a new instance of SymbolContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#10531 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10557 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10536 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10540 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10544 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10540 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10553 + def deconstruct_keys(_keys); end + + # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op] the value of the + # symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#10529 + def value; end +end + +# SymbolLiteral represents a symbol in the system with no interpolation +# (as opposed to a DynaSymbol which has interpolation). +# +# :symbol +# +# source://syntax_tree//lib/syntax_tree/node.rb#10567 +class SyntaxTree::SymbolLiteral < ::SyntaxTree::Node + # @return [SymbolLiteral] a new instance of SymbolLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#10575 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10612 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10581 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10585 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10573 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10589 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10585 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10602 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10606 + def format(q); end + + # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op | TStringContent] + # the value of the symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#10570 + def value; end +end + +# Symbols represents a symbol array literal with interpolation. +# +# %I[one two three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#10621 +class SyntaxTree::Symbols < ::SyntaxTree::Node + # @return [Symbols] a new instance of Symbols + # + # source://syntax_tree//lib/syntax_tree/node.rb#10631 + def initialize(beginning:, elements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10687 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10638 + def accept(visitor); end + + # [SymbolsBeg] the token that opens this array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10623 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10642 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10629 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10646 + def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10642 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10656 + def deconstruct_keys(_keys); end + + # [Array[ Word ]] the words in the symbol array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10626 + def elements; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10665 + def format(q); end +end + +# SymbolsBeg represents the start of a symbol array literal with +# interpolation. +# +# %I[one two three] +# +# In the snippet above, SymbolsBeg represents the "%I[" token. Note that these +# kinds of arrays can start with a lot of different delimiter types +# (e.g., %I| or %I<). +# +# source://syntax_tree//lib/syntax_tree/node.rb#10701 +class SyntaxTree::SymbolsBeg < ::SyntaxTree::Node + # @return [SymbolsBeg] a new instance of SymbolsBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#10705 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10731 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10710 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10714 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10718 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10714 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10727 + def deconstruct_keys(_keys); end + + # [String] the beginning of the symbol literal array + # + # source://syntax_tree//lib/syntax_tree/node.rb#10703 + def value; end +end + +# TLamBeg represents the beginning of the body of a lambda literal using +# braces. +# +# -> { value } +# +# In the example above the TLamBeg represents the +{+ operator. +# +# source://syntax_tree//lib/syntax_tree/node.rb#10782 +class SyntaxTree::TLamBeg < ::SyntaxTree::Node + # @return [TLamBeg] a new instance of TLamBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#10786 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10812 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10791 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10795 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10799 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10795 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10808 + def deconstruct_keys(_keys); end + + # [String] the beginning of the body of the lambda literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10784 + def value; end +end + +# TLambda represents the beginning of a lambda literal. +# +# -> { value } +# +# In the example above the TLambda represents the +->+ operator. +# +# source://syntax_tree//lib/syntax_tree/node.rb#10741 +class SyntaxTree::TLambda < ::SyntaxTree::Node + # @return [TLambda] a new instance of TLambda + # + # source://syntax_tree//lib/syntax_tree/node.rb#10745 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10771 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10750 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10754 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10758 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10754 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10767 + def deconstruct_keys(_keys); end + + # [String] the beginning of the lambda literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10743 + def value; end +end + +# TStringBeg represents the beginning of a string literal. +# +# "string" +# +# In the example above, TStringBeg represents the first set of quotes. Strings +# can also use single quotes. They can also be declared using the +%q+ and +# +%Q+ syntax, as in: +# +# %q{string} +# +# source://syntax_tree//lib/syntax_tree/node.rb#10934 +class SyntaxTree::TStringBeg < ::SyntaxTree::Node + # @return [TStringBeg] a new instance of TStringBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#10938 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10964 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10943 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10947 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10951 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10947 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10960 + def deconstruct_keys(_keys); end + + # [String] the beginning of the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#10936 + def value; end +end + +# TStringContent represents plain characters inside of an entity that accepts +# string content like a string, heredoc, command string, or regular +# expression. +# +# "string" +# +# In the example above, TStringContent represents the +string+ token contained +# within the string. +# +# source://syntax_tree//lib/syntax_tree/node.rb#10977 +class SyntaxTree::TStringContent < ::SyntaxTree::Node + # @return [TStringContent] a new instance of TStringContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#10984 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11023 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10994 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10998 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10982 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11002 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10998 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11015 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11019 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#10990 + def match?(pattern); end + + # [String] the content of the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#10979 + def value; end +end + +# TStringEnd represents the end of a string literal. +# +# "string" +# +# In the example above, TStringEnd represents the second set of quotes. +# Strings can also use single quotes. They can also be declared using the +%q+ +# and +%Q+ syntax, as in: +# +# %q{string} +# +# source://syntax_tree//lib/syntax_tree/node.rb#11038 +class SyntaxTree::TStringEnd < ::SyntaxTree::Node + # @return [TStringEnd] a new instance of TStringEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#11042 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11068 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11047 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11051 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11055 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11051 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11064 + def deconstruct_keys(_keys); end + + # [String] the end of the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#11040 + def value; end +end + +# In order for an `if` or `unless` expression to be shortened to a ternary, +# there has to be one and only one consequent clause which is an Else. Both +# the body of the main node and the body of the Else node must have only one +# statement, and that statement must not be on the denied list of potential +# statements. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6254 +module SyntaxTree::Ternaryable + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#6256 + def call(q, node); end + + private + + # Certain expressions cannot be reduced to a ternary without adding + # parentheses around them. In this case we say they cannot be ternaried + # and default instead to breaking them into multiple lines. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#6294 + def ternaryable?(statement); end + end +end + +# TopConstField is always the child node of some kind of assignment. It +# represents when you're assigning to a constant that is being referenced at +# the top level. +# +# ::Constant = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#10823 +class SyntaxTree::TopConstField < ::SyntaxTree::Node + # @return [TopConstField] a new instance of TopConstField + # + # source://syntax_tree//lib/syntax_tree/node.rb#10830 + def initialize(constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10866 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10836 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10840 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10828 + def comments; end + + # [Const] the constant being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#10825 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10844 + def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10840 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10857 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10861 + def format(q); end +end + +# TopConstRef is very similar to TopConstField except that it is not involved +# in an assignment. +# +# ::Constant +# +# source://syntax_tree//lib/syntax_tree/node.rb#10876 +class SyntaxTree::TopConstRef < ::SyntaxTree::Node + # @return [TopConstRef] a new instance of TopConstRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#10883 + def initialize(constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10919 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10889 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10893 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10881 + def comments; end + + # [Const] the constant being referenced + # + # source://syntax_tree//lib/syntax_tree/node.rb#10878 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10897 + def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10893 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10910 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10914 + def format(q); end +end + +# This module is responsible for translating the Syntax Tree syntax tree into +# other representations. +# +# source://syntax_tree//lib/syntax_tree/translation.rb#6 +module SyntaxTree::Translation + class << self + # This method translates the given node into the representation defined by + # the whitequark/parser gem. We don't explicitly list it as a dependency + # because it's not required for the core functionality of Syntax Tree. + # + # source://syntax_tree//lib/syntax_tree/translation.rb#10 + def to_parser(node, buffer); end + + # This method translates the given node into the representation defined by + # the rubocop/rubocop-ast gem. We don't explicitly list it as a dependency + # because it's not required for the core functionality of Syntax Tree. + # + # source://syntax_tree//lib/syntax_tree/translation.rb#20 + def to_rubocop_ast(node, buffer); end + end +end + +# Unary represents a unary method being called on an expression, as in +!+ or +# +~+. +# +# !value +# +# source://syntax_tree//lib/syntax_tree/node.rb#11161 +class SyntaxTree::Unary < ::SyntaxTree::Node + # @return [Unary] a new instance of Unary + # + # source://syntax_tree//lib/syntax_tree/node.rb#11171 + def initialize(operator:, statement:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11214 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11178 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11182 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11169 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11186 + def copy(operator: T.unsafe(nil), statement: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11182 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11200 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11209 + def format(q); end + + # [String] the operator being used + # + # source://syntax_tree//lib/syntax_tree/node.rb#11163 + def operator; end + + # [Node] the statement on which to operate + # + # source://syntax_tree//lib/syntax_tree/node.rb#11166 + def statement; end +end + +# Undef represents the use of the +undef+ keyword. +# +# undef method +# +# source://syntax_tree//lib/syntax_tree/node.rb#11224 +class SyntaxTree::Undef < ::SyntaxTree::Node + # @return [Undef] a new instance of Undef + # + # source://syntax_tree//lib/syntax_tree/node.rb#11255 + def initialize(symbols:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11298 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11261 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11265 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11253 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11269 + def copy(symbols: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11265 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11282 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11286 + def format(q); end + + # [Array[ DynaSymbol | SymbolLiteral ]] the symbols to undefine + # + # source://syntax_tree//lib/syntax_tree/node.rb#11250 + def symbols; end +end + +# Undef accepts a variable number of arguments that can be either DynaSymbol +# or SymbolLiteral objects. For SymbolLiteral objects we descend directly +# into the value in order to have it come out as bare words. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11228 +class SyntaxTree::Undef::UndefArgumentFormatter + # @return [UndefArgumentFormatter] a new instance of UndefArgumentFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#11232 + def initialize(node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11236 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11244 + def format(q); end + + # [DynaSymbol | SymbolLiteral] the symbol to undefine + # + # source://syntax_tree//lib/syntax_tree/node.rb#11230 + def node; end +end + +# Unless represents the first clause in an +unless+ chain. +# +# unless predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#11308 +class SyntaxTree::UnlessNode < ::SyntaxTree::Node + # @return [UnlessNode] a new instance of UnlessNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#11321 + def initialize(predicate:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11366 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11329 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11333 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11319 + def comments; end + + # [nil | Elsif | Else] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#11316 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11337 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11333 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11352 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11362 + def format(q); end + + # Checks if the node was originally found in the modifier form. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#11372 + def modifier?; end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#11310 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#11313 + def statements; end +end + +# Until represents an +until+ loop. +# +# until predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#11454 +class SyntaxTree::UntilNode < ::SyntaxTree::Node + # @return [UntilNode] a new instance of UntilNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#11464 + def initialize(predicate:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11506 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11471 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11475 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11462 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11479 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11475 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11493 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11502 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#11511 + def modifier?; end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#11456 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#11459 + def statements; end +end + +# VCall represent any plain named object with Ruby that could be either a +# local variable or a method call. +# +# variable +# +# source://syntax_tree//lib/syntax_tree/node.rb#11716 +class SyntaxTree::VCall < ::SyntaxTree::Node + # @return [VCall] a new instance of VCall + # + # source://syntax_tree//lib/syntax_tree/node.rb#11723 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11758 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11729 + def accept(visitor); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#11762 + def access_control?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11766 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11733 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11721 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11737 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11733 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11750 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11754 + def format(q); end + + # [Ident] the value of this expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#11718 + def value; end +end + +# source://syntax_tree//lib/syntax_tree/version.rb#4 +SyntaxTree::VERSION = T.let(T.unsafe(nil), String) + +# VarField represents a variable that is being assigned a value. As such, it +# is always a child of an assignment type node. +# +# variable = value +# +# In the example above, the VarField node represents the +variable+ token. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11522 +class SyntaxTree::VarField < ::SyntaxTree::Node + # @return [VarField] a new instance of VarField + # + # source://syntax_tree//lib/syntax_tree/node.rb#11529 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11568 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11535 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11539 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11527 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11543 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11539 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11556 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11560 + def format(q); end + + # [nil | :nil | Const | CVar | GVar | Ident | IVar] the target of this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11524 + def value; end +end + +# VarRef represents a variable reference. +# +# true +# +# This can be a plain local variable like the example above. It can also be a +# constant, a class variable, a global variable, an instance variable, a +# keyword (like +self+, +nil+, +true+, or +false+), or a numbered block +# variable. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11581 +class SyntaxTree::VarRef < ::SyntaxTree::Node + # @return [VarRef] a new instance of VarRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#11588 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11623 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11594 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11598 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11586 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11602 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11598 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11615 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11619 + def format(q); end + + # Oh man I hate this so much. Basically, ripper doesn't provide enough + # functionality to actually know where pins are within an expression. So we + # have to walk the tree ourselves and insert more information. In doing so, + # we have to replace this node by a pinned node when necessary. + # + # To be clear, this method should just not exist. It's not good. It's a + # place of shame. But it's necessary for now, so I'm keeping it. + # + # source://syntax_tree//lib/syntax_tree/node.rb#11634 + def pin(parent, pin); end + + # [Const | CVar | GVar | Ident | IVar | Kw] the value of this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11583 + def value; end +end + +# Visitor is a parent class that provides the ability to walk down the tree +# and handle a subset of nodes. By defining your own subclass, you can +# explicitly handle a node type by defining a visit_* method. +# +# source://syntax_tree//lib/syntax_tree/visitor.rb#7 +class SyntaxTree::Visitor < ::SyntaxTree::BasicVisitor + # Visit a BEGINBlock node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_BEGIN(node); end + + # Visit a CHAR node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_CHAR(node); end + + # Visit an ENDBlock node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_END(node); end + + # Visit an EndContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit___end__(node); end + + # Visit an AliasNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_alias(node); end + + # Visit an ARef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_aref(node); end + + # Visit an ARefField node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_aref_field(node); end + + # Visit an ArgBlock node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_arg_block(node); end + + # Visit an ArgParen node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_arg_paren(node); end + + # Visit an ArgStar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_arg_star(node); end + + # Visit an Args node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_args(node); end + + # Visit an ArgsForward node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_args_forward(node); end + + # Visit an ArrayLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_array(node); end + + # Visit an AryPtn node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_aryptn(node); end + + # Visit an Assign node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_assign(node); end + + # Visit an Assoc node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_assoc(node); end + + # Visit an AssocSplat node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_assoc_splat(node); end + + # Visit a Backref node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_backref(node); end + + # Visit a Backtick node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_backtick(node); end + + # Visit a BareAssocHash node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_bare_assoc_hash(node); end + + # Visit a Begin node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_begin(node); end + + # Visit a Binary node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_binary(node); end + + # Visit a Block node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_block(node); end + + # Visit a BlockVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_block_var(node); end + + # Visit a BlockArg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_blockarg(node); end + + # Visit a BodyStmt node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_bodystmt(node); end + + # Visit a Break node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_break(node); end + + # Visit a Call node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_call(node); end + + # Visit a Case node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_case(node); end + + # Visit a ClassDeclaration node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_class(node); end + + # Visit a Comma node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_comma(node); end + + # Visit a Command node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_command(node); end + + # Visit a CommandCall node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_command_call(node); end + + # Visit a Comment node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_comment(node); end + + # Visit a Const node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_const(node); end + + # Visit a ConstPathField node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_const_path_field(node); end + + # Visit a ConstPathRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_const_path_ref(node); end + + # Visit a ConstRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_const_ref(node); end + + # Visit a CVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_cvar(node); end + + # Visit a Def node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_def(node); end + + # Visit a Defined node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_defined(node); end + + # Visit a DynaSymbol node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_dyna_symbol(node); end + + # Visit an Else node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_else(node); end + + # Visit an Elsif node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_elsif(node); end + + # Visit an EmbDoc node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_embdoc(node); end + + # Visit an EmbExprBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_embexpr_beg(node); end + + # Visit an EmbExprEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_embexpr_end(node); end + + # Visit an EmbVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_embvar(node); end + + # Visit an Ensure node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_ensure(node); end + + # Visit an ExcessedComma node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_excessed_comma(node); end + + # Visit a Field node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_field(node); end + + # Visit a FloatLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_float(node); end + + # Visit a FndPtn node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_fndptn(node); end + + # Visit a For node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_for(node); end + + # Visit a GVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_gvar(node); end + + # Visit a HashLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_hash(node); end + + # Visit a Heredoc node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_heredoc(node); end + + # Visit a HeredocBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_heredoc_beg(node); end + + # Visit a HeredocEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_heredoc_end(node); end + + # Visit a HshPtn node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_hshptn(node); end + + # Visit an Ident node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_ident(node); end + + # Visit an IfNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_if(node); end + + # Visit an IfOp node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_if_op(node); end + + # Visit an Imaginary node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_imaginary(node); end + + # Visit an In node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_in(node); end + + # Visit an Int node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_int(node); end + + # Visit an IVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_ivar(node); end + + # Visit a Kw node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_kw(node); end + + # Visit a KwRestParam node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_kwrest_param(node); end + + # Visit a Label node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_label(node); end + + # Visit a LabelEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_label_end(node); end + + # Visit a Lambda node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lambda(node); end + + # Visit a LambdaVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lambda_var(node); end + + # Visit a LBrace node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lbrace(node); end + + # Visit a LBracket node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lbracket(node); end + + # Visit a LParen node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lparen(node); end + + # Visit a MAssign node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_massign(node); end + + # Visit a MethodAddBlock node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_method_add_block(node); end + + # Visit a MLHS node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_mlhs(node); end + + # Visit a MLHSParen node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_mlhs_paren(node); end + + # Visit a ModuleDeclaration node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_module(node); end + + # Visit a MRHS node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_mrhs(node); end + + # Visit a Next node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_next(node); end + + # Visit a Not node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_not(node); end + + # Visit an Op node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_op(node); end + + # Visit an OpAssign node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_opassign(node); end + + # Visit a Params node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_params(node); end + + # Visit a Paren node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_paren(node); end + + # Visit a Period node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_period(node); end + + # Visit a PinnedBegin node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_pinned_begin(node); end + + # Visit a PinnedVarRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_pinned_var_ref(node); end + + # Visit a Program node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_program(node); end + + # Visit a QSymbols node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_qsymbols(node); end + + # Visit a QSymbolsBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_qsymbols_beg(node); end + + # Visit a QWords node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_qwords(node); end + + # Visit a QWordsBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_qwords_beg(node); end + + # Visit a RangeNode node + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_range(node); end + + # Visit a RAssign node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rassign(node); end + + # Visit a RationalLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rational(node); end + + # Visit a RBrace node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rbrace(node); end + + # Visit a RBracket node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rbracket(node); end + + # Visit a Redo node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_redo(node); end + + # Visit a RegexpBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_regexp_beg(node); end + + # Visit a RegexpContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_regexp_content(node); end + + # Visit a RegexpEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_regexp_end(node); end + + # Visit a RegexpLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_regexp_literal(node); end + + # Visit a Rescue node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rescue(node); end + + # Visit a RescueEx node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rescue_ex(node); end + + # Visit a RescueMod node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rescue_mod(node); end + + # Visit a RestParam node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rest_param(node); end + + # Visit a Retry node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_retry(node); end + + # Visit a Return node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_return(node); end + + # Visit a RParen node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rparen(node); end + + # Visit a SClass node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_sclass(node); end + + # Visit a Statements node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_statements(node); end + + # Visit a StringConcat node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_concat(node); end + + # Visit a StringContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_content(node); end + + # Visit a StringDVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_dvar(node); end + + # Visit a StringEmbExpr node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_embexpr(node); end + + # Visit a StringLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_literal(node); end + + # Visit a Super node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_super(node); end + + # Visit a SymBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbeg(node); end + + # Visit a SymbolContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbol_content(node); end + + # Visit a SymbolLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbol_literal(node); end + + # Visit a Symbols node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbols(node); end + + # Visit a SymbolsBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbols_beg(node); end + + # Visit a TLambda node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tlambda(node); end + + # Visit a TLamBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tlambeg(node); end + + # Visit a TopConstField node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_top_const_field(node); end + + # Visit a TopConstRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_top_const_ref(node); end + + # Visit a TStringBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tstring_beg(node); end + + # Visit a TStringContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tstring_content(node); end + + # Visit a TStringEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tstring_end(node); end + + # Visit an Unary node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_unary(node); end + + # Visit an Undef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_undef(node); end + + # Visit an UnlessNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_unless(node); end + + # Visit an UntilNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_until(node); end + + # Visit a VarField node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_var_field(node); end + + # Visit a VarRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_var_ref(node); end + + # Visit a VCall node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_vcall(node); end + + # Visit a VoidStmt node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_void_stmt(node); end + + # Visit a When node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_when(node); end + + # Visit a WhileNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_while(node); end + + # Visit a Word node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_word(node); end + + # Visit a Words node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_words(node); end + + # Visit a WordsBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_words_beg(node); end + + # Visit a XString node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_xstring(node); end + + # Visit a XStringLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_xstring_literal(node); end + + # Visit a YieldNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_yield(node); end + + # Visit a ZSuper node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_zsuper(node); end +end + +# VoidStmt represents an empty lexical block of code. +# +# ;; +# +# source://syntax_tree//lib/syntax_tree/node.rb#11775 +class SyntaxTree::VoidStmt < ::SyntaxTree::Node + # @return [VoidStmt] a new instance of VoidStmt + # + # source://syntax_tree//lib/syntax_tree/node.rb#11779 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11808 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11784 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11788 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11777 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11792 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11788 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11801 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11805 + def format(q); end +end + +# When represents a +when+ clause in a +case+ chain. +# +# case value +# when predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#11819 +class SyntaxTree::When < ::SyntaxTree::Node + # @return [When] a new instance of When + # + # source://syntax_tree//lib/syntax_tree/node.rb#11832 + def initialize(arguments:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11924 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11840 + def accept(visitor); end + + # [Args] the arguments to the when clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#11821 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11844 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11830 + def comments; end + + # [nil | Else | When] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#11827 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11848 + def copy(arguments: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11844 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11863 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11889 + def format(q); end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#11824 + def statements; end +end + +# We're going to keep a single instance of this separator around so we don't +# have to allocate a new one every time we format a when clause. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11887 +SyntaxTree::When::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::When::Separator) + +# We have a special separator here for when clauses which causes them to +# fill as much of the line as possible as opposed to everything breaking +# into its own line as soon as you hit the print limit. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11876 +class SyntaxTree::When::Separator + # source://syntax_tree//lib/syntax_tree/node.rb#11877 + def call(q); end +end + +# While represents a +while+ loop. +# +# while predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#11935 +class SyntaxTree::WhileNode < ::SyntaxTree::Node + # @return [WhileNode] a new instance of WhileNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#11945 + def initialize(predicate:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11987 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11952 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11956 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11943 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11960 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11956 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11974 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11983 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#11992 + def modifier?; end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#11937 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#11940 + def statements; end +end + +# WithScope is a module intended to be included in classes inheriting from +# Visitor. The module overrides a few visit methods to automatically keep +# track of local variables and arguments defined in the current scope. +# Example usage: +# +# class MyVisitor < Visitor +# include WithScope +# +# def visit_ident(node) +# # Check if we're visiting an identifier for an argument, a local +# # variable or something else +# local = current_scope.find_local(node) +# +# if local.type == :argument +# # handle identifiers for arguments +# elsif local.type == :variable +# # handle identifiers for variables +# else +# # handle other identifiers, such as method names +# end +# end +# end +# +# source://syntax_tree//lib/syntax_tree/with_scope.rb#27 +module SyntaxTree::WithScope + # source://syntax_tree//lib/syntax_tree/with_scope.rb#122 + def initialize(*args, **kwargs, &block); end + + # Returns the value of attribute current_scope. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#120 + def current_scope; end + + # Visit for capturing local variables defined in regex named capture groups + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#236 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#189 + def visit_block_var(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#182 + def visit_blockarg(node); end + + # Visits for nodes that create new scopes, such as classes, modules + # and method definitions. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#131 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#147 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#175 + def visit_kwrest_param(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#189 + def visit_lambda_var(node); end + + # When we find a method invocation with a block, only the code that happens + # inside of the block needs a fresh scope. The method invocation + # itself happens in the same scope. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#142 + def visit_method_add_block(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#135 + def visit_module(node); end + + # Visit for keeping track of local arguments, such as method and block + # arguments. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#153 + def visit_params(node); end + + # Visit for keeping track of local variable definitions + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#207 + def visit_pinned_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#168 + def visit_rest_param(node); end + + # Visit for keeping track of local variable definitions + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#199 + def visit_var_field(node); end + + # Visits for keeping track of variable and argument usages + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#215 + def visit_var_ref(node); end + + # When using regex named capture groups, vcalls might actually be a variable + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#227 + def visit_vcall(node); end + + private + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#285 + def add_argument_definitions(list); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#299 + def next_scope_id; end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#303 + def with_scope(parent_scope = T.unsafe(nil)); end +end + +# The scope class is used to keep track of local variables and arguments +# inside a particular scope. +# +# source://syntax_tree//lib/syntax_tree/with_scope.rb#30 +class SyntaxTree::WithScope::Scope + # @return [Scope] a new instance of Scope + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#68 + def initialize(id, parent = T.unsafe(nil)); end + + # Adding a local definition will either insert a new entry in the locals + # hash or append a new definition location to an existing local. Notice + # that it's not possible to change the type of a local after it has been + # registered. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#78 + def add_local_definition(identifier, type); end + + # Adding a local usage will either insert a new entry in the locals + # hash or append a new usage location to an existing local. Notice that + # it's not possible to change the type of a local after it has been + # registered. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#95 + def add_local_usage(identifier, type); end + + # Try to find the local given its name in this scope or any of its + # parents. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#102 + def find_local(name); end + + # [Integer] a unique identifier for this scope + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#59 + def id; end + + # [Hash[String, Local]] The local variables and arguments defined in this + # scope + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#66 + def locals; end + + # [scope | nil] The parent scope + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#62 + def parent; end + + private + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#108 + def resolve_local(name, type); end +end + +# This class tracks the occurrences of a local variable or argument. +# +# source://syntax_tree//lib/syntax_tree/with_scope.rb#32 +class SyntaxTree::WithScope::Scope::Local + # @return [Local] a new instance of Local + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#43 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#49 + def add_definition(location); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#53 + def add_usage(location); end + + # [Array[Location]] The locations of all definitions and assignments of + # this local + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#38 + def definitions; end + + # [Symbol] The type of the local (e.g. :argument, :variable) + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#34 + def type; end + + # [Array[Location]] The locations of all usages of this local + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#41 + def usages; end +end + +# Word represents an element within a special array literal that accepts +# interpolation. +# +# %W[a#{b}c xyz] +# +# In the example above, there would be two Word nodes within a parent Words +# node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#12004 +class SyntaxTree::Word < ::SyntaxTree::Node + # @return [Word] a new instance of Word + # + # source://syntax_tree//lib/syntax_tree/node.rb#12012 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12051 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12022 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12026 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12010 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12030 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12026 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12043 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12047 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#12018 + def match?(pattern); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # word + # + # source://syntax_tree//lib/syntax_tree/node.rb#12007 + def parts; end +end + +# Words represents a string literal array with interpolation. +# +# %W[one two three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#12060 +class SyntaxTree::Words < ::SyntaxTree::Node + # @return [Words] a new instance of Words + # + # source://syntax_tree//lib/syntax_tree/node.rb#12070 + def initialize(beginning:, elements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12126 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12077 + def accept(visitor); end + + # [WordsBeg] the token that opens this array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#12062 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12081 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12068 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12085 + def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12081 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12095 + def deconstruct_keys(_keys); end + + # [Array[ Word ]] the elements of this array + # + # source://syntax_tree//lib/syntax_tree/node.rb#12065 + def elements; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12104 + def format(q); end +end + +# WordsBeg represents the beginning of a string literal array with +# interpolation. +# +# %W[one two three] +# +# In the snippet above, a WordsBeg would be created with the value of "%W[". +# Note that these kinds of arrays can start with a lot of different delimiter +# types (e.g., %W| or %W<). +# +# source://syntax_tree//lib/syntax_tree/node.rb#12140 +class SyntaxTree::WordsBeg < ::SyntaxTree::Node + # @return [WordsBeg] a new instance of WordsBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#12144 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12170 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12149 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12153 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12157 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12153 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12166 + def deconstruct_keys(_keys); end + + # [String] the start of the word literal array + # + # source://syntax_tree//lib/syntax_tree/node.rb#12142 + def value; end +end + +# XString represents the contents of an XStringLiteral. +# +# `ls` +# +# source://syntax_tree//lib/syntax_tree/node.rb#12179 +class SyntaxTree::XString < ::SyntaxTree::Node + # @return [XString] a new instance of XString + # + # source://syntax_tree//lib/syntax_tree/node.rb#12184 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12210 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12189 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12193 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12197 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12193 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12206 + def deconstruct_keys(_keys); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # xstring + # + # source://syntax_tree//lib/syntax_tree/node.rb#12182 + def parts; end +end + +# XStringLiteral represents a string that gets executed. +# +# `ls` +# +# source://syntax_tree//lib/syntax_tree/node.rb#12219 +class SyntaxTree::XStringLiteral < ::SyntaxTree::Node + # @return [XStringLiteral] a new instance of XStringLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#12227 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12264 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12233 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12237 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12225 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12241 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12237 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12254 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12258 + def format(q); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # xstring + # + # source://syntax_tree//lib/syntax_tree/node.rb#12222 + def parts; end +end + +# This module provides an object representation of the YARV bytecode. +# +# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#4 +module SyntaxTree::YARV + class << self + # A convenience method for creating a CallData object. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#88 + def calldata(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end + + # Compile the given source into a YARV instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv.rb#25 + def compile(source, options = T.unsafe(nil)); end + + # Compile and interpret the given source. + # + # source://syntax_tree//lib/syntax_tree/yarv.rb#30 + def interpret(source, options = T.unsafe(nil)); end + end +end + +# ### Summary +# +# `adjuststack` accepts a single integer argument and removes that many +# elements from the top of the stack. +# +# ### Usage +# +# ~~~ruby +# x = [true] +# x[0] ||= nil +# x[0] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#69 +class SyntaxTree::YARV::AdjustStack < ::SyntaxTree::YARV::Instruction + # @return [AdjustStack] a new instance of AdjustStack + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#72 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#88 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#100 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#84 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#76 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#92 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#70 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#96 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#80 + def to_a(_iseq); end +end + +# ### Summary +# +# `anytostring` ensures that the value on top of the stack is a string. +# +# It pops two values off the stack. If the first value is a string it +# pushes it back on the stack. If the first value is not a string, it uses +# Ruby's built in string coercion to coerce the second value to a string +# and then pushes that back on the stack. +# +# This is used in conjunction with `objtostring` as a fallback for when an +# object's `to_s` method does not return a string. +# +# ### Usage +# +# ~~~ruby +# "#{5}" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#123 +class SyntaxTree::YARV::AnyToString < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#136 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#148 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#132 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#124 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#140 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#144 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#128 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#5 +class SyntaxTree::YARV::Assembler + # @return [Assembler] a new instance of Assembler + # + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#66 + def initialize(lines); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#70 + def assemble; end + + # Returns the value of attribute lines. + # + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#64 + def lines; end + + private + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#88 + def assemble_iseq(iseq, lines); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#408 + def find_local(iseq, operands); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#417 + def parse(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#449 + def parse_calldata(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#444 + def parse_nested(lines); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#432 + def parse_number(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#424 + def parse_options(value, options); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#436 + def parse_string(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#440 + def parse_symbol(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#428 + def parse_type(value, type); end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#78 + def assemble(source); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#82 + def assemble_file(filepath); end + end +end + +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#28 +SyntaxTree::YARV::Assembler::CALLDATA_FLAGS = T.let(T.unsafe(nil), Hash) + +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#43 +SyntaxTree::YARV::Assembler::DEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#6 +class SyntaxTree::YARV::Assembler::ObjectVisitor < ::SyntaxTree::YARV::Compiler::RubyVisitor + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#7 + def visit_dyna_symbol(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#15 + def visit_string_literal(node); end +end + +# This object represents a single basic block, wherein all contained +# instructions do not branch except for the last one. +# +# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#7 +class SyntaxTree::YARV::BasicBlock + # @return [BasicBlock] a new instance of BasicBlock + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#23 + def initialize(block_start, insns); end + + # This is the index into the list of instructions where this block starts. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#12 + def block_start; end + + # Yield each instruction in this basic block along with its index from the + # original instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#35 + def each_with_length; end + + # This is the unique identifier for this basic block. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#9 + def id; end + + # This is an array of basic blocks that lead into this block. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#18 + def incoming_blocks; end + + # This is the set of instructions that this block contains. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#15 + def insns; end + + # This is an array of basic blocks that this block leads into. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#21 + def outgoing_blocks; end + + # This method is used to verify that the basic block is well formed. It + # checks that the only instruction in this basic block that branches is + # the last instruction. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#48 + def verify; end +end + +# Parses the given source code into a syntax tree, compiles that syntax tree +# into YARV bytecode. +# +# source://syntax_tree//lib/syntax_tree/yarv/bf.rb#7 +class SyntaxTree::YARV::Bf + # @return [Bf] a new instance of Bf + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#10 + def initialize(source); end + + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#14 + def compile; end + + # Returns the value of attribute source. + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#8 + def source; end + + private + + # $tape[$cursor] += value + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#84 + def change_by(iseq, value); end + + # $tape[$cursor] = $stdin.getc.ord + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#133 + def input_char(iseq); end + + # Jump back to the start of the loop. + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#163 + def loop_end(iseq, start_label, end_label); end + + # unless $tape[$cursor] == 0 + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#146 + def loop_start(iseq); end + + # $stdout.putc($tape[$cursor].chr) + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#120 + def output_char(iseq); end + + # $cursor += value + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#105 + def shift_by(iseq, value); end +end + +# ### Summary +# +# `branchif` has one argument: the jump index. It pops one value off the +# stack: the jump condition. +# +# If the value popped off the stack is true, `branchif` jumps to +# the jump index and continues executing there. +# +# ### Usage +# +# ~~~ruby +# x = true +# x ||= "foo" +# puts x +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#175 +class SyntaxTree::YARV::BranchIf < ::SyntaxTree::YARV::Instruction + # @return [BranchIf] a new instance of BranchIf + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#178 + def initialize(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#194 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#210 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#206 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#190 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#182 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#214 + def falls_through?; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#176 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#198 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#202 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#186 + def to_a(_iseq); end +end + +# ### Summary +# +# `branchnil` has one argument: the jump index. It pops one value off the +# stack: the jump condition. +# +# If the value popped off the stack is nil, `branchnil` jumps to +# the jump index and continues executing there. +# +# ### Usage +# +# ~~~ruby +# x = nil +# if x&.to_s +# puts "hi" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#236 +class SyntaxTree::YARV::BranchNil < ::SyntaxTree::YARV::Instruction + # @return [BranchNil] a new instance of BranchNil + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#239 + def initialize(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#255 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#271 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#267 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#251 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#243 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#275 + def falls_through?; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#237 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#259 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#263 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#247 + def to_a(_iseq); end +end + +# ### Summary +# +# `branchunless` has one argument: the jump index. It pops one value off +# the stack: the jump condition. +# +# If the value popped off the stack is false or nil, `branchunless` jumps +# to the jump index and continues executing there. +# +# ### Usage +# +# ~~~ruby +# if 2 + 3 +# puts "foo" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#296 +class SyntaxTree::YARV::BranchUnless < ::SyntaxTree::YARV::Instruction + # @return [BranchUnless] a new instance of BranchUnless + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#299 + def initialize(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#315 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#331 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#327 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#311 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#303 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#335 + def falls_through?; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#297 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#319 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#323 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#307 + def to_a(_iseq); end +end + +# This is an operand to various YARV instructions that represents the +# information about a specific call site. +# +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#7 +class SyntaxTree::YARV::CallData + # @return [CallData] a new instance of CallData + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#31 + def initialize(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end + + # Returns the value of attribute argc. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 + def argc; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#43 + def flag?(mask); end + + # Returns the value of attribute flags. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 + def flags; end + + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#53 + def inspect; end + + # Returns the value of attribute kw_arg. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 + def kw_arg; end + + # Returns the value of attribute method. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 + def method; end + + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#47 + def to_h; end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#77 + def from(serialized); end + end +end + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_ARGS_BLOCKARG = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_ARGS_SIMPLE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_ARGS_SPLAT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_BLOCKISEQ = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_FCALL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_KWARG = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_KW_SPLAT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_KW_SPLAT_MUT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_OPT_SEND = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_SUPER = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_TAILCALL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_VCALL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 +SyntaxTree::YARV::CallData::CALL_ZSUPER = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `checkkeyword` checks if a keyword was passed at the callsite that +# called into the method represented by the instruction sequence. It has +# two arguments: the index of the local variable that stores the keywords +# metadata and the index of the keyword within that metadata. It pushes +# a boolean onto the stack indicating whether or not the keyword was +# given. +# +# ### Usage +# +# ~~~ruby +# def evaluate(value: rand) +# value +# end +# +# evaluate(value: 3) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#359 +class SyntaxTree::YARV::CheckKeyword < ::SyntaxTree::YARV::Instruction + # @return [CheckKeyword] a new instance of CheckKeyword + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#362 + def initialize(keyword_bits_index, keyword_index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#386 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#400 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#382 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#367 + def disasm(fmt); end + + # Returns the value of attribute keyword_bits_index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360 + def keyword_bits_index; end + + # Returns the value of attribute keyword_index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360 + def keyword_index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#392 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#396 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#374 + def to_a(iseq); end +end + +# ### Summary +# +# `checkmatch` checks if the current pattern matches the current value. It +# pops the target and the pattern off the stack and pushes a boolean onto +# the stack if it matches or not. +# +# ### Usage +# +# ~~~ruby +# foo in Foo +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#417 +class SyntaxTree::YARV::CheckMatch < ::SyntaxTree::YARV::Instruction + # @return [CheckMatch] a new instance of CheckMatch + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#426 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#442 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#458 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#438 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#430 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#446 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#450 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#454 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#434 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#424 + def type; end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#472 + def check?(pattern, target); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#422 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_ARRAY = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#419 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_CASE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#421 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_MASK = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#420 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_RESCUE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#418 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_WHEN = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `checktype` checks if the value on top of the stack is of a certain type. +# The type is the only argument. It pops the value off the stack and pushes +# a boolean onto the stack indicating whether or not the value is of the +# given type. +# +# ### Usage +# +# ~~~ruby +# foo in [bar] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#501 +class SyntaxTree::YARV::CheckType < ::SyntaxTree::YARV::Instruction + # @return [CheckType] a new instance of CheckType + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#526 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#588 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#608 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#584 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#530 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#592 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#596 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#600 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#580 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#524 + def type; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#508 +SyntaxTree::YARV::CheckType::TYPE_ARRAY = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#511 +SyntaxTree::YARV::CheckType::TYPE_BIGNUM = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#503 +SyntaxTree::YARV::CheckType::TYPE_CLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#515 +SyntaxTree::YARV::CheckType::TYPE_COMPLEX = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#513 +SyntaxTree::YARV::CheckType::TYPE_DATA = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#519 +SyntaxTree::YARV::CheckType::TYPE_FALSE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#512 +SyntaxTree::YARV::CheckType::TYPE_FILE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#521 +SyntaxTree::YARV::CheckType::TYPE_FIXNUM = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#505 +SyntaxTree::YARV::CheckType::TYPE_FLOAT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#509 +SyntaxTree::YARV::CheckType::TYPE_HASH = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#514 +SyntaxTree::YARV::CheckType::TYPE_MATCH = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#504 +SyntaxTree::YARV::CheckType::TYPE_MODULE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#517 +SyntaxTree::YARV::CheckType::TYPE_NIL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#502 +SyntaxTree::YARV::CheckType::TYPE_OBJECT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#516 +SyntaxTree::YARV::CheckType::TYPE_RATIONAL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#507 +SyntaxTree::YARV::CheckType::TYPE_REGEXP = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#506 +SyntaxTree::YARV::CheckType::TYPE_STRING = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#510 +SyntaxTree::YARV::CheckType::TYPE_STRUCT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#520 +SyntaxTree::YARV::CheckType::TYPE_SYMBOL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#518 +SyntaxTree::YARV::CheckType::TYPE_TRUE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#522 +SyntaxTree::YARV::CheckType::TYPE_UNDEF = T.let(T.unsafe(nil), Integer) + +# This class is an experiment in transforming Syntax Tree nodes into their +# corresponding YARV instruction sequences. It attempts to mirror the +# behavior of RubyVM::InstructionSequence.compile. +# +# You use this as with any other visitor. First you parse code into a tree, +# then you visit it with this compiler. Visiting the root node of the tree +# will return a SyntaxTree::YARV::Compiler::InstructionSequence object. +# With that object you can call #to_a on it, which will return a serialized +# form of the instruction sequence as an array. This array _should_ mirror +# the array given by RubyVM::InstructionSequence#to_a. +# +# As an example, here is how you would compile a single expression: +# +# program = SyntaxTree.parse("1 + 2") +# program.accept(SyntaxTree::YARV::Compiler.new).to_a +# +# [ +# "YARVInstructionSequence/SimpleDataFormat", +# 3, +# 1, +# 1, +# {:arg_size=>0, :local_size=>0, :stack_max=>2}, +# "", +# "", +# "", +# 1, +# :top, +# [], +# {}, +# [], +# [ +# [:putobject_INT2FIX_1_], +# [:putobject, 2], +# [:opt_plus, {:mid=>:+, :flag=>16, :orig_argc=>1}], +# [:leave] +# ] +# ] +# +# Note that this is the same output as calling: +# +# RubyVM::InstructionSequence.compile("1 + 2").to_a +# +# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#47 +class SyntaxTree::YARV::Compiler < ::SyntaxTree::BasicVisitor + # @return [Compiler] a new instance of Compiler + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#293 + def initialize(options = T.unsafe(nil)); end + + # The current instruction sequence that is being compiled. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#286 + def iseq; end + + # A boolean to track if we're currently compiling the last statement + # within a set of statements. This information is necessary to determine + # if we need to return the value of the last statement. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#291 + def last_statement; end + + # These options mirror the compilation options that we currently support + # that can be also passed to RubyVM::InstructionSequence.compile. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#283 + def options; end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#299 + def visit_BEGIN(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#303 + def visit_CHAR(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#311 + def visit_END(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#339 + def visit_alias(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#347 + def visit_aref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#369 + def visit_arg_block(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#373 + def visit_arg_paren(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#377 + def visit_arg_star(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#382 + def visit_args(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#386 + def visit_array(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#421 + def visit_aryptn(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#424 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#522 + def visit_assoc(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#527 + def visit_assoc_splat(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#531 + def visit_backref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#535 + def visit_bare_assoc_hash(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#543 + def visit_begin(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#546 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#575 + def visit_block(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#585 + def visit_block_var(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#599 + def visit_blockarg(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#605 + def visit_bodystmt(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#609 + def visit_break(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#612 + def visit_call(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#712 + def visit_case(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#757 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#792 + def visit_command(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#805 + def visit_command_call(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#818 + def visit_const_path_field(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#822 + def visit_const_path_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#827 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#850 + def visit_defined(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#907 + def visit_dyna_symbol(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#913 + def visit_else(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#918 + def visit_elsif(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#929 + def visit_ensure(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#932 + def visit_field(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#936 + def visit_float(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#940 + def visit_fndptn(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#943 + def visit_for(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#976 + def visit_hash(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#988 + def visit_heredoc(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#985 + def visit_hshptn(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#999 + def visit_if(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1053 + def visit_if_op(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1074 + def visit_imaginary(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1078 + def visit_int(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1082 + def visit_kwrest_param(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1088 + def visit_label(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1092 + def visit_lambda(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1106 + def visit_lambda_var(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1110 + def visit_massign(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1116 + def visit_method_add_block(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1129 + def visit_mlhs(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1142 + def visit_module(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1171 + def visit_mrhs(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1180 + def visit_next(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1183 + def visit_not(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1188 + def visit_opassign(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1254 + def visit_params(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1360 + def visit_paren(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1364 + def visit_pinned_begin(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1367 + def visit_pinned_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1370 + def visit_program(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1421 + def visit_qsymbols(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1425 + def visit_qwords(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1434 + def visit_range(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1444 + def visit_rassign(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1521 + def visit_rational(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1525 + def visit_redo(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1528 + def visit_regexp_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1538 + def visit_rescue(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1541 + def visit_rescue_ex(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1544 + def visit_rescue_mod(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1547 + def visit_rest_param(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1553 + def visit_retry(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1556 + def visit_return(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1559 + def visit_sclass(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1580 + def visit_statements(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1594 + def visit_string_concat(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1606 + def visit_string_embexpr(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1610 + def visit_string_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1619 + def visit_super(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1633 + def visit_symbol_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1637 + def visit_symbols(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1656 + def visit_top_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1660 + def visit_tstring_content(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1668 + def visit_unary(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1689 + def visit_undef(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1699 + def visit_unless(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1725 + def visit_until(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1744 + def visit_var_field(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1761 + def visit_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1796 + def visit_vcall(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1808 + def visit_when(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1812 + def visit_while(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1831 + def visit_word(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1840 + def visit_words(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1850 + def visit_xstring_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1863 + def visit_yield(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1869 + def visit_zsuper(_node); end + + private + + # This is a helper that is used in places where arguments may be present + # or they may be wrapped in parentheses. It's meant to descend down the + # tree and return an array of argument nodes. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1887 + def argument_parts(node); end + + # Constant names when they are being assigned or referenced come in as a + # tree, but it's more convenient to work with them as an array. This + # method converts them into that array. This is nice because it's the + # operand that goes to opt_getconstant_path in Ruby 3.2. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1908 + def constant_names(node); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2196 + def last_statement?; end + + # For the most part when an OpAssign (operator assignment) node with a ||= + # operator is being compiled it's a matter of reading the target, checking + # if the value should be evaluated, evaluating it if so, and then writing + # the result back to the target. + # + # However, in certain kinds of assignments (X, ::X, X::Y, @@x, and $x) we + # first check if the value is defined using the defined instruction. I + # don't know why it is necessary, and suspect that it isn't. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1936 + def opassign_defined(node); end + + # Whenever a value is interpolated into a string-like structure, these + # three instructions are pushed. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2016 + def push_interpolate; end + + # Visit a type of pattern in a pattern match. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2029 + def visit_pattern(node, end_label); end + + # There are a lot of nodes in the AST that act as contains of parts of + # strings. This includes things like string literals, regular expressions, + # heredocs, etc. This method will visit all the parts of a string within + # those containers. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2137 + def visit_string_parts(node); end + + # The current instruction sequence that we're compiling is always stored + # on the compiler. When we descend into a node that has its own + # instruction sequence, this method can be called to temporarily set the + # new value of the instruction sequence, yield, and then set it back. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2167 + def with_child_iseq(child_iseq); end + + # When we're compiling the last statement of a set of statements within a + # scope, the instructions sometimes change from pops to leaves. These + # kinds of peephole optimizations can reduce the overall number of + # instructions. Therefore, we keep track of whether we're compiling the + # last statement of a scope and allow visit methods to query that + # information. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2185 + def with_last_statement; end + + # OpAssign nodes can have a number of different kinds of nodes as their + # "target" (i.e., the left-hand side of the assignment). When compiling + # these nodes we typically need to first fetch the current value of the + # variable, then perform some kind of action, then store the result back + # into the variable. This method handles that by first fetching the value, + # then yielding to the block, then storing the result. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2206 + def with_opassign(node); end +end + +# This represents a set of options that can be passed to the compiler to +# control how it compiles the code. It mirrors the options that can be +# passed to RubyVM::InstructionSequence.compile, except it only includes +# options that actually change the behavior. +# +# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#52 +class SyntaxTree::YARV::Compiler::Options + # @return [Options] a new instance of Options + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#53 + def initialize(frozen_string_literal: T.unsafe(nil), inline_const_cache: T.unsafe(nil), operands_unification: T.unsafe(nil), peephole_optimization: T.unsafe(nil), specialized_instruction: T.unsafe(nil), tailcall_optimization: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#80 + def frozen_string_literal!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#84 + def frozen_string_literal?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#88 + def inline_const_cache?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#92 + def operands_unification?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#96 + def peephole_optimization?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#100 + def specialized_instruction?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#104 + def tailcall_optimization?; end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#69 + def to_hash; end +end + +# This visitor is responsible for converting Syntax Tree nodes into their +# corresponding Ruby structures. This is used to convert the operands of +# some instructions like putobject that push a Ruby object directly onto +# the stack. It is only used when the entire structure can be represented +# at compile-time, as opposed to constructed at run-time. +# +# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#114 +class SyntaxTree::YARV::Compiler::RubyVisitor < ::SyntaxTree::BasicVisitor + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_BEGIN(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_CHAR(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_END(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit___end__(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_alias(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_aref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_aref_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_arg_block(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_arg_paren(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_arg_star(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_args(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_args_forward(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#128 + def visit_array(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_aryptn(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_assign(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_assoc(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_assoc_splat(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_backref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_backtick(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132 + def visit_bare_assoc_hash(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_begin(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_binary(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_block(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_block_var(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_blockarg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_bodystmt(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_break(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_call(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_case(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_class(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_comma(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_command(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_command_call(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_comment(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_const(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_const_path_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_const_path_ref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_const_ref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_cvar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_def(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_defined(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_dyna_symbol(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_else(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_elsif(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_embdoc(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_embexpr_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_embexpr_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_embvar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_ensure(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_excessed_comma(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#141 + def visit_float(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_fndptn(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_for(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_gvar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132 + def visit_hash(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_heredoc(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_heredoc_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_heredoc_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_hshptn(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_ident(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_if(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_if_op(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#147 + def visit_imaginary(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_in(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#151 + def visit_int(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_ivar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_kw(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_kwrest_param(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#166 + def visit_label(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_label_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lambda(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lambda_var(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lbrace(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lbracket(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lparen(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_massign(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_method_add_block(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_mlhs(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_mlhs_paren(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_module(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#170 + def visit_mrhs(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_next(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_not(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_op(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_opassign(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_params(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_paren(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_period(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_pinned_begin(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_pinned_var_ref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_program(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#174 + def visit_qsymbols(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_qsymbols_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#178 + def visit_qwords(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_qwords_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#182 + def visit_range(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rassign(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#187 + def visit_rational(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rbrace(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rbracket(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_redo(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_regexp_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_regexp_content(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_regexp_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#191 + def visit_regexp_literal(node); end + + # This isn't actually a visit method, though maybe it should be. It is + # responsible for converting the set of string options on a regular + # expression into its equivalent integer. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#249 + def visit_regexp_literal_flags(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rescue(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rescue_ex(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rescue_mod(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rest_param(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_retry(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_return(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rparen(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_sclass(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_statements(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_concat(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_content(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_dvar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_embexpr(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_literal(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_super(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_symbeg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_symbol_content(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#204 + def visit_symbol_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#208 + def visit_symbols(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_symbols_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_tlambda(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_tlambeg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_top_const_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_top_const_ref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_tstring_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#212 + def visit_tstring_content(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_tstring_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_unary(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_undef(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_unless(_node); end + + # @raise [CompilationError] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_unsupported(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_until(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_var_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#216 + def visit_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_vcall(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_void_stmt(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_when(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_while(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#231 + def visit_word(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#241 + def visit_words(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_words_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_xstring(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_xstring_literal(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_yield(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_zsuper(_node); end + + class << self + # This will attempt to compile the given node. If it's possible, then + # it will return the compiled object. Otherwise it will return nil. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#122 + def compile(node); end + end +end + +# This error is raised whenever a node cannot be converted into a Ruby +# object at compile-time. +# +# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#117 +class SyntaxTree::YARV::Compiler::RubyVisitor::CompilationError < ::StandardError; end + +# ### Summary +# +# `concatarray` concatenates the two Arrays on top of the stack. +# +# It coerces the two objects at the top of the stack into Arrays by +# calling `to_a` if necessary, and makes sure to `dup` the first Array if +# it was already an Array, to avoid mutating it when concatenating. +# +# ### Usage +# +# ~~~ruby +# [1, *2] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#674 +class SyntaxTree::YARV::ConcatArray < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#687 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#699 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#683 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#675 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#691 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#695 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#679 + def to_a(_iseq); end +end + +# ### Summary +# +# `concatstrings` pops a number of strings from the stack joins them +# together into a single string and pushes that string back on the stack. +# +# This does no coercion and so is always used in conjunction with +# `objtostring` and `anytostring` to ensure the stack contents are always +# strings. +# +# ### Usage +# +# ~~~ruby +# "#{5}" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#720 +class SyntaxTree::YARV::ConcatStrings < ::SyntaxTree::YARV::Instruction + # @return [ConcatStrings] a new instance of ConcatStrings + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#723 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#739 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#755 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#735 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#727 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#743 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#721 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#747 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#751 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#731 + def to_a(_iseq); end +end + +# This class represents a control flow graph of a YARV instruction sequence. +# It constructs a graph of basic blocks that hold subsets of the list of +# instructions from the instruction sequence. +# +# You can use this class by calling the ::compile method and passing it a +# YARV instruction sequence. It will return a control flow graph object. +# +# iseq = RubyVM::InstructionSequence.compile("1 + 2") +# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a) +# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq) +# +# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#16 +class SyntaxTree::YARV::ControlFlowGraph + # @return [ControlFlowGraph] a new instance of ControlFlowGraph + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#173 + def initialize(iseq, insns, blocks); end + + # This is the set of basic blocks that this control-flow graph contains. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#171 + def blocks; end + + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#179 + def disasm; end + + # This is the list of instructions that this control flow graph contains. + # It is effectively the same as the list of instructions in the + # instruction sequence but with line numbers and events filtered out. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#168 + def insns; end + + # This is the instruction sequence that this control flow graph + # corresponds to. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#163 + def iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#202 + def to_dfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#210 + def to_mermaid; end + + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#206 + def to_son; end + + # This method is used to verify that the control flow graph is well + # formed. It does this by checking that each basic block is itself well + # formed. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#248 + def verify; end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#252 + def compile(iseq); end + end +end + +# This class is responsible for creating a control flow graph from the +# given instruction sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#19 +class SyntaxTree::YARV::ControlFlowGraph::Compiler + # @return [Compiler] a new instance of Compiler + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#34 + def initialize(iseq); end + + # This method is used to compile the instruction sequence into a control + # flow graph. It returns an instance of ControlFlowGraph. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#54 + def compile; end + + # This is a hash of indices in the YARV instruction sequence that point + # to their corresponding instruction. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#25 + def insns; end + + # This is the instruction sequence that is being compiled. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#21 + def iseq; end + + # This is a hash of labels that point to their corresponding index into + # the YARV instruction sequence. Note that this is not the same as the + # index into the list of instructions on the instruction sequence + # object. Instead, this is the index into the C array, so it includes + # operands. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#32 + def labels; end + + private + + # Builds up a set of basic blocks by iterating over the starts of each + # block. They are keyed by the index of their first instruction. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#92 + def build_basic_blocks; end + + # Connect the blocks by letting them know which blocks are incoming and + # outgoing from each block. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#123 + def connect_basic_blocks(blocks); end + + # Finds the indices of the instructions that start a basic block because + # they're either: + # + # * the start of an instruction sequence + # * the target of a branch + # * fallen through to from a branch + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#72 + def find_basic_block_starts; end + + # If there are blocks that are unreachable, we can remove them from the + # graph entirely at this point. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#145 + def prune_basic_blocks(blocks); end +end + +# Constructs a data-flow-graph of a YARV instruction sequence, via a +# control-flow-graph. Data flow is discovered locally and then globally. The +# graph only considers data flow through the stack - local variables and +# objects are considered fully escaped in this analysis. +# +# You can use this class by calling the ::compile method and passing it a +# control flow graph. It will return a data flow graph object. +# +# iseq = RubyVM::InstructionSequence.compile("1 + 2") +# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a) +# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq) +# dfg = SyntaxTree::YARV::DataFlowGraph.compile(cfg) +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#18 +class SyntaxTree::YARV::DataFlowGraph + # @return [DataFlowGraph] a new instance of DataFlowGraph + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#68 + def initialize(cfg, insn_flows, block_flows); end + + # Returns the value of attribute block_flows. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 + def block_flows; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#74 + def blocks; end + + # Returns the value of attribute cfg. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 + def cfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#78 + def disasm; end + + # Returns the value of attribute insn_flows. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 + def insn_flows; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#127 + def to_mermaid; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#123 + def to_son; end + + # Verify that we constructed the data flow graph correctly. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#179 + def verify; end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#204 + def compile(cfg); end + end +end + +# This represents an object that goes on the stack that is passed between +# basic blocks. +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#32 +class SyntaxTree::YARV::DataFlowGraph::BlockArgument + # @return [BlockArgument] a new instance of BlockArgument + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#35 + def initialize(name); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#39 + def local?; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#33 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#43 + def to_str; end +end + +# This class is responsible for creating a data flow graph from the given +# control flow graph. +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#210 +class SyntaxTree::YARV::DataFlowGraph::Compiler + # @return [Compiler] a new instance of Compiler + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#221 + def initialize(cfg); end + + # This data structure will hold the data flow between basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#219 + def block_flows; end + + # This is the control flow graph that is being compiled. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#212 + def cfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#227 + def compile; end + + # This data structure will hold the data flow between instructions + # within individual basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#216 + def insn_flows; end + + private + + # Find the data that flows between basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#304 + def find_external_flow; end + + # Find the data flow within each basic block. Using an abstract stack, + # connect from consumers of data to the producers of that data. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#237 + def find_internal_flow; end +end + +# This object represents the flow of data between instructions. +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#20 +class SyntaxTree::YARV::DataFlowGraph::DataFlow + # @return [DataFlow] a new instance of DataFlow + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#24 + def initialize; end + + # Returns the value of attribute in. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#21 + def in; end + + # Returns the value of attribute out. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#22 + def out; end +end + +# This represents an object that goes on the stack that is passed between +# instructions within a basic block. +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#50 +class SyntaxTree::YARV::DataFlowGraph::LocalArgument + # @return [LocalArgument] a new instance of LocalArgument + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#53 + def initialize(length); end + + # Returns the value of attribute length. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51 + def length; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#57 + def local?; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#61 + def to_str; end +end + +# This class is responsible for taking a compiled instruction sequence and +# walking through it to generate equivalent Ruby code. +# +# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#7 +class SyntaxTree::YARV::Decompiler + include ::SyntaxTree::DSL + + # @return [Decompiler] a new instance of Decompiler + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#32 + def initialize(iseq); end + + # Returns the value of attribute block_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30 + def block_label; end + + # Returns the value of attribute iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30 + def iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#37 + def to_ruby; end + + private + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#52 + def decompile(iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#256 + def local_name(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#43 + def node_for(value); end +end + +# When we're decompiling, we use a looped case statement to emulate +# jumping around in the same way the virtual machine would. This class +# provides convenience methods for generating the AST nodes that have to +# do with that label. +# +# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#12 +class SyntaxTree::YARV::Decompiler::BlockLabel + include ::SyntaxTree::DSL + + # @return [BlockLabel] a new instance of BlockLabel + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#16 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#20 + def field; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#14 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#24 + def ref; end +end + +# ### Summary +# +# `defineclass` defines a class. First it pops the superclass off the +# stack, then it pops the object off the stack that the class should be +# defined under. It has three arguments: the name of the constant, the +# instruction sequence associated with the class, and various flags that +# indicate if it is a singleton class, a module, or a regular class. +# +# ### Usage +# +# ~~~ruby +# class Foo +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#775 +class SyntaxTree::YARV::DefineClass < ::SyntaxTree::YARV::Instruction + # @return [DefineClass] a new instance of DefineClass + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#784 + def initialize(name, class_iseq, flags); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#806 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#823 + def call(vm); end + + # Returns the value of attribute class_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 + def class_iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#802 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#790 + def disasm(fmt); end + + # Returns the value of attribute flags. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 + def flags; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#811 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#815 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#819 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#798 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#780 +SyntaxTree::YARV::DefineClass::FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#779 +SyntaxTree::YARV::DefineClass::FLAG_SCOPED = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#776 +SyntaxTree::YARV::DefineClass::TYPE_CLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#778 +SyntaxTree::YARV::DefineClass::TYPE_MODULE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#777 +SyntaxTree::YARV::DefineClass::TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `definemethod` defines a method on the class of the current value of +# `self`. It accepts two arguments. The first is the name of the method +# being defined. The second is the instruction sequence representing the +# body of the method. +# +# ### Usage +# +# ~~~ruby +# def value = "value" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1068 +class SyntaxTree::YARV::DefineMethod < ::SyntaxTree::YARV::Instruction + # @return [DefineMethod] a new instance of DefineMethod + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1071 + def initialize(method_name, method_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1092 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1101 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1088 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1076 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1097 + def length; end + + # Returns the value of attribute method_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069 + def method_iseq; end + + # Returns the value of attribute method_name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069 + def method_name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1084 + def to_a(_iseq); end +end + +# ### Summary +# +# `definesmethod` defines a method on the singleton class of the current +# value of `self`. It accepts two arguments. The first is the name of the +# method being defined. The second is the instruction sequence representing +# the body of the method. It pops the object off the stack that the method +# should be defined on. +# +# ### Usage +# +# ~~~ruby +# def self.value = "value" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1137 +class SyntaxTree::YARV::DefineSMethod < ::SyntaxTree::YARV::Instruction + # @return [DefineSMethod] a new instance of DefineSMethod + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1140 + def initialize(method_name, method_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1161 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1174 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1157 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1145 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1166 + def length; end + + # Returns the value of attribute method_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138 + def method_iseq; end + + # Returns the value of attribute method_name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138 + def method_name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1170 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1153 + def to_a(_iseq); end +end + +# ### Summary +# +# `defined` checks if the top value of the stack is defined. If it is, it +# pushes its value onto the stack. Otherwise it pushes `nil`. +# +# ### Usage +# +# ~~~ruby +# defined?(x) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#859 +class SyntaxTree::YARV::Defined < ::SyntaxTree::YARV::Instruction + # @return [Defined] a new instance of Defined + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#880 + def initialize(type, name, message); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#939 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#956 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#935 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#886 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#944 + def length; end + + # Returns the value of attribute message. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 + def message; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#948 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#952 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#931 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 + def type; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#872 +SyntaxTree::YARV::Defined::TYPE_ASGN = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#865 +SyntaxTree::YARV::Defined::TYPE_CONST = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#876 +SyntaxTree::YARV::Defined::TYPE_CONST_FROM = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#864 +SyntaxTree::YARV::Defined::TYPE_CVAR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#873 +SyntaxTree::YARV::Defined::TYPE_EXPR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#871 +SyntaxTree::YARV::Defined::TYPE_FALSE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#875 +SyntaxTree::YARV::Defined::TYPE_FUNC = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#863 +SyntaxTree::YARV::Defined::TYPE_GVAR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#861 +SyntaxTree::YARV::Defined::TYPE_IVAR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#862 +SyntaxTree::YARV::Defined::TYPE_LVAR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#866 +SyntaxTree::YARV::Defined::TYPE_METHOD = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#860 +SyntaxTree::YARV::Defined::TYPE_NIL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#874 +SyntaxTree::YARV::Defined::TYPE_REF = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#869 +SyntaxTree::YARV::Defined::TYPE_SELF = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#870 +SyntaxTree::YARV::Defined::TYPE_TRUE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#867 +SyntaxTree::YARV::Defined::TYPE_YIELD = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#868 +SyntaxTree::YARV::Defined::TYPE_ZSUPER = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `definedivar` checks if an instance variable is defined. It is a +# specialization of the `defined` instruction. It accepts three arguments: +# the name of the instance variable, an inline cache, and the string that +# should be pushed onto the stack in the event that the instance variable +# is defined. +# +# ### Usage +# +# ~~~ruby +# defined?(@value) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1011 +class SyntaxTree::YARV::DefinedIVar < ::SyntaxTree::YARV::Instruction + # @return [DefinedIVar] a new instance of DefinedIVar + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1014 + def initialize(name, cache, message); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1035 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1048 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1031 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1020 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1040 + def length; end + + # Returns the value of attribute message. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 + def message; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1044 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1027 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#5 +class SyntaxTree::YARV::Disassembler + # @return [Disassembler] a new instance of Disassembler + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#46 + def initialize(current_iseq = T.unsafe(nil)); end + + # Helpers for various instructions + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#58 + def calldata(value); end + + # Returns the value of attribute current_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44 + def current_iseq; end + + # Sets the attribute current_iseq + # + # @param value the value to set the attribute current_iseq to. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44 + def current_iseq=(_arg0); end + + # Returns the value of attribute current_prefix. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#43 + def current_prefix; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#62 + def enqueue(iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#66 + def event(name); end + + # Entrypoints + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#116 + def format!; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#123 + def format_insns!(insns, length = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#87 + def inline_storage(cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#91 + def instruction(name, operands = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#95 + def label(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#99 + def local(index, explicit: T.unsafe(nil), implicit: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#108 + def object(value); end + + # Returns the value of attribute output. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41 + def output; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#167 + def print(string); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#171 + def puts(string); end + + # Returns the value of attribute queue. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41 + def queue; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#175 + def string; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#179 + def with_prefix(value); end + + private + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#192 + def format_iseq(iseq); end +end + +# This class is another object that handles disassembling a YARV +# instruction sequence but it renders it without any of the extra spacing +# or alignment. +# +# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#9 +class SyntaxTree::YARV::Disassembler::Squished + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#10 + def calldata(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#14 + def enqueue(iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#17 + def event(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#20 + def inline_storage(cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#24 + def instruction(name, operands = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#28 + def label(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#32 + def local(index, **_arg1); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#36 + def object(value); end +end + +# ### Summary +# +# `dup` copies the top value of the stack and pushes it onto the stack. +# +# ### Usage +# +# ~~~ruby +# $global = 5 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1206 +class SyntaxTree::YARV::Dup < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1219 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1231 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1215 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1207 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1223 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1227 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1235 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1211 + def to_a(_iseq); end +end + +# ### Summary +# +# `duparray` dups an Array literal and pushes it onto the stack. +# +# ### Usage +# +# ~~~ruby +# [true] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1250 +class SyntaxTree::YARV::DupArray < ::SyntaxTree::YARV::Instruction + # @return [DupArray] a new instance of DupArray + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1253 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1269 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1281 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1265 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1257 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1273 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1251 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1277 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1261 + def to_a(_iseq); end +end + +# ### Summary +# +# `duphash` dups a Hash literal and pushes it onto the stack. +# +# ### Usage +# +# ~~~ruby +# { a: 1 } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1296 +class SyntaxTree::YARV::DupHash < ::SyntaxTree::YARV::Instruction + # @return [DupHash] a new instance of DupHash + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1299 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1315 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1327 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1311 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1303 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1319 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1297 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1323 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1307 + def to_a(_iseq); end +end + +# ### Summary +# +# `dupn` duplicates the top `n` stack elements. +# +# ### Usage +# +# ~~~ruby +# Object::X ||= true +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1342 +class SyntaxTree::YARV::DupN < ::SyntaxTree::YARV::Instruction + # @return [DupN] a new instance of DupN + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1345 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1361 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1373 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1357 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1349 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1365 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1343 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1369 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1353 + def to_a(_iseq); end +end + +# ### Summary +# +# `expandarray` looks at the top of the stack, and if the value is an array +# it replaces it on the stack with `number` elements of the array, or `nil` +# if the elements are missing. +# +# ### Usage +# +# ~~~ruby +# x, = [true, false, nil] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1392 +class SyntaxTree::YARV::ExpandArray < ::SyntaxTree::YARV::Instruction + # @return [ExpandArray] a new instance of ExpandArray + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1395 + def initialize(number, flags); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1412 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1429 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1408 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1400 + def disasm(fmt); end + + # Returns the value of attribute flags. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393 + def flags; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1417 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1421 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1425 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1404 + def to_a(_iseq); end +end + +# ### Summary +# +# `getblockparam` is a similar instruction to `getlocal` in that it looks +# for a local variable in the current instruction sequence's local table and +# walks recursively up the parent instruction sequences until it finds it. +# The local it retrieves, however, is a special block local that was passed +# to the current method. It pushes the value of the block local onto the +# stack. +# +# ### Usage +# +# ~~~ruby +# def foo(&block) +# block +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1486 +class SyntaxTree::YARV::GetBlockParam < ::SyntaxTree::YARV::Instruction + # @return [GetBlockParam] a new instance of GetBlockParam + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1489 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1508 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1521 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1504 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1494 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1513 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1517 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1498 + def to_a(iseq); end +end + +# ### Summary +# +# `getblockparamproxy` is almost the same as `getblockparam` except that it +# pushes a proxy object onto the stack instead of the actual value of the +# block local. This is used when a method is being called on the block +# local. +# +# ### Usage +# +# ~~~ruby +# def foo(&block) +# block.call +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1541 +class SyntaxTree::YARV::GetBlockParamProxy < ::SyntaxTree::YARV::Instruction + # @return [GetBlockParamProxy] a new instance of GetBlockParamProxy + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1544 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1566 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1579 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1562 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1549 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1571 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1575 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1556 + def to_a(iseq); end +end + +# ### Summary +# +# `getclassvariable` looks for a class variable in the current class and +# pushes its value onto the stack. It uses an inline cache to reduce the +# need to lookup the class variable in the class hierarchy every time. +# +# ### Usage +# +# ~~~ruby +# @@class_variable +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1596 +class SyntaxTree::YARV::GetClassVariable < ::SyntaxTree::YARV::Instruction + # @return [GetClassVariable] a new instance of GetClassVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1599 + def initialize(name, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1619 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1632 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1615 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1604 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1624 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1628 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1611 + def to_a(_iseq); end +end + +# ### Summary +# +# `getconstant` performs a constant lookup and pushes the value of the +# constant onto the stack. It pops both the class it should look in and +# whether or not it should look globally as well. +# +# ### Usage +# +# ~~~ruby +# Constant +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1651 +class SyntaxTree::YARV::GetConstant < ::SyntaxTree::YARV::Instruction + # @return [GetConstant] a new instance of GetConstant + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1654 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1670 + def ==(other); end + + # @raise [NameError] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1686 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1666 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1658 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1674 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1652 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1678 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1682 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1662 + def to_a(_iseq); end +end + +# ### Summary +# +# `getglobal` pushes the value of a global variables onto the stack. +# +# ### Usage +# +# ~~~ruby +# $$ +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1717 +class SyntaxTree::YARV::GetGlobal < ::SyntaxTree::YARV::Instruction + # @return [GetGlobal] a new instance of GetGlobal + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1720 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1736 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1748 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1732 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1724 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1740 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1718 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1744 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1728 + def to_a(_iseq); end +end + +# ### Summary +# +# `getinstancevariable` pushes the value of an instance variable onto the +# stack. It uses an inline cache to avoid having to look up the instance +# variable in the class hierarchy every time. +# +# This instruction has two forms, but both have the same structure. Before +# Ruby 3.2, the inline cache corresponded to both the get and set +# instructions and could be shared. Since Ruby 3.2, it uses object shapes +# instead so the caches are unique per instruction. +# +# ### Usage +# +# ~~~ruby +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1772 +class SyntaxTree::YARV::GetInstanceVariable < ::SyntaxTree::YARV::Instruction + # @return [GetInstanceVariable] a new instance of GetInstanceVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1775 + def initialize(name, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1795 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1808 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1791 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1780 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1800 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1804 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1787 + def to_a(_iseq); end +end + +# ### Summary +# +# `getlocal` fetches the value of a local variable from a frame determined +# by the level and index arguments. The level is the number of frames back +# to look and the index is the index in the local table. It pushes the value +# it finds onto the stack. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# tap { tap { value } } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1828 +class SyntaxTree::YARV::GetLocal < ::SyntaxTree::YARV::Instruction + # @return [GetLocal] a new instance of GetLocal + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1831 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1850 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1862 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1846 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1836 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1854 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1858 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1840 + def to_a(iseq); end +end + +# ### Summary +# +# `getlocal_WC_0` is a specialized version of the `getlocal` instruction. It +# fetches the value of a local variable from the current frame determined by +# the index given as its only argument. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# value +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1880 +class SyntaxTree::YARV::GetLocalWC0 < ::SyntaxTree::YARV::Instruction + # @return [GetLocalWC0] a new instance of GetLocalWC0 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1883 + def initialize(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1899 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1915 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1911 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1895 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1887 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1881 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1903 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1907 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1891 + def to_a(iseq); end +end + +# ### Summary +# +# `getlocal_WC_1` is a specialized version of the `getlocal` instruction. It +# fetches the value of a local variable from the parent frame determined by +# the index given as its only argument. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# self.then { value } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1933 +class SyntaxTree::YARV::GetLocalWC1 < ::SyntaxTree::YARV::Instruction + # @return [GetLocalWC1] a new instance of GetLocalWC1 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1936 + def initialize(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1952 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1968 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1964 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1948 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1940 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1934 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1956 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1960 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1944 + def to_a(iseq); end +end + +# ### Summary +# +# `getspecial` pushes the value of a special local variable onto the stack. +# +# ### Usage +# +# ~~~ruby +# 1 if (a == 1) .. (b == 2) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1983 +class SyntaxTree::YARV::GetSpecial < ::SyntaxTree::YARV::Instruction + # @return [GetSpecial] a new instance of GetSpecial + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1990 + def initialize(key, type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2007 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2019 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2003 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1995 + def disasm(fmt); end + + # Returns the value of attribute key. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988 + def key; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2011 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2015 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1999 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988 + def type; end +end + +# $~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1985 +SyntaxTree::YARV::GetSpecial::SVAR_BACKREF = T.let(T.unsafe(nil), Integer) + +# flipflop +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1986 +SyntaxTree::YARV::GetSpecial::SVAR_FLIPFLOP_START = T.let(T.unsafe(nil), Integer) + +# $_ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1984 +SyntaxTree::YARV::GetSpecial::SVAR_LASTLINE = T.let(T.unsafe(nil), Integer) + +# This is a base class for all YARV instructions. It provides a few +# convenience methods for working with instructions. +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#7 +class SyntaxTree::YARV::Instruction + # This returns an array of labels. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#33 + def branch_targets; end + + # This method creates an instruction that represents the canonical + # (non-specialized) form of this instruction. If this instruction is not + # a specialized instruction, then this method returns `self`. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#11 + def canonical; end + + # Whether or not this instruction falls through to the next instruction if + # its branching fails. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#44 + def falls_through?; end + + # Whether or not this instruction leaves the current frame. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#38 + def leaves?; end + + # This returns the size of the instruction in terms of the number of slots + # it occupies in the instruction sequence. Effectively this is 1 plus the + # number of operands. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#18 + def length; end + + # This returns the number of values that are popped off the stack. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#28 + def pops; end + + # This returns the number of values that are pushed onto the stack. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#23 + def pushes; end + + # Does the instruction have side effects? Control-flow counts as a + # side-effect, as do some special-case instructions like Leave. By default + # every instruction is marked as having side effects. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#51 + def side_effects?; end +end + +# This class is meant to mirror RubyVM::InstructionSequence. It contains a +# list of instructions along with the metadata pertaining to them. It also +# functions as a builder for the instruction sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#9 +class SyntaxTree::YARV::InstructionSequence + # @return [InstructionSequence] a new instance of InstructionSequence + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#168 + def initialize(name, file, line, type, parent_iseq = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#652 + def adjuststack(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#656 + def anytostring; end + + # Returns the value of attribute argument_options. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#143 + def argument_options; end + + # This is the list of information about the arguments to this + # instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 + def argument_size; end + + # This is the list of information about the arguments to this + # instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 + def argument_size=(_arg0); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#472 + def block_child_iseq(line); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#660 + def branchif(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#664 + def branchnil(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#668 + def branchunless(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#565 + def catch_break(iseq, begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#575 + def catch_ensure(iseq, begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#585 + def catch_next(begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#595 + def catch_redo(begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#605 + def catch_rescue(iseq, begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#615 + def catch_retry(begin_label, end_label, exit_label, restore_sp); end + + # The catch table for this instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#146 + def catch_table; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#672 + def checkkeyword(keyword_bits_index, keyword_index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#676 + def checkmatch(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#680 + def checktype(type); end + + # Child instruction sequence methods + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#468 + def child_iseq(name, line, type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#478 + def class_child_iseq(name, line); end + + # This method converts our linked list of instructions into a final array + # and performs any other compilation steps necessary. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#305 + def compile!; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#684 + def concatarray; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#688 + def concatstrings(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#692 + def defineclass(name, class_iseq, flags); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#696 + def defined(type, name, message); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#700 + def definedivar(name, cache, message); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#709 + def definemethod(name, method_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#713 + def definesmethod(name, method_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#292 + def disasm; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#717 + def dup; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#721 + def duparray(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#725 + def duphash(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#729 + def dupn(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#232 + def eval; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#648 + def event(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#733 + def expandarray(length, flags); end + + # The source location of the instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 + def file; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#737 + def getblockparam(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#741 + def getblockparamproxy(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#745 + def getclassvariable(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#753 + def getconstant(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#757 + def getglobal(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#761 + def getinstancevariable(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#769 + def getlocal(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#788 + def getspecial(key, type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#207 + def inline_storage; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#213 + def inline_storage_for(name); end + + # The hash of names of instance and class variables pointing to the + # index of their associated inline storage. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#156 + def inline_storages; end + + # The list of instructions for this instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#149 + def insns; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#299 + def inspect; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#792 + def intern; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#796 + def invokeblock(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#800 + def invokesuper(calldata, block_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#804 + def jump(label); end + + # Instruction push methods + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#629 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#808 + def leave; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#219 + def length; end + + # The source location of the instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 + def line; end + + # The table of local variables. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#152 + def local_table; end + + # Query methods + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#199 + def local_variable(name, level = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#482 + def method_child_iseq(name, line); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#486 + def module_child_iseq(name, line); end + + # The name of the instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#129 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#812 + def newarray(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#816 + def newarraykwsplat(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#820 + def newhash(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#824 + def newrange(exclude_end); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#828 + def nop; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#832 + def objtostring(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#836 + def once(iseq, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#840 + def opt_aref_with(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#844 + def opt_aset_with(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#848 + def opt_case_dispatch(case_dispatch_hash, else_label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#852 + def opt_getconstant_path(names); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#888 + def opt_getinlinecache(label, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#892 + def opt_setinlinecache(cache); end + + # These are various compilation options provided. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#166 + def options; end + + # The parent instruction sequence, if there is one. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#138 + def parent_iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#896 + def pop; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#633 + def push(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#900 + def putnil; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#904 + def putobject(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#922 + def putself; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#926 + def putspecialobject(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#930 + def putstring(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#934 + def send(calldata, block_iseq = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#938 + def setblockparam(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#942 + def setclassvariable(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#950 + def setconstant(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#954 + def setglobal(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#958 + def setinstancevariable(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#966 + def setlocal(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#985 + def setn(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#989 + def setspecial(key); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#490 + def singleton_class_child_iseq(line); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#341 + def specialize_instructions!; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#993 + def splatarray(flag); end + + # An object that will track the current size of the stack and the + # maximum size of the stack for this instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#163 + def stack; end + + # The index of the next inline storage that will be created. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#159 + def storage_index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#997 + def swap; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1001 + def throw(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#236 + def to_a; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#280 + def to_cfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#284 + def to_dfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#288 + def to_son; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1005 + def topn(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1009 + def toregexp(options, length); end + + # The type of the instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#135 + def type; end + + class << self + # This method will create a new instruction sequence from a serialized + # RubyVM::InstructionSequence object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1015 + def from(source, options = T.unsafe(nil), parent_iseq = T.unsafe(nil)); end + + # This provides a handle to the rb_iseq_load function, which allows you + # to pass a serialized iseq to Ruby and have it return a + # RubyVM::InstructionSequence object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#13 + def iseq_load(iseq); end + end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#510 +class SyntaxTree::YARV::InstructionSequence::CatchBreak < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#511 + def to_a; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#523 +class SyntaxTree::YARV::InstructionSequence::CatchEnsure < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#524 + def to_a; end +end + +# Catch table methods +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#498 +class SyntaxTree::YARV::InstructionSequence::CatchEntry + # @return [CatchEntry] a new instance of CatchEntry + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#501 + def initialize(iseq, begin_label, end_label, exit_label, restore_sp); end + + # Returns the value of attribute begin_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 + def begin_label; end + + # Returns the value of attribute end_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 + def end_label; end + + # Returns the value of attribute exit_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 + def exit_label; end + + # Returns the value of attribute iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 + def iseq; end + + # Returns the value of attribute restore_sp. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 + def restore_sp; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#535 +class SyntaxTree::YARV::InstructionSequence::CatchNext < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#536 + def to_a; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#541 +class SyntaxTree::YARV::InstructionSequence::CatchRedo < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#542 + def to_a; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#547 +class SyntaxTree::YARV::InstructionSequence::CatchRescue < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#548 + def to_a; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#559 +class SyntaxTree::YARV::InstructionSequence::CatchRetry < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#560 + def to_a; end +end + +# When the list of instructions is first being created, it's stored as a +# linked list. This is to make it easier to perform peephole optimizations +# and other transformations like instruction specialization. +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#35 +class SyntaxTree::YARV::InstructionSequence::InstructionList + include ::Enumerable + + # @return [InstructionList] a new instance of InstructionList + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#48 + def initialize; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#53 + def each(&_blk); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#58 + def each_node; end + + # Returns the value of attribute head_node. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46 + def head_node; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#68 + def push(instruction); end + + # Returns the value of attribute tail_node. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46 + def tail_node; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#36 +class SyntaxTree::YARV::InstructionSequence::InstructionList::Node + # @return [Node] a new instance of Node + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#39 + def initialize(value, next_node = T.unsafe(nil)); end + + # Returns the value of attribute next_node. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 + def next_node; end + + # Sets the attribute next_node + # + # @param value the value to set the attribute next_node to. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 + def next_node=(_arg0); end + + # Returns the value of attribute value. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 + def value; end + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 + def value=(_arg0); end +end + +# This represents the destination of instructions that jump. Initially it +# does not track its position so that when we perform optimizations the +# indices don't get messed up. +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#107 +class SyntaxTree::YARV::InstructionSequence::Label + # @return [Label] a new instance of Label + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#115 + def initialize(name = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#123 + def inspect; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#108 + def name; end + + # When we're serializing the instruction sequence, we need to be able to + # look up the label from the branch instructions and then access the + # subsequent node. So we'll store the reference here. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113 + def node; end + + # When we're serializing the instruction sequence, we need to be able to + # look up the label from the branch instructions and then access the + # subsequent node. So we'll store the reference here. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113 + def node=(_arg0); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#119 + def patch!(name); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#83 +SyntaxTree::YARV::InstructionSequence::MAGIC = T.let(T.unsafe(nil), String) + +# This object is used to track the size of the stack at any given time. It +# is effectively a mini symbolic interpreter. It's necessary because when +# instruction sequences get serialized they include a :stack_max field on +# them. This field is used to determine how much stack space to allocate +# for the instruction sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#90 +class SyntaxTree::YARV::InstructionSequence::Stack + # @return [Stack] a new instance of Stack + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#93 + def initialize; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#98 + def change_by(value); end + + # Returns the value of attribute current_size. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91 + def current_size; end + + # Returns the value of attribute maximum_size. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91 + def maximum_size; end +end + +# ### Summary +# +# `intern` converts the top element of the stack to a symbol and pushes the +# symbol onto the stack. +# +# ### Usage +# +# ~~~ruby +# :"#{"foo"}" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2042 +class SyntaxTree::YARV::Intern < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2055 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2067 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2051 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2043 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2059 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2063 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2047 + def to_a(_iseq); end +end + +# ### Summary +# +# `invokeblock` invokes the block given to the current method. It pops the +# arguments for the block off the stack and pushes the result of running the +# block onto the stack. +# +# ### Usage +# +# ~~~ruby +# def foo +# yield +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2086 +class SyntaxTree::YARV::InvokeBlock < ::SyntaxTree::YARV::Instruction + # @return [InvokeBlock] a new instance of InvokeBlock + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2089 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2105 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2121 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2087 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2101 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2093 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2109 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2113 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2117 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2097 + def to_a(_iseq); end +end + +# ### Summary +# +# `invokesuper` is similar to the `send` instruction, except that it calls +# the super method. It pops the receiver and arguments off the stack and +# pushes the return value onto the stack. +# +# ### Usage +# +# ~~~ruby +# def foo +# super +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2140 +class SyntaxTree::YARV::InvokeSuper < ::SyntaxTree::YARV::Instruction + # @return [InvokeSuper] a new instance of InvokeSuper + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2143 + def initialize(calldata, block_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2164 + def ==(other); end + + # Returns the value of attribute block_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141 + def block_iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2178 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2160 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2148 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2169 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2174 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2156 + def to_a(_iseq); end +end + +# ### Summary +# +# `jump` unconditionally jumps to the label given as its only argument. +# +# ### Usage +# +# ~~~ruby +# x = 0 +# if x == 0 +# puts "0" +# else +# puts "2" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2217 +class SyntaxTree::YARV::Jump < ::SyntaxTree::YARV::Instruction + # @return [Jump] a new instance of Jump + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2220 + def initialize(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2236 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2248 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2244 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2232 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2224 + def disasm(fmt); end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2218 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2240 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2228 + def to_a(_iseq); end +end + +# ### Summary +# +# `leave` exits the current frame. +# +# ### Usage +# +# ~~~ruby +# ;; +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2263 +class SyntaxTree::YARV::Leave < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2276 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2290 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2272 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2264 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2294 + def leaves?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2280 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2284 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2268 + def to_a(_iseq); end +end + +# This module contains the instructions that used to be a part of YARV but +# have been replaced or removed in more recent versions. +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#7 +module SyntaxTree::YARV::Legacy; end + +# ### Summary +# +# `getclassvariable` looks for a class variable in the current class and +# pushes its value onto the stack. +# +# This version of the `getclassvariable` instruction is no longer used +# since in Ruby 3.0 it gained an inline cache.` +# +# ### Usage +# +# ~~~ruby +# @@class_variable +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#22 +class SyntaxTree::YARV::Legacy::GetClassVariable < ::SyntaxTree::YARV::Instruction + # @return [GetClassVariable] a new instance of GetClassVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#25 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#41 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#57 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#53 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#37 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#29 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#45 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#23 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#49 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#33 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_getinlinecache` is a wrapper around a series of `putobject` and +# `getconstant` instructions that allows skipping past them if the inline +# cache is currently set. It pushes the value of the cache onto the stack +# if it is set, otherwise it pushes `nil`. +# +# This instruction is no longer used since in Ruby 3.2 it was replaced by +# the consolidated `opt_getconstant_path` instruction. +# +# ### Usage +# +# ~~~ruby +# Constant +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#78 +class SyntaxTree::YARV::Legacy::OptGetInlineCache < ::SyntaxTree::YARV::Instruction + # @return [OptGetInlineCache] a new instance of OptGetInlineCache + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#81 + def initialize(label, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#101 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#118 + def branch_targets; end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#114 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#97 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#86 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#122 + def falls_through?; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#106 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#110 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#93 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_newarray_max` is a specialization that occurs when the `max` method +# is called on an array literal. It pops the values of the array off the +# stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# [a, b, c].max +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#139 +class SyntaxTree::YARV::Legacy::OptNewArrayMax < ::SyntaxTree::YARV::Instruction + # @return [OptNewArrayMax] a new instance of OptNewArrayMax + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#142 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#158 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#174 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#154 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#146 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#162 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#140 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#166 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#170 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#150 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_newarray_min` is a specialization that occurs when the `min` method +# is called on an array literal. It pops the values of the array off the +# stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# [a, b, c].min +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#191 +class SyntaxTree::YARV::Legacy::OptNewArrayMin < ::SyntaxTree::YARV::Instruction + # @return [OptNewArrayMin] a new instance of OptNewArrayMin + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#194 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#210 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#226 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#206 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#198 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#214 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#192 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#218 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#222 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#202 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_setinlinecache` sets an inline cache for a constant lookup. It pops +# the value it should set off the top of the stack. It uses this value to +# set the cache. It then pushes that value back onto the top of the stack. +# +# This instruction is no longer used since in Ruby 3.2 it was replaced by +# the consolidated `opt_getconstant_path` instruction. +# +# ### Usage +# +# ~~~ruby +# Constant +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#246 +class SyntaxTree::YARV::Legacy::OptSetInlineCache < ::SyntaxTree::YARV::Instruction + # @return [OptSetInlineCache] a new instance of OptSetInlineCache + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#249 + def initialize(cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#265 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#247 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#281 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#261 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#253 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#269 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#273 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#277 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#257 + def to_a(_iseq); end +end + +# ### Summary +# +# `setclassvariable` looks for a class variable in the current class and +# sets its value to the value it pops off the top of the stack. +# +# This version of the `setclassvariable` instruction is no longer used +# since in Ruby 3.0 it gained an inline cache. +# +# ### Usage +# +# ~~~ruby +# @@class_variable = 1 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#299 +class SyntaxTree::YARV::Legacy::SetClassVariable < ::SyntaxTree::YARV::Instruction + # @return [SetClassVariable] a new instance of SetClassVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#302 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#318 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#334 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#330 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#314 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#306 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#322 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#300 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#326 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#310 + def to_a(_iseq); end +end + +# This represents every local variable associated with an instruction +# sequence. There are two kinds of locals: plain locals that are what you +# expect, and block proxy locals, which represent local variables +# associated with blocks that were passed into the current instruction +# sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#10 +class SyntaxTree::YARV::LocalTable + # @return [LocalTable] a new instance of LocalTable + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#43 + def initialize; end + + # Add a BlockLocal to the local table. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#73 + def block(name); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#47 + def empty?; end + + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#51 + def find(name, level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#56 + def has?(name); end + + # Returns the value of attribute locals. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#41 + def locals; end + + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#64 + def name_at(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#60 + def names; end + + # This is the offset from the top of the stack where this local variable + # lives. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#84 + def offset(index); end + + # Add a PlainLocal to the local table. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#78 + def plain(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#68 + def size; end +end + +# A local representing a block passed into the current instruction +# sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#13 +class SyntaxTree::YARV::LocalTable::BlockLocal + # @return [BlockLocal] a new instance of BlockLocal + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#16 + def initialize(name); end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#14 + def name; end +end + +# The result of looking up a local variable in the current local table. +# +# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#31 +class SyntaxTree::YARV::LocalTable::Lookup + # @return [Lookup] a new instance of Lookup + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#34 + def initialize(local, index, level); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 + def index; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 + def level; end + + # Returns the value of attribute local. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 + def local; end +end + +# A regular local variable. +# +# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#22 +class SyntaxTree::YARV::LocalTable::PlainLocal + # @return [PlainLocal] a new instance of PlainLocal + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#25 + def initialize(name); end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#23 + def name; end +end + +# ### Summary +# +# `newarray` puts a new array initialized with `number` values from the +# stack. It pops `number` values off the stack and pushes the array onto the +# stack. +# +# ### Usage +# +# ~~~ruby +# ["string"] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2311 +class SyntaxTree::YARV::NewArray < ::SyntaxTree::YARV::Instruction + # @return [NewArray] a new instance of NewArray + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2314 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2330 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2346 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2326 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2318 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2334 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2312 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2338 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2342 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2322 + def to_a(_iseq); end +end + +# ### Summary +# +# `newarraykwsplat` is a specialized version of `newarray` that takes a ** +# splat argument. It pops `number` values off the stack and pushes the array +# onto the stack. +# +# ### Usage +# +# ~~~ruby +# ["string", **{ foo: "bar" }] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2363 +class SyntaxTree::YARV::NewArrayKwSplat < ::SyntaxTree::YARV::Instruction + # @return [NewArrayKwSplat] a new instance of NewArrayKwSplat + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2366 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2382 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2398 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2378 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2370 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2386 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2364 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2390 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2394 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2374 + def to_a(_iseq); end +end + +# ### Summary +# +# `newhash` puts a new hash onto the stack, using `number` elements from the +# stack. `number` needs to be even. It pops `number` elements off the stack +# and pushes a hash onto the stack. +# +# ### Usage +# +# ~~~ruby +# def foo(key, value) +# { key => value } +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2417 +class SyntaxTree::YARV::NewHash < ::SyntaxTree::YARV::Instruction + # @return [NewHash] a new instance of NewHash + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2420 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2436 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2452 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2432 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2424 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2440 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2418 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2444 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2448 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2428 + def to_a(_iseq); end +end + +# ### Summary +# +# `newrange` creates a new range object from the top two values on the +# stack. It pops both of them off, and then pushes on the new range. It +# takes one argument which is 0 if the end is included or 1 if the end value +# is excluded. +# +# ### Usage +# +# ~~~ruby +# x = 0 +# y = 1 +# p (x..y), (x...y) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2472 +class SyntaxTree::YARV::NewRange < ::SyntaxTree::YARV::Instruction + # @return [NewRange] a new instance of NewRange + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2475 + def initialize(exclude_end); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2491 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2507 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2487 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2479 + def disasm(fmt); end + + # Returns the value of attribute exclude_end. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2473 + def exclude_end; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2495 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2499 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2503 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2483 + def to_a(_iseq); end +end + +# ### Summary +# +# `nop` is a no-operation instruction. It is used to pad the instruction +# sequence so there is a place for other instructions to jump to. +# +# ### Usage +# +# ~~~ruby +# raise rescue true +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2523 +class SyntaxTree::YARV::Nop < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2536 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2540 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2532 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2524 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2543 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2528 + def to_a(_iseq); end +end + +# ### Summary +# +# `objtostring` pops a value from the stack, calls `to_s` on that value and +# then pushes the result back to the stack. +# +# It has various fast paths for classes like String, Symbol, Module, Class, +# etc. For everything else it calls `to_s`. +# +# ### Usage +# +# ~~~ruby +# "#{5}" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2562 +class SyntaxTree::YARV::ObjToString < ::SyntaxTree::YARV::Instruction + # @return [ObjToString] a new instance of ObjToString + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2565 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2581 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2597 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2563 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2577 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2569 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2585 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2589 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2593 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2573 + def to_a(_iseq); end +end + +# ### Summary +# +# `once` is an instruction that wraps an instruction sequence and ensures +# that is it only ever executed once for the lifetime of the program. It +# uses a cache to ensure that it is only executed once. It pushes the result +# of running the instruction sequence onto the stack. +# +# ### Usage +# +# ~~~ruby +# END { puts "END" } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2615 +class SyntaxTree::YARV::Once < ::SyntaxTree::YARV::Instruction + # @return [Once] a new instance of Once + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2618 + def initialize(iseq, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2636 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2648 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2632 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2623 + def disasm(fmt); end + + # Returns the value of attribute iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616 + def iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2640 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2644 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2628 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_and` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `&` operator is used. There is a fast path for if +# both operands are integers. It pops both the receiver and the argument off +# the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 & 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2668 +class SyntaxTree::YARV::OptAnd < ::SyntaxTree::YARV::Instruction + # @return [OptAnd] a new instance of OptAnd + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2671 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2687 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2707 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2669 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2703 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2683 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2675 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2691 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2695 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2699 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2679 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_aref` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `[]` operator is used. There are fast paths if the +# receiver is an integer, array, or hash. +# +# ### Usage +# +# ~~~ruby +# 7[2] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2724 +class SyntaxTree::YARV::OptAref < ::SyntaxTree::YARV::Instruction + # @return [OptAref] a new instance of OptAref + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2727 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2743 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2763 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2725 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2759 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2739 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2731 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2747 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2751 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2755 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2735 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_aref_with` is a specialization of the `opt_aref` instruction that +# occurs when the `[]` operator is used with a string argument known at +# compile time. There are fast paths if the receiver is a hash. It pops the +# receiver off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# { 'test' => true }['test'] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2781 +class SyntaxTree::YARV::OptArefWith < ::SyntaxTree::YARV::Instruction + # @return [OptArefWith] a new instance of OptArefWith + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2784 + def initialize(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2804 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2821 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2800 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2789 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2809 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2813 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2817 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2796 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_aset` is an instruction for setting the hash value by the key in +# the `recv[obj] = set` format. It is a specialization of the +# `opt_send_without_block` instruction. It pops the receiver, the key, and +# the value off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# {}[:key] = value +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2839 +class SyntaxTree::YARV::OptAset < ::SyntaxTree::YARV::Instruction + # @return [OptAset] a new instance of OptAset + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2842 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2858 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2878 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2840 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2874 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2854 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2846 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2862 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2866 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2870 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2850 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_aset_with` is an instruction for setting the hash value by the known +# string key in the `recv[obj] = set` format. It pops the receiver and the +# value off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# {}["key"] = value +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2895 +class SyntaxTree::YARV::OptAsetWith < ::SyntaxTree::YARV::Instruction + # @return [OptAsetWith] a new instance of OptAsetWith + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2898 + def initialize(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2918 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2935 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2914 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2903 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2923 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2927 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2931 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2910 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_case_dispatch` is a branch instruction that moves the control flow +# for case statements that have clauses where they can all be used as hash +# keys for an internal hash. +# +# It has two arguments: the `case_dispatch_hash` and an `else_label`. It +# pops one value off the stack: a hash key. `opt_case_dispatch` looks up the +# key in the `case_dispatch_hash` and jumps to the corresponding label if +# there is one. If there is no value in the `case_dispatch_hash`, +# `opt_case_dispatch` jumps to the `else_label` index. +# +# ### Usage +# +# ~~~ruby +# case 1 +# when 1 +# puts "foo" +# else +# puts "bar" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2964 +class SyntaxTree::YARV::OptCaseDispatch < ::SyntaxTree::YARV::Instruction + # @return [OptCaseDispatch] a new instance of OptCaseDispatch + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2967 + def initialize(case_dispatch_hash, else_label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2991 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3009 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3005 + def call(vm); end + + # Returns the value of attribute case_dispatch_hash. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965 + def case_dispatch_hash; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2987 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2972 + def disasm(fmt); end + + # Returns the value of attribute else_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965 + def else_label; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3013 + def falls_through?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2997 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3001 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2979 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_div` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `/` operator is used. There are fast paths for if +# both operands are integers, or if both operands are floats. It pops both +# the receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 / 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3031 +class SyntaxTree::YARV::OptDiv < ::SyntaxTree::YARV::Instruction + # @return [OptDiv] a new instance of OptDiv + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3034 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3050 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3070 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3032 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3066 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3046 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3038 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3054 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3058 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3062 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3042 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_empty_p` is an optimization applied when the method `empty?` is +# called. It pops the receiver off the stack and pushes on the result of the +# method call. +# +# ### Usage +# +# ~~~ruby +# "".empty? +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3087 +class SyntaxTree::YARV::OptEmptyP < ::SyntaxTree::YARV::Instruction + # @return [OptEmptyP] a new instance of OptEmptyP + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3090 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3106 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3126 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3088 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3122 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3102 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3094 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3110 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3114 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3118 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3098 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_eq` is a specialization of the `opt_send_without_block` instruction +# that occurs when the == operator is used. Fast paths exist when both +# operands are integers, floats, symbols or strings. It pops both the +# receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 == 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3144 +class SyntaxTree::YARV::OptEq < ::SyntaxTree::YARV::Instruction + # @return [OptEq] a new instance of OptEq + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3147 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3163 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3183 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3145 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3179 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3159 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3151 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3167 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3171 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3175 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3155 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_ge` is a specialization of the `opt_send_without_block` instruction +# that occurs when the >= operator is used. Fast paths exist when both +# operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 4 >= 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3201 +class SyntaxTree::YARV::OptGE < ::SyntaxTree::YARV::Instruction + # @return [OptGE] a new instance of OptGE + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3204 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3220 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3240 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3202 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3236 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3216 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3208 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3224 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3228 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3232 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3212 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_gt` is a specialization of the `opt_send_without_block` instruction +# that occurs when the > operator is used. Fast paths exist when both +# operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 4 > 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3314 +class SyntaxTree::YARV::OptGT < ::SyntaxTree::YARV::Instruction + # @return [OptGT] a new instance of OptGT + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3317 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3333 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3353 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3315 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3349 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3329 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3321 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3337 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3341 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3345 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3325 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_getconstant_path` performs a constant lookup on a chain of constant +# names. It accepts as its argument an array of constant names, and pushes +# the value of the constant onto the stack. +# +# ### Usage +# +# ~~~ruby +# ::Object +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3257 +class SyntaxTree::YARV::OptGetConstantPath < ::SyntaxTree::YARV::Instruction + # @return [OptGetConstantPath] a new instance of OptGetConstantPath + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3260 + def initialize(names); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3277 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3289 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3273 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3264 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3281 + def length; end + + # Returns the value of attribute names. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3258 + def names; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3285 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3269 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_le` is a specialization of the `opt_send_without_block` instruction +# that occurs when the <= operator is used. Fast paths exist when both +# operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 3 <= 4 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3371 +class SyntaxTree::YARV::OptLE < ::SyntaxTree::YARV::Instruction + # @return [OptLE] a new instance of OptLE + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3374 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3390 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3410 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3372 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3406 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3386 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3378 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3394 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3398 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3402 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3382 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_lt` is a specialization of the `opt_send_without_block` instruction +# that occurs when the < operator is used. Fast paths exist when both +# operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 3 < 4 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3485 +class SyntaxTree::YARV::OptLT < ::SyntaxTree::YARV::Instruction + # @return [OptLT] a new instance of OptLT + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3488 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3504 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3524 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3486 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3520 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3500 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3492 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3508 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3512 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3516 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3496 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_ltlt` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `<<` operator is used. Fast paths exists when the +# receiver is either a String or an Array. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# "" << 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3542 +class SyntaxTree::YARV::OptLTLT < ::SyntaxTree::YARV::Instruction + # @return [OptLTLT] a new instance of OptLTLT + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3545 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3561 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3581 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3543 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3577 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3557 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3549 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3565 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3569 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3573 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3553 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_length` is a specialization of `opt_send_without_block`, when the +# `length` method is called. There are fast paths when the receiver is +# either a string, hash, or array. It pops the receiver off the stack and +# pushes on the result of the method call. +# +# ### Usage +# +# ~~~ruby +# "".length +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3428 +class SyntaxTree::YARV::OptLength < ::SyntaxTree::YARV::Instruction + # @return [OptLength] a new instance of OptLength + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3431 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3447 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3467 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3429 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3463 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3443 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3435 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3451 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3455 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3459 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3439 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_minus` is a specialization of the `opt_send_without_block` +# instruction that occurs when the `-` operator is used. There are fast +# paths for if both operands are integers or if both operands are floats. It +# pops both the receiver and the argument off the stack and pushes on the +# result. +# +# ### Usage +# +# ~~~ruby +# 3 - 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3600 +class SyntaxTree::YARV::OptMinus < ::SyntaxTree::YARV::Instruction + # @return [OptMinus] a new instance of OptMinus + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3603 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3619 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3639 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3601 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3635 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3615 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3607 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3623 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3627 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3631 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3611 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_mod` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `%` operator is used. There are fast paths for if +# both operands are integers or if both operands are floats. It pops both +# the receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 4 % 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3657 +class SyntaxTree::YARV::OptMod < ::SyntaxTree::YARV::Instruction + # @return [OptMod] a new instance of OptMod + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3660 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3676 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3696 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3658 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3692 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3672 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3664 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3680 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3684 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3688 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3668 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_mult` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `*` operator is used. There are fast paths for if +# both operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 3 * 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3714 +class SyntaxTree::YARV::OptMult < ::SyntaxTree::YARV::Instruction + # @return [OptMult] a new instance of OptMult + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3717 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3733 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3753 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3715 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3749 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3729 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3721 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3737 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3741 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3745 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3725 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_neq` is an optimization that tests whether two values at the top of +# the stack are not equal by testing their equality and calling the `!` on +# the result. This allows `opt_neq` to use the fast paths optimized in +# `opt_eq` when both operands are Integers, Floats, Symbols, or Strings. It +# pops both the receiver and the argument off the stack and pushes on the +# result. +# +# ### Usage +# +# ~~~ruby +# 2 != 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3773 +class SyntaxTree::YARV::OptNEq < ::SyntaxTree::YARV::Instruction + # @return [OptNEq] a new instance of OptNEq + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3776 + def initialize(eq_calldata, neq_calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3796 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3813 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3792 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3781 + def disasm(fmt); end + + # Returns the value of attribute eq_calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774 + def eq_calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3801 + def length; end + + # Returns the value of attribute neq_calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774 + def neq_calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3805 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3809 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3788 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_newarray_send` is a specialization that occurs when a dynamic array +# literal is created and immediately sent the `min`, `max`, or `hash` +# methods. It pops the values of the array off the stack and pushes on the +# result of the method call. +# +# ### Usage +# +# ~~~ruby +# [a, b, c].max +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3832 +class SyntaxTree::YARV::OptNewArraySend < ::SyntaxTree::YARV::Instruction + # @return [OptNewArraySend] a new instance of OptNewArraySend + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3835 + def initialize(number, method); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3855 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3872 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3851 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3840 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3860 + def length; end + + # Returns the value of attribute method. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3833 + def method; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3833 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3864 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3868 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3847 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_nil_p` is an optimization applied when the method `nil?` is called. +# It returns true immediately when the receiver is `nil` and defers to the +# `nil?` method in other cases. It pops the receiver off the stack and +# pushes on the result. +# +# ### Usage +# +# ~~~ruby +# "".nil? +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3890 +class SyntaxTree::YARV::OptNilP < ::SyntaxTree::YARV::Instruction + # @return [OptNilP] a new instance of OptNilP + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3893 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3909 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3929 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3891 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3925 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3905 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3897 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3913 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3917 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3921 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3901 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_not` negates the value on top of the stack by calling the `!` method +# on it. It pops the receiver off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# !true +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3945 +class SyntaxTree::YARV::OptNot < ::SyntaxTree::YARV::Instruction + # @return [OptNot] a new instance of OptNot + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3948 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3964 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3984 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3946 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3980 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3960 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3952 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3968 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3972 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3976 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3956 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_or` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `|` operator is used. There is a fast path for if +# both operands are integers. It pops both the receiver and the argument off +# the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 | 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4002 +class SyntaxTree::YARV::OptOr < ::SyntaxTree::YARV::Instruction + # @return [OptOr] a new instance of OptOr + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4005 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4021 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4041 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4003 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4037 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4017 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4009 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4025 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4029 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4033 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4013 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_plus` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `+` operator is used. There are fast paths for if +# both operands are integers, floats, strings, or arrays. It pops both the +# receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 + 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4059 +class SyntaxTree::YARV::OptPlus < ::SyntaxTree::YARV::Instruction + # @return [OptPlus] a new instance of OptPlus + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4062 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4078 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4098 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4060 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4094 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4074 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4066 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4082 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4086 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4090 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4070 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_regexpmatch2` is a specialization of the `opt_send_without_block` +# instruction that occurs when the `=~` operator is used. It pops both the +# receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# /a/ =~ "a" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4115 +class SyntaxTree::YARV::OptRegExpMatch2 < ::SyntaxTree::YARV::Instruction + # @return [OptRegExpMatch2] a new instance of OptRegExpMatch2 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4118 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4134 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4154 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4116 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4150 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4130 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4122 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4138 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4142 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4146 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4126 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_send_without_block` is a specialization of the send instruction that +# occurs when a method is being called without a block. It pops the receiver +# and the arguments off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# puts "Hello, world!" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4171 +class SyntaxTree::YARV::OptSendWithoutBlock < ::SyntaxTree::YARV::Instruction + # @return [OptSendWithoutBlock] a new instance of OptSendWithoutBlock + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4174 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4190 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4210 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4172 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4206 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4186 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4178 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4194 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4198 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4202 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4182 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_size` is a specialization of `opt_send_without_block`, when the +# `size` method is called. There are fast paths when the receiver is either +# a string, hash, or array. It pops the receiver off the stack and pushes on +# the result. +# +# ### Usage +# +# ~~~ruby +# "".size +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4228 +class SyntaxTree::YARV::OptSize < ::SyntaxTree::YARV::Instruction + # @return [OptSize] a new instance of OptSize + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4231 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4247 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4267 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4229 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4263 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4243 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4235 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4251 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4255 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4259 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4239 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_str_freeze` pushes a frozen known string value with no interpolation +# onto the stack using the #freeze method. If the method gets overridden, +# this will fall back to a send. +# +# ### Usage +# +# ~~~ruby +# "hello".freeze +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4284 +class SyntaxTree::YARV::OptStrFreeze < ::SyntaxTree::YARV::Instruction + # @return [OptStrFreeze] a new instance of OptStrFreeze + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4287 + def initialize(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4307 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4320 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4303 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4292 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4312 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4316 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4299 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_str_uminus` pushes a frozen known string value with no interpolation +# onto the stack. If the method gets overridden, this will fall back to a +# send. +# +# ### Usage +# +# ~~~ruby +# -"string" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4337 +class SyntaxTree::YARV::OptStrUMinus < ::SyntaxTree::YARV::Instruction + # @return [OptStrUMinus] a new instance of OptStrUMinus + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4340 + def initialize(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4360 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4373 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4356 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4345 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4365 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4369 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4352 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_succ` is a specialization of the `opt_send_without_block` instruction +# when the method being called is `succ`. Fast paths exist when the receiver +# is either a String or a Fixnum. It pops the receiver off the stack and +# pushes on the result. +# +# ### Usage +# +# ~~~ruby +# "".succ +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4391 +class SyntaxTree::YARV::OptSucc < ::SyntaxTree::YARV::Instruction + # @return [OptSucc] a new instance of OptSucc + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4394 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4410 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4430 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4392 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4426 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4406 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4398 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4414 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4418 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4422 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4402 + def to_a(_iseq); end +end + +# ### Summary +# +# `pop` pops the top value off the stack. +# +# ### Usage +# +# ~~~ruby +# a ||= 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4445 +class SyntaxTree::YARV::Pop < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4458 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4466 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4454 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4446 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4462 + def pops; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4470 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4450 + def to_a(_iseq); end +end + +# ### Summary +# +# `putnil` pushes a global nil object onto the stack. +# +# ### Usage +# +# ~~~ruby +# nil +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4485 +class SyntaxTree::YARV::PutNil < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4498 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4510 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4506 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4494 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4486 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4502 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4514 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4490 + def to_a(_iseq); end +end + +# ### Summary +# +# `putobject` pushes a known value onto the stack. +# +# ### Usage +# +# ~~~ruby +# 5 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4529 +class SyntaxTree::YARV::PutObject < ::SyntaxTree::YARV::Instruction + # @return [PutObject] a new instance of PutObject + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4532 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4548 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4560 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4544 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4536 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4552 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4530 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4556 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4564 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4540 + def to_a(_iseq); end +end + +# ### Summary +# +# `putobject_INT2FIX_0_` pushes 0 on the stack. It is a specialized +# instruction resulting from the operand unification optimization. It is +# equivalent to `putobject 0`. +# +# ### Usage +# +# ~~~ruby +# 0 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4581 +class SyntaxTree::YARV::PutObjectInt2Fix0 < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4594 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4606 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4602 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4590 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4582 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4598 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4610 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4586 + def to_a(_iseq); end +end + +# ### Summary +# +# `putobject_INT2FIX_1_` pushes 1 on the stack. It is a specialized +# instruction resulting from the operand unification optimization. It is +# equivalent to `putobject 1`. +# +# ### Usage +# +# ~~~ruby +# 1 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4627 +class SyntaxTree::YARV::PutObjectInt2Fix1 < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4640 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4652 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4648 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4636 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4628 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4644 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4656 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4632 + def to_a(_iseq); end +end + +# ### Summary +# +# `putself` pushes the current value of self onto the stack. +# +# ### Usage +# +# ~~~ruby +# puts "Hello, world!" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4671 +class SyntaxTree::YARV::PutSelf < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4684 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4692 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4680 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4672 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4688 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4696 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4676 + def to_a(_iseq); end +end + +# ### Summary +# +# `putspecialobject` pushes one of three special objects onto the stack. +# These are either the VM core special object, the class base special +# object, or the constant base special object. +# +# ### Usage +# +# ~~~ruby +# alias foo bar +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4713 +class SyntaxTree::YARV::PutSpecialObject < ::SyntaxTree::YARV::Instruction + # @return [PutSpecialObject] a new instance of PutSpecialObject + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4720 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4736 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4748 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4732 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4724 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4740 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4718 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4744 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4728 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4715 +SyntaxTree::YARV::PutSpecialObject::OBJECT_CBASE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4716 +SyntaxTree::YARV::PutSpecialObject::OBJECT_CONST_BASE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4714 +SyntaxTree::YARV::PutSpecialObject::OBJECT_VMCORE = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `putstring` pushes an unfrozen string literal onto the stack. +# +# ### Usage +# +# ~~~ruby +# "foo" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4772 +class SyntaxTree::YARV::PutString < ::SyntaxTree::YARV::Instruction + # @return [PutString] a new instance of PutString + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4775 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4791 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4803 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4787 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4779 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4795 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4773 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4799 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4783 + def to_a(_iseq); end +end + +# A sea of nodes is an intermediate representation used by a compiler to +# represent both control and data flow in the same graph. The way we use it +# allows us to have the vertices of the graph represent either an +# instruction in the instruction sequence or a synthesized node that we add +# to the graph. The edges of the graph represent either control flow or data +# flow. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#11 +class SyntaxTree::YARV::SeaOfNodes + # @return [SeaOfNodes] a new instance of SeaOfNodes + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#462 + def initialize(dfg, nodes, local_graphs); end + + # Returns the value of attribute dfg. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 + def dfg; end + + # Returns the value of attribute local_graphs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 + def local_graphs; end + + # Returns the value of attribute nodes. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 + def nodes; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#468 + def to_mermaid; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#499 + def verify; end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#529 + def compile(dfg); end + end +end + +# The compiler is responsible for taking a data flow graph and turning it +# into a sea of nodes. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#100 +class SyntaxTree::YARV::SeaOfNodes::Compiler + # @return [Compiler] a new instance of Compiler + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#103 + def initialize(dfg); end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#113 + def compile; end + + # Returns the value of attribute dfg. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101 + def dfg; end + + # Returns the value of attribute nodes. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101 + def nodes; end + + private + + # Eliminate as many unnecessary nodes as we can. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#339 + def cleanup_insn_nodes; end + + # We don't always build things in an optimal way. Go back and fix up + # some mess we left. Ideally we wouldn't create these problems in the + # first place. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#315 + def cleanup_phi_nodes; end + + # Connect one node to another. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#423 + def connect(from, to, type, label = T.unsafe(nil)); end + + # Connect control flow that flows between basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#246 + def connect_local_graphs_control(local_graphs); end + + # Connect data flow that flows between basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#271 + def connect_local_graphs_data(local_graphs); end + + # Connect all of the inputs to all of the outputs of a node. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#433 + def connect_over(node); end + + # Create a sub-graph for a single basic block - block block argument + # inputs and outputs will be left dangling, to be connected later. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#136 + def create_local_graph(block); end + + # Counter for synthetic nodes. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#130 + def id_counter; end + + # Remove a node from the graph. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#447 + def remove(node); end +end + +# The edge of a graph represents either control flow or data flow. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#67 +class SyntaxTree::YARV::SeaOfNodes::Edge + # @return [Edge] a new instance of Edge + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#75 + def initialize(from, to, type, label); end + + # Returns the value of attribute from. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#70 + def from; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#73 + def label; end + + # Returns the value of attribute to. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#71 + def to; end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#72 + def type; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#68 +SyntaxTree::YARV::SeaOfNodes::Edge::TYPES = T.let(T.unsafe(nil), Array) + +# This object represents a node in the graph that holds a YARV +# instruction. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#14 +class SyntaxTree::YARV::SeaOfNodes::InsnNode + # @return [InsnNode] a new instance of InsnNode + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#17 + def initialize(insn, offset); end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#25 + def id; end + + # Returns the value of attribute inputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 + def inputs; end + + # Returns the value of attribute insn. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 + def insn; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#29 + def label; end + + # Returns the value of attribute offset. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 + def offset; end + + # Returns the value of attribute outputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 + def outputs; end +end + +# Merge nodes are present in any block that has multiple incoming blocks. +# It provides a place for Phi nodes to attach their results. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#52 +class SyntaxTree::YARV::SeaOfNodes::MergeNode + # @return [MergeNode] a new instance of MergeNode + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#55 + def initialize(id); end + + # Returns the value of attribute id. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 + def id; end + + # Returns the value of attribute inputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 + def inputs; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#61 + def label; end + + # Returns the value of attribute outputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 + def outputs; end +end + +# Phi nodes are used to represent the merging of data flow from multiple +# incoming blocks. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#36 +class SyntaxTree::YARV::SeaOfNodes::PhiNode + # @return [PhiNode] a new instance of PhiNode + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#39 + def initialize(id); end + + # Returns the value of attribute id. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 + def id; end + + # Returns the value of attribute inputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 + def inputs; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#45 + def label; end + + # Returns the value of attribute outputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 + def outputs; end +end + +# A subgraph represents the local data and control flow of a single basic +# block. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#87 +class SyntaxTree::YARV::SeaOfNodes::SubGraph + # @return [SubGraph] a new instance of SubGraph + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#90 + def initialize(first_fixed, last_fixed, inputs, outputs); end + + # Returns the value of attribute first_fixed. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 + def first_fixed; end + + # Returns the value of attribute inputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 + def inputs; end + + # Returns the value of attribute last_fixed. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 + def last_fixed; end + + # Returns the value of attribute outputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 + def outputs; end +end + +# ### Summary +# +# `send` invokes a method with an optional block. It pops its receiver and +# the arguments for the method off the stack and pushes the return value +# onto the stack. It has two arguments: the calldata for the call site and +# the optional block instruction sequence. +# +# ### Usage +# +# ~~~ruby +# "hello".tap { |i| p i } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4821 +class SyntaxTree::YARV::Send < ::SyntaxTree::YARV::Instruction + # @return [Send] a new instance of Send + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4824 + def initialize(calldata, block_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4845 + def ==(other); end + + # Returns the value of attribute block_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4822 + def block_iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4863 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4822 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4841 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4829 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4850 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4854 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4859 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4837 + def to_a(_iseq); end +end + +# ### Summary +# +# `setblockparam` sets the value of a block local variable on a frame +# determined by the level and index arguments. The level is the number of +# frames back to look and the index is the index in the local table. It pops +# the value it is setting off the stack. +# +# ### Usage +# +# ~~~ruby +# def foo(&bar) +# bar = baz +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4905 +class SyntaxTree::YARV::SetBlockParam < ::SyntaxTree::YARV::Instruction + # @return [SetBlockParam] a new instance of SetBlockParam + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4908 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4927 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4940 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4923 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4913 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4906 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4932 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4906 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4936 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4917 + def to_a(iseq); end +end + +# ### Summary +# +# `setclassvariable` looks for a class variable in the current class and +# sets its value to the value it pops off the top of the stack. It uses an +# inline cache to reduce the need to lookup the class variable in the class +# hierarchy every time. +# +# ### Usage +# +# ~~~ruby +# @@class_variable = 1 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4958 +class SyntaxTree::YARV::SetClassVariable < ::SyntaxTree::YARV::Instruction + # @return [SetClassVariable] a new instance of SetClassVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4961 + def initialize(name, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4981 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4994 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4977 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4966 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4986 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4990 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4973 + def to_a(_iseq); end +end + +# ### Summary +# +# `setconstant` pops two values off the stack: the value to set the +# constant to and the constant base to set it in. +# +# ### Usage +# +# ~~~ruby +# Constant = 1 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5012 +class SyntaxTree::YARV::SetConstant < ::SyntaxTree::YARV::Instruction + # @return [SetConstant] a new instance of SetConstant + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5015 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5031 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5043 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5027 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5019 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5035 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5013 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5039 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5023 + def to_a(_iseq); end +end + +# ### Summary +# +# `setglobal` sets the value of a global variable to a value popped off the +# top of the stack. +# +# ### Usage +# +# ~~~ruby +# $global = 5 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5060 +class SyntaxTree::YARV::SetGlobal < ::SyntaxTree::YARV::Instruction + # @return [SetGlobal] a new instance of SetGlobal + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5063 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5079 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5091 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5075 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5067 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5083 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5061 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5087 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5071 + def to_a(_iseq); end +end + +# ### Summary +# +# `setinstancevariable` pops a value off the top of the stack and then sets +# the instance variable associated with the instruction to that value. +# +# This instruction has two forms, but both have the same structure. Before +# Ruby 3.2, the inline cache corresponded to both the get and set +# instructions and could be shared. Since Ruby 3.2, it uses object shapes +# instead so the caches are unique per instruction. +# +# ### Usage +# +# ~~~ruby +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5114 +class SyntaxTree::YARV::SetInstanceVariable < ::SyntaxTree::YARV::Instruction + # @return [SetInstanceVariable] a new instance of SetInstanceVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5117 + def initialize(name, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5137 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5115 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5150 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5133 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5122 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5142 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5115 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5146 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5129 + def to_a(_iseq); end +end + +# ### Summary +# +# `setlocal` sets the value of a local variable on a frame determined by the +# level and index arguments. The level is the number of frames back to +# look and the index is the index in the local table. It pops the value it +# is setting off the stack. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# tap { tap { value = 10 } } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5170 +class SyntaxTree::YARV::SetLocal < ::SyntaxTree::YARV::Instruction + # @return [SetLocal] a new instance of SetLocal + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5173 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5192 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5204 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5188 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5178 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5171 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5196 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5171 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5200 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5182 + def to_a(iseq); end +end + +# ### Summary +# +# `setlocal_WC_0` is a specialized version of the `setlocal` instruction. It +# sets the value of a local variable on the current frame to the value at +# the top of the stack as determined by the index given as its only +# argument. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5222 +class SyntaxTree::YARV::SetLocalWC0 < ::SyntaxTree::YARV::Instruction + # @return [SetLocalWC0] a new instance of SetLocalWC0 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5225 + def initialize(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5241 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5257 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5253 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5237 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5229 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5223 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5245 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5249 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5233 + def to_a(iseq); end +end + +# ### Summary +# +# `setlocal_WC_1` is a specialized version of the `setlocal` instruction. It +# sets the value of a local variable on the parent frame to the value at the +# top of the stack as determined by the index given as its only argument. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# self.then { value = 10 } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5275 +class SyntaxTree::YARV::SetLocalWC1 < ::SyntaxTree::YARV::Instruction + # @return [SetLocalWC1] a new instance of SetLocalWC1 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5278 + def initialize(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5294 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5310 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5306 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5290 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5282 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5276 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5298 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5302 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5286 + def to_a(iseq); end +end + +# ### Summary +# +# `setn` sets a value in the stack to a value popped off the top of the +# stack. It then pushes that value onto the top of the stack as well. +# +# ### Usage +# +# ~~~ruby +# {}[:key] = 'val' +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5326 +class SyntaxTree::YARV::SetN < ::SyntaxTree::YARV::Instruction + # @return [SetN] a new instance of SetN + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5329 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5345 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5361 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5341 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5333 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5349 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5327 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5353 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5357 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5337 + def to_a(_iseq); end +end + +# ### Summary +# +# `setspecial` pops a value off the top of the stack and sets a special +# local variable to that value. The special local variable is determined by +# the key given as its only argument. +# +# ### Usage +# +# ~~~ruby +# baz if (foo == 1) .. (bar == 1) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5378 +class SyntaxTree::YARV::SetSpecial < ::SyntaxTree::YARV::Instruction + # @return [SetSpecial] a new instance of SetSpecial + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5381 + def initialize(key); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5397 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5409 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5393 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5385 + def disasm(fmt); end + + # Returns the value of attribute key. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5379 + def key; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5401 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5405 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5389 + def to_a(_iseq); end +end + +# ### Summary +# +# `splatarray` coerces the array object at the top of the stack into Array +# by calling `to_a`. It pushes a duplicate of the array if there is a flag, +# and the original array if there isn't one. +# +# ### Usage +# +# ~~~ruby +# x = *(5) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5433 +class SyntaxTree::YARV::SplatArray < ::SyntaxTree::YARV::Instruction + # @return [SplatArray] a new instance of SplatArray + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5436 + def initialize(flag); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5452 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5468 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5448 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5440 + def disasm(fmt); end + + # Returns the value of attribute flag. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5434 + def flag; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5456 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5460 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5464 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5444 + def to_a(_iseq); end +end + +# ### Summary +# +# `swap` swaps the top two elements in the stack. +# +# ### TracePoint +# +# `swap` does not dispatch any events. +# +# ### Usage +# +# ~~~ruby +# !!defined?([[]]) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5507 +class SyntaxTree::YARV::Swap < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5520 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5532 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5516 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5508 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5524 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5528 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5512 + def to_a(_iseq); end +end + +# ### Summary +# +# `throw` pops a value off the top of the stack and throws it. It is caught +# using the instruction sequence's (or an ancestor's) catch table. It pushes +# on the result of throwing the value. +# +# ### Usage +# +# ~~~ruby +# [1, 2, 3].map { break 2 } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5550 +class SyntaxTree::YARV::Throw < ::SyntaxTree::YARV::Instruction + # @return [Throw] a new instance of Throw + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5566 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5582 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5598 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5578 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5570 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5586 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5590 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5594 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5574 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5564 + def type; end + + private + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5625 + def error_backtrace(vm); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5553 +SyntaxTree::YARV::Throw::RUBY_TAG_BREAK = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5559 +SyntaxTree::YARV::Throw::RUBY_TAG_FATAL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5554 +SyntaxTree::YARV::Throw::RUBY_TAG_NEXT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5551 +SyntaxTree::YARV::Throw::RUBY_TAG_NONE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5557 +SyntaxTree::YARV::Throw::RUBY_TAG_RAISE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5556 +SyntaxTree::YARV::Throw::RUBY_TAG_REDO = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5555 +SyntaxTree::YARV::Throw::RUBY_TAG_RETRY = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5552 +SyntaxTree::YARV::Throw::RUBY_TAG_RETURN = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5558 +SyntaxTree::YARV::Throw::RUBY_TAG_THROW = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5561 +SyntaxTree::YARV::Throw::VM_THROW_NO_ESCAPE_FLAG = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5562 +SyntaxTree::YARV::Throw::VM_THROW_STATE_MASK = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `toregexp` pops a number of values off the stack, combines them into a new +# regular expression, and pushes the new regular expression onto the stack. +# +# ### Usage +# +# ~~~ruby +# /foo #{bar}/ +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5700 +class SyntaxTree::YARV::ToRegExp < ::SyntaxTree::YARV::Instruction + # @return [ToRegExp] a new instance of ToRegExp + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5703 + def initialize(options, length); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5720 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5733 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5716 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5708 + def disasm(fmt); end + + # Returns the value of attribute length. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5701 + def length; end + + # Returns the value of attribute options. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5701 + def options; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5725 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5729 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5712 + def to_a(_iseq); end +end + +# ### Summary +# +# `topn` pushes a single value onto the stack that is a copy of the value +# within the stack that is `number` of slots down from the top. +# +# ### Usage +# +# ~~~ruby +# case 3 +# when 1..5 +# puts "foo" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5653 +class SyntaxTree::YARV::TopN < ::SyntaxTree::YARV::Instruction + # @return [TopN] a new instance of TopN + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5656 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5672 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5684 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5668 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5660 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5676 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5654 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5680 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5664 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#8 +class SyntaxTree::YARV::VM + extend ::Forwardable + + # @return [VM] a new instance of VM + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#216 + def initialize(events = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#623 + def catch(tag, &block); end + + # Helper methods for instructions + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#494 + def const_base; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#610 + def eval(source, binding = T.unsafe(nil), filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Returns the value of attribute events. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#209 + def events; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#344 + def find_catch_entry(frame, type); end + + # Returns the value of attribute frame. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#214 + def frame; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#498 + def frame_at(level); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#504 + def frame_svar; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#510 + def frame_yield; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#516 + def frozen_core; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#520 + def jump(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#524 + def leave; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#606 + def load(filepath); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#528 + def local_get(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#532 + def local_set(index, level, value); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pop(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def push(*args, **_arg1, &block); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#598 + def require(filepath); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#549 + def require_internal(filepath, loading: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#602 + def require_relative(filepath); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#543 + def require_resolved(filepath); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#360 + def run_block_frame(iseq, frame, *args, **kwargs, &block); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#366 + def run_class_frame(iseq, clazz); end + + # Helper methods for frames + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#230 + def run_frame(frame); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#370 + def run_method_frame(name, nesting, iseq, _self, *args, **kwargs, &block); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#384 + def run_rescue_frame(iseq, frame, error); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#356 + def run_top_frame(iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#391 + def setup_arguments(iseq, args, kwargs, block); end + + # Returns the value of attribute stack. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#211 + def stack; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#619 + def throw(tag, value = T.unsafe(nil)); end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#222 + def run(iseq); end + end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#48 +class SyntaxTree::YARV::VM::BlockFrame < ::SyntaxTree::YARV::VM::Frame + # @return [BlockFrame] a new instance of BlockFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#49 + def initialize(iseq, parent, stack_index); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#89 +class SyntaxTree::YARV::VM::BreakError < ::SyntaxTree::YARV::VM::ThrownError; end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#64 +class SyntaxTree::YARV::VM::ClassFrame < ::SyntaxTree::YARV::VM::Frame + # @return [ClassFrame] a new instance of ClassFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#65 + def initialize(iseq, parent, stack_index, _self); end +end + +# Methods for overriding runtime behavior +# +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#540 +SyntaxTree::YARV::VM::DLEXT = T.let(T.unsafe(nil), String) + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#205 +SyntaxTree::YARV::VM::FROZEN_CORE = T.let(T.unsafe(nil), SyntaxTree::YARV::VM::FrozenCore) + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#25 +class SyntaxTree::YARV::VM::Frame + # @return [Frame] a new instance of Frame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#29 + def initialize(iseq, parent, stack_index, _self, nesting); end + + # Returns the value of attribute _self. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def _self; end + + # Returns the value of attribute iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def iseq; end + + # Returns the value of attribute line. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 + def line; end + + # Sets the attribute line + # + # @param value the value to set the attribute line to. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 + def line=(_arg0); end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def nesting; end + + # Returns the value of attribute parent. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def parent; end + + # Returns the value of attribute pc. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 + def pc; end + + # Sets the attribute pc + # + # @param value the value to set the attribute pc to. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 + def pc=(_arg0); end + + # Returns the value of attribute stack_index. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def stack_index; end + + # Returns the value of attribute svars. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def svars; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#95 +class SyntaxTree::YARV::VM::FrozenCore; end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#9 +class SyntaxTree::YARV::VM::Jump + # @return [Jump] a new instance of Jump + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#12 + def initialize(label); end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#10 + def label; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#17 +class SyntaxTree::YARV::VM::Leave + # @return [Leave] a new instance of Leave + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#20 + def initialize(value); end + + # Returns the value of attribute value. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#18 + def value; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#54 +class SyntaxTree::YARV::VM::MethodFrame < ::SyntaxTree::YARV::VM::Frame + # @return [MethodFrame] a new instance of MethodFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#57 + def initialize(iseq, nesting, parent, stack_index, _self, name, block); end + + # Returns the value of attribute block. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55 + def block; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55 + def name; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#92 +class SyntaxTree::YARV::VM::NextError < ::SyntaxTree::YARV::VM::ThrownError; end + +# This is the main entrypoint for events firing in the VM, which allows +# us to implement tracing. +# +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#122 +class SyntaxTree::YARV::VM::NullEvents + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#123 + def publish_frame_change(frame); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#126 + def publish_instruction(iseq, insn); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#129 + def publish_stack_change(stack); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#132 + def publish_tracepoint(event); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#70 +class SyntaxTree::YARV::VM::RescueFrame < ::SyntaxTree::YARV::VM::Frame + # @return [RescueFrame] a new instance of RescueFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#71 + def initialize(iseq, parent, stack_index); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#86 +class SyntaxTree::YARV::VM::ReturnError < ::SyntaxTree::YARV::VM::ThrownError; end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#541 +SyntaxTree::YARV::VM::SOEXT = T.let(T.unsafe(nil), String) + +# This is a simple implementation of tracing that prints to STDOUT. +# +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#137 +class SyntaxTree::YARV::VM::STDOUTEvents + # @return [STDOUTEvents] a new instance of STDOUTEvents + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#140 + def initialize; end + + # Returns the value of attribute disassembler. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#138 + def disassembler; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#144 + def publish_frame_change(frame); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#148 + def publish_instruction(iseq, insn); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#153 + def publish_stack_change(stack); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#157 + def publish_tracepoint(event); end +end + +# This represents the global VM stack. It effectively is an array, but +# wraps mutating functions with instrumentation. +# +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#164 +class SyntaxTree::YARV::VM::Stack + # @return [Stack] a new instance of Stack + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#167 + def initialize(events); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#196 + def [](*_arg0, **_arg1, &_arg2); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#200 + def []=(*_arg0, **_arg1, &_arg2); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#172 + def concat(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute events. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165 + def events; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#176 + def last; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#180 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#188 + def pop(*_arg0, **_arg1, &_arg2); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#184 + def push(*_arg0, **_arg1, &_arg2); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#192 + def slice!(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute values. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165 + def values; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#76 +class SyntaxTree::YARV::VM::ThrownError < ::StandardError + # @return [ThrownError] a new instance of ThrownError + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#79 + def initialize(value, backtrace); end + + # Returns the value of attribute value. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#77 + def value; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#42 +class SyntaxTree::YARV::VM::TopFrame < ::SyntaxTree::YARV::VM::Frame + # @return [TopFrame] a new instance of TopFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#43 + def initialize(iseq); end +end + +# Yield represents using the +yield+ keyword with arguments. +# +# yield value +# +# source://syntax_tree//lib/syntax_tree/node.rb#12273 +class SyntaxTree::YieldNode < ::SyntaxTree::Node + # @return [YieldNode] a new instance of YieldNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#12280 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12334 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12286 + def accept(visitor); end + + # [nil | Args | Paren] the arguments passed to the yield + # + # source://syntax_tree//lib/syntax_tree/node.rb#12275 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12290 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12278 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12294 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12290 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12307 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12311 + def format(q); end +end + +# ZSuper represents the bare +super+ keyword with no arguments. +# +# super +# +# source://syntax_tree//lib/syntax_tree/node.rb#12343 +class SyntaxTree::ZSuper < ::SyntaxTree::Node + # @return [ZSuper] a new instance of ZSuper + # + # source://syntax_tree//lib/syntax_tree/node.rb#12347 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12377 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12352 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12356 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12345 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12360 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12356 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12369 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12373 + def format(q); end +end diff --git a/sorbet/rbi/gems/tapioca@0.10.1.rbi b/sorbet/rbi/gems/tapioca@0.11.9.rbi similarity index 70% rename from sorbet/rbi/gems/tapioca@0.10.1.rbi rename to sorbet/rbi/gems/tapioca@0.11.9.rbi index c86a56a..8b41007 100644 --- a/sorbet/rbi/gems/tapioca@0.10.1.rbi +++ b/sorbet/rbi/gems/tapioca@0.11.9.rbi @@ -5,7 +5,26 @@ # Please instead update this file by running `bin/tapioca gem tapioca`. class Bundler::Dependency < ::Gem::Dependency - include ::Tapioca::Gemfile::AutoRequireHook + include ::Tapioca::BundlerExt::AutoRequireHook +end + +# source://tapioca//lib/tapioca/helpers/git_attributes.rb#4 +class GitAttributes + class << self + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#9 + sig { params(path: ::Pathname).void } + def create_generated_attribute_file(path); end + + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#16 + sig { params(path: ::Pathname).void } + def create_vendored_attribute_file(path); end + + private + + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#25 + sig { params(path: ::Pathname, content: ::String).void } + def create_gitattributes_file(path, content); end + end end # We need to do the alias-method-chain dance since Bootsnap does the same, @@ -15,18 +34,18 @@ end # That's because RubyGems does alias-method-chain for Kernel#require and such, # so, if Bootsnap were to do prepend, it might end up breaking RubyGems. # -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#65 +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#68 class Module - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#82 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#101 def append_features(constant); end - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#68 + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#71 def autoload(const_name, path); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#94 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#111 def extend_object(obj); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#70 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#91 def prepend_features(constant); end end @@ -35,7 +54,7 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.0.15/lib/rbi/model.rb#115 + # source://rbi/0.1.1/lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -45,19 +64,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.0.15/lib/rbi/model.rb#122 + # source://rbi/0.1.1/lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.0.15/lib/rbi/printer.rb#224 + # source://rbi/0.1.1/lib/rbi/printer.rb#226 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi/0.0.15/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.1.1/lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.0.15/lib/rbi/rewriters/annotate.rb#48 + # source://rbi/0.1.1/lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end @@ -83,17 +102,18 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(name: ::String).void } def create_include(name); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#88 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, parameters: T::Array[::RBI::TypedParam], return_type: ::String, class_method: T::Boolean, - visibility: ::RBI::Visibility + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] ).void end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end # source://tapioca//lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } @@ -104,7 +124,7 @@ class RBI::Tree < ::RBI::NodeWithComments def create_module(name, &block); end # source://tapioca//lib/tapioca/rbi_ext/model.rb#9 - sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).void } + sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end # source://tapioca//lib/tapioca/rbi_ext/model.rb#74 @@ -120,23 +140,23 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi/0.0.15/lib/rbi/rewriters/deannotate.rb#40 + # source://rbi/0.1.1/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.0.15/lib/rbi/model.rb#128 + # source://rbi/0.1.1/lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.0.15/lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi/0.1.1/lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end - # source://rbi/0.0.15/lib/rbi/index.rb#64 + # source://rbi/0.1.1/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.0.15/lib/rbi/rewriters/merge_trees.rb#318 + # source://rbi/0.1.1/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -147,56 +167,58 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.0.15/lib/rbi/rewriters/nest_non_public_methods.rb#45 + # source://rbi/0.1.1/lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi/0.0.15/lib/rbi/rewriters/nest_singleton_methods.rb#35 + # source://rbi/0.1.1/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.0.15/lib/rbi/model.rb#106 + # source://rbi/0.1.1/lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.0.15/lib/rbi/printer.rb#231 + # source://rbi/0.1.1/lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi/0.0.15/lib/rbi/rewriters/sort_nodes.rb#105 + # source://rbi/0.1.1/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end private - # source://tapioca//lib/tapioca/rbi_ext/model.rb#108 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#116 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#103 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#111 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://tapioca//lib/tapioca/rbi_ext/model.rb#118 +# source://tapioca//lib/tapioca/rbi_ext/model.rb#126 class RBI::TypedParam < ::T::Struct const :param, ::RBI::Param const :type, ::String class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end -# source://rbi/0.0.15/lib/rbi/version.rb#5 -RBI::VERSION = T.let(T.unsafe(nil), String) - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#5 module T::Generic + include ::Kernel + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end @@ -216,6 +238,9 @@ module T::Generic::TypeStoragePatch # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end @@ -231,9 +256,6 @@ module T::Private::Methods end end -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/_methods.rb#29 -T::Private::Methods::ARG_NOT_PROVIDED = T.let(T.unsafe(nil), Object) - class T::Private::Methods::Declaration < ::Struct def bind; end def bind=(_); end @@ -288,203 +310,12 @@ class T::Private::Methods::DeclarationBlock < ::Struct end end -module T::Private::Methods::MethodHooks - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/_methods.rb#517 - def method_added(name); end -end - -module T::Private::Methods::Modes - class << self - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#8 - def abstract; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#11 - def overridable; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#17 - def overridable_override; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#14 - def override; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#5 - def standard; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#20 - def untyped; end - end -end - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#23 -T::Private::Methods::Modes::MODES = T.let(T.unsafe(nil), Array) - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#27 -T::Private::Methods::Modes::NON_OVERRIDE_MODES = T.let(T.unsafe(nil), Array) - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#25 -T::Private::Methods::Modes::OVERRIDABLE_MODES = T.let(T.unsafe(nil), Array) - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/modes.rb#26 -T::Private::Methods::Modes::OVERRIDE_MODES = T.let(T.unsafe(nil), Array) - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/_methods.rb#30 -T::Private::Methods::PROC_TYPE = T.let(T.unsafe(nil), Object) - # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#29 module T::Private::Methods::ProcBindPatch # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30 def finalize_proc(decl); end end -class T::Private::Methods::Signature - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#36 - def initialize(method:, method_name:, raw_arg_types:, raw_return_type:, bind:, mode:, check_level:, on_failure:, parameters: T.unsafe(nil), override_allow_incompatible: T.unsafe(nil), defined_raw: T.unsafe(nil)); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#149 - def arg_count; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def arg_types; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#143 - def as_alias(alias_name); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def bind; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def block_name; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def block_type; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def check_level; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def defined_raw; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#161 - def dsl_method; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#166 - def each_args_value_type(args); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def has_keyrest; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def has_rest; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def keyrest_name; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def keyrest_type; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#153 - def kwarg_names; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def kwarg_types; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def method; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#215 - def method_desc; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def method_name; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def mode; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def on_failure; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def override_allow_incompatible; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#157 - def owner; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def parameters; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def req_arg_count; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def req_kwarg_names; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def rest_name; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def rest_type; end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#5 - def return_type; end - - protected - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#140 - def method_name=(_arg0); end - - class << self - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#11 - def new_untyped(method:, mode: T.unsafe(nil), parameters: T.unsafe(nil)); end - end -end - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature.rb#224 -T::Private::Methods::Signature::EMPTY_HASH = T.let(T.unsafe(nil), Hash) - -module T::Private::Methods::SignatureValidation - class << self - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#8 - def validate(signature); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#79 - def validate_non_override_mode(signature); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#58 - def validate_override_mode(signature, super_signature); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#116 - def validate_override_shape(signature, super_signature); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#172 - def validate_override_types(signature, super_signature); end - - private - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#211 - def base_override_loc_str(signature, super_signature); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#217 - def method_loc_str(method); end - - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#50 - def pretty_mode(signature); end - end -end - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#5 -T::Private::Methods::SignatureValidation::Methods = T::Private::Methods - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/signature_validation.rb#6 -T::Private::Methods::SignatureValidation::Modes = T::Private::Methods::Modes - -module T::Private::Methods::SingletonMethodHooks - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/_methods.rb#524 - def singleton_method_added(name); end -end - -# source://sorbet-runtime/0.5.10439/lib/types/private/methods/_methods.rb#581 -T::Private::Methods::TOP_SELF = T.let(T.unsafe(nil), Object) - class T::Types::Proc < ::T::Types::Base; end # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#6 @@ -498,18 +329,18 @@ end # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#6 class T::Types::Simple < ::T::Types::Base - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#64 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79 def name; end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#59 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#74 module T::Types::Simple::GenericPatch # This method intercepts calls to the `name` method for simple types, so that # it can ask the name to the type if the type is generic, since, by this point, # we've created a clone of that type with the `name` method returning the # appropriate name for that specific concrete type. # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#64 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79 def name; end end @@ -525,41 +356,24 @@ end # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) -module T::Types::Simple::Private; end - -module T::Types::Simple::Private::Pool - class << self - # source://sorbet-runtime/0.5.10439/lib/types/types/simple.rb#62 - def type_for_module(mod); end - end -end - -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#80 -module T::Utils +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#99 +module T::Utils::Private class << self - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#82 - def coerce(val); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101 + def coerce_and_check_module_types(val, check_val, check_module_type); end end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#81 -module T::Utils::CoercePatch - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#82 - def coerce(val); end +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#100 +module T::Utils::Private::PrivateCoercePatch + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101 + def coerce_and_check_module_types(val, check_val, check_module_type); end end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 module Tapioca class << self - # source://tapioca//lib/tapioca.rb#20 - sig { void } - def disable_traces; end - - # source://tapioca//lib/tapioca.rb#15 - sig { params(trace_name: ::Symbol, block: T.proc.params(arg0: ::TracePoint).void).void } - def register_trace(trace_name, &block); end - - # source://tapioca//lib/tapioca.rb#29 + # source://tapioca//lib/tapioca.rb#19 sig do type_parameters(:Result) .params( @@ -570,16 +384,53 @@ module Tapioca end end -# source://tapioca//lib/tapioca.rb#47 +# source://tapioca//lib/tapioca.rb#37 Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#67 +# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 +module Tapioca::BundlerExt; end + +# This is a module that gets prepended to `Bundler::Dependency` and +# makes sure even gems marked as `require: false` are required during +# `Bundler.require`. +# +# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#9 +module Tapioca::BundlerExt::AutoRequireHook + requires_ancestor { Bundler::Dependency } + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#46 + sig { returns(T.untyped) } + def autorequire; end + + class << self + # @return [Boolean] + # + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#26 + def enabled?; end + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#22 + sig { params(name: T.untyped).returns(T::Boolean) } + def excluded?(name); end + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#36 + sig do + type_parameters(:Result) + .params( + exclude: T::Array[::String], + blk: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def override_require_false(exclude:, &blk); end + end +end + +# source://tapioca//lib/tapioca.rb#60 Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#66 +# source://tapioca//lib/tapioca.rb#59 Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#65 +# source://tapioca//lib/tapioca.rb#58 Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/cli.rb#5 @@ -588,40 +439,42 @@ class Tapioca::Cli < ::Thor include ::Tapioca::ConfigHelper include ::Tapioca::EnvHelper - # source://tapioca//lib/tapioca/cli.rb#315 + # source://tapioca//lib/tapioca/cli.rb#355 def __print_version; end - # source://tapioca//lib/tapioca/cli.rb#298 + # source://tapioca//lib/tapioca/cli.rb#337 def annotations; end - # source://tapioca//lib/tapioca/cli.rb#271 + # source://tapioca//lib/tapioca/cli.rb#309 def check_shims; end - # source://tapioca//lib/tapioca/cli.rb#36 + # source://tapioca//lib/tapioca/cli.rb#46 def configure; end - # source://tapioca//lib/tapioca/cli.rb#123 - def dsl(*constants); end + # source://tapioca//lib/tapioca/cli.rb#138 + def dsl(*constant_or_paths); end - # source://tapioca//lib/tapioca/cli.rb#223 + # @raise [MalformattedArgumentError] + # + # source://tapioca//lib/tapioca/cli.rb#253 def gem(*gems); end - # source://tapioca//lib/tapioca/cli.rb#25 + # source://tapioca//lib/tapioca/cli.rb#27 def init; end - # source://tapioca//lib/tapioca/cli.rb#47 + # source://tapioca//lib/tapioca/cli.rb#57 def require; end - # source://tapioca//lib/tapioca/cli.rb#66 + # source://tapioca//lib/tapioca/cli.rb#74 def todo; end private - # source://tapioca//lib/tapioca/cli.rb#329 + # source://tapioca//lib/tapioca/cli.rb#369 def print_init_next_steps; end class << self - # source://tapioca//lib/tapioca/cli.rb#321 + # source://tapioca//lib/tapioca/cli.rb#361 def exit_on_failure?; end end end @@ -649,8 +502,241 @@ end # source://tapioca//lib/tapioca/commands.rb#5 module Tapioca::Commands; end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#6 +class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + abstract! + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#31 + sig do + params( + requested_constants: T::Array[::String], + requested_paths: T::Array[::Pathname], + outpath: ::Pathname, + only: T::Array[::String], + exclude: T::Array[::String], + file_header: T::Boolean, + tapioca_path: ::String, + quiet: T::Boolean, + verbose: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + gem_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#94 + sig { returns(T::Array[::String]) } + def all_requested_constants; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#284 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#208 + sig do + params( + constant_name: ::String, + rbi: ::RBI::File, + outpath: ::Pathname, + quiet: T::Boolean + ).returns(T.nilable(::Pathname)) + end + def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#146 + sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } + def constantize(constant_names, ignore_missing: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#169 + sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def constantize_compilers(compiler_names); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#344 + sig { returns(T::Array[::String]) } + def constants_from_requested_paths; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#117 + sig { returns(::Tapioca::Dsl::Pipeline) } + def create_pipeline; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#247 + sig { params(constant_name: ::String).returns(::Pathname) } + def dsl_rbi_filename(constant_name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#132 + sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } + def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#339 + sig { params(constant: ::String).returns(::String) } + def generate_command_for(constant); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#70 + sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) } + def generate_dsl_rbi_files(outpath, quiet:); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#107 + sig { void } + def load_application; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#226 + sig { params(dir: ::Pathname).void } + def perform_dsl_verification(dir); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#102 + sig { returns(::Tapioca::Dsl::Pipeline) } + def pipeline; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235 + sig { params(files: T::Set[::Pathname]).void } + def purge_stale_dsl_rbi_files(files); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#334 + sig { params(constant: ::String).returns(::String) } + def rbi_filename_for(constant); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#315 + sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } + def rbi_files_in(path); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#188 + sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } + def resolve(name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#322 + sig { params(class_name: ::String).returns(::String) } + def underscore(class_name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#252 + sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } + def verify_dsl_rbi(tmp_dir:); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/abstract_gem.rb#6 +class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + abstract! + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#32 + sig do + params( + gem_names: T::Array[::String], + exclude: T::Array[::String], + include_dependencies: T::Boolean, + prerequire: T.nilable(::String), + postrequire: ::String, + typed_overrides: T::Hash[::String, ::String], + outpath: ::Pathname, + file_header: T::Boolean, + include_doc: T::Boolean, + include_loc: T::Boolean, + include_exported_rbis: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + dsl_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#221 + sig { returns(T::Array[::String]) } + def added_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#282 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#110 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } + def compile_gem_rbi(gem); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#216 + sig { params(gem_name: ::String).returns(::Pathname) } + def existing_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#264 + sig { returns(T::Hash[::String, ::String]) } + def existing_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#228 + sig { params(gem_name: ::String).returns(::Pathname) } + def expected_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#270 + sig { returns(T::Hash[::String, ::String]) } + def expected_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#98 + sig do + params( + gem: ::Tapioca::Gemfile::GemSpec, + dependencies: T::Array[::Tapioca::Gemfile::GemSpec] + ).returns(T::Array[::Tapioca::Gemfile::GemSpec]) + end + def gem_dependencies(gem, dependencies = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#233 + sig { params(gem_name: ::String).returns(T::Boolean) } + def gem_rbi_exists?(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#277 + sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } + def gem_rbi_filename(gem_name, version); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#77 + sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def gems_to_generate(gem_names); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#287 + sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } + def merge_with_exported_rbi(gem, file); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#258 + sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } + def move(old_filename, new_filename); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#168 + sig { void } + def perform_additions; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#141 + sig { void } + def perform_removals; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#211 + sig { returns(T::Array[::String]) } + def removed_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#238 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end +end + # source://tapioca//lib/tapioca/commands/annotations.rb#6 -class Tapioca::Commands::Annotations < ::Tapioca::Commands::Command +class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker # source://tapioca//lib/tapioca/commands/annotations.rb#18 sig do params( @@ -663,75 +749,75 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::Command end def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/annotations.rb#36 - sig { override.void } - def execute; end - private - # source://tapioca//lib/tapioca/commands/annotations.rb#191 + # source://tapioca//lib/tapioca/commands/annotations.rb#193 sig { params(name: ::String, content: ::String).returns(::String) } def add_header(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#209 + # source://tapioca//lib/tapioca/commands/annotations.rb#213 sig { params(name: ::String, content: ::String).returns(::String) } def apply_typed_override(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#132 + # source://tapioca//lib/tapioca/commands/annotations.rb#39 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#136 sig { params(repo_uris: T::Array[::String], gem_name: ::String).void } def fetch_annotation(repo_uris, gem_name); end - # source://tapioca//lib/tapioca/commands/annotations.rb#109 + # source://tapioca//lib/tapioca/commands/annotations.rb#113 sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) } def fetch_annotations(gem_names); end - # source://tapioca//lib/tapioca/commands/annotations.rb#150 + # source://tapioca//lib/tapioca/commands/annotations.rb#152 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#167 + # source://tapioca//lib/tapioca/commands/annotations.rb#169 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_http_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#98 + # source://tapioca//lib/tapioca/commands/annotations.rb#102 sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) } def fetch_index(repo_uri, repo_number:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#77 + # source://tapioca//lib/tapioca/commands/annotations.rb#81 sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } def fetch_indexes; end - # source://tapioca//lib/tapioca/commands/annotations.rb#159 + # source://tapioca//lib/tapioca/commands/annotations.rb#161 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_local_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#46 + # source://tapioca//lib/tapioca/commands/annotations.rb#50 sig { returns(T::Array[::String]) } def list_gemfile_gems; end - # source://tapioca//lib/tapioca/commands/annotations.rb#221 + # source://tapioca//lib/tapioca/commands/annotations.rb#225 sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } def merge_files(gem_name, contents); end - # source://tapioca//lib/tapioca/commands/annotations.rb#56 + # source://tapioca//lib/tapioca/commands/annotations.rb#60 sig { params(project_gems: T::Array[::String]).void } def remove_expired_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#248 + # source://tapioca//lib/tapioca/commands/annotations.rb#252 sig { returns(T::Hash[::String, T.nilable(::String)]) } def repo_tokens; end - # source://tapioca//lib/tapioca/commands/annotations.rb#276 + # source://tapioca//lib/tapioca/commands/annotations.rb#280 sig { params(path: ::String, repo_uri: ::String, message: ::String).void } def say_http_error(path, repo_uri, message:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#260 + # source://tapioca//lib/tapioca/commands/annotations.rb#264 sig { params(repo_uri: ::String).returns(T.nilable(::String)) } def token_for(repo_uri); end end # source://tapioca//lib/tapioca/commands/check_shims.rb#6 -class Tapioca::Commands::CheckShims < ::Tapioca::Commands::Command +class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker include ::Tapioca::SorbetHelper include ::Tapioca::RBIFilesHelper @@ -749,7 +835,9 @@ class Tapioca::Commands::CheckShims < ::Tapioca::Commands::Command end def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end - # source://tapioca//lib/tapioca/commands/check_shims.rb#42 + private + + # source://tapioca//lib/tapioca/commands/check_shims.rb#44 sig { override.void } def execute; end end @@ -771,19 +859,17 @@ class Tapioca::Commands::Command sig { void } def initialize; end - # @abstract - # - # source://tapioca//lib/tapioca/commands/command.rb#25 - sig { abstract.void } - def execute; end - - # source://thor/1.2.1/lib/thor/base.rb#139 + # source://thor/1.2.2/lib/thor/base.rb#139 sig { returns(::Thor::Actions) } def file_writer; end + # source://tapioca//lib/tapioca/commands/command.rb#25 + sig(:final) { void } + def run; end + private - # source://tapioca//lib/tapioca/commands/command.rb#46 + # source://tapioca//lib/tapioca/commands/command.rb#53 sig do params( path: T.any(::Pathname, ::String), @@ -795,11 +881,17 @@ class Tapioca::Commands::Command end def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/command.rb#30 + # source://tapioca//lib/tapioca/commands/command.rb#37 sig { params(command: ::Symbol, args: ::String).returns(::String) } def default_command(command, *args); end - # source://tapioca//lib/tapioca/commands/command.rb#56 + # @abstract + # + # source://tapioca//lib/tapioca/commands/command.rb#34 + sig { abstract.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/command.rb#63 sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void } def remove_file(path, verbose: T.unsafe(nil)); end end @@ -810,23 +902,30 @@ class Tapioca::Commands::Command::FileWriter < ::Thor extend ::Thor::Actions::ClassMethods end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/command_without_tracker.rb#6 +class Tapioca::Commands::CommandWithoutTracker < ::Tapioca::Commands::Command + abstract! + + # source://tapioca//lib/tapioca/commands/command_without_tracker.rb#12 + sig { void } + def initialize; end +end + # source://tapioca//lib/tapioca/commands/configure.rb#6 -class Tapioca::Commands::Configure < ::Tapioca::Commands::Command +class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker # source://tapioca//lib/tapioca/commands/configure.rb#14 sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void } def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end - # source://tapioca//lib/tapioca/commands/configure.rb#30 - sig { override.void } - def execute; end - private - # source://tapioca//lib/tapioca/commands/configure.rb#78 + # source://tapioca//lib/tapioca/commands/configure.rb#79 sig { void } def create_binstub; end - # source://tapioca//lib/tapioca/commands/configure.rb#68 + # source://tapioca//lib/tapioca/commands/configure.rb#69 sig { void } def create_post_require; end @@ -834,265 +933,124 @@ class Tapioca::Commands::Configure < ::Tapioca::Commands::Command sig { void } def create_sorbet_config; end - # source://tapioca//lib/tapioca/commands/configure.rb#49 + # source://tapioca//lib/tapioca/commands/configure.rb#50 sig { void } def create_tapioca_config; end - # source://tapioca//lib/tapioca/commands/configure.rb#91 + # source://tapioca//lib/tapioca/commands/configure.rb#32 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/configure.rb#92 sig { returns(::Bundler::Installer) } def installer; end - # source://tapioca//lib/tapioca/commands/configure.rb#96 - sig { returns(::Bundler::StubSpecification) } + # source://tapioca//lib/tapioca/commands/configure.rb#97 + sig { returns(T.any(::Bundler::StubSpecification, ::Gem::Specification)) } def spec; end end -# source://tapioca//lib/tapioca/commands/dsl.rb#6 -class Tapioca::Commands::Dsl < ::Tapioca::Commands::Command - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIFilesHelper - - # source://tapioca//lib/tapioca/commands/dsl.rb#27 - sig do - params( - requested_constants: T::Array[::String], - outpath: ::Pathname, - only: T::Array[::String], - exclude: T::Array[::String], - file_header: T::Boolean, - tapioca_path: ::String, - should_verify: T::Boolean, - quiet: T::Boolean, - verbose: T::Boolean, - number_of_workers: T.nilable(::Integer), - auto_strictness: T::Boolean, - gem_dir: ::String, - rbi_formatter: ::Tapioca::RBIFormatter - ).void - end - def initialize(requested_constants:, outpath:, only:, exclude:, file_header:, tapioca_path:, should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil)); end +# source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#6 +class Tapioca::Commands::DslCompilerList < ::Tapioca::Commands::AbstractDsl + private - # source://tapioca//lib/tapioca/commands/dsl.rb#86 + # source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#10 sig { override.void } def execute; end - - # source://tapioca//lib/tapioca/commands/dsl.rb#60 - sig { void } - def list_compilers; end - - private - - # source://tapioca//lib/tapioca/commands/dsl.rb#312 - sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } - def build_error_for_files(cause, files); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#236 - sig do - params( - constant_name: ::String, - rbi: ::RBI::File, - outpath: ::Pathname, - quiet: T::Boolean - ).returns(T.nilable(::Pathname)) - end - def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#174 - sig { params(constant_names: T::Array[::String]).returns(T::Array[::Module]) } - def constantize(constant_names); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#197 - sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } - def constantize_compilers(compiler_names); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#148 - sig { returns(::Tapioca::Dsl::Pipeline) } - def create_pipeline; end - - # source://tapioca//lib/tapioca/commands/dsl.rb#275 - sig { params(constant_name: ::String).returns(::Pathname) } - def dsl_rbi_filename(constant_name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#161 - sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } - def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#365 - sig { params(constant: ::String).returns(::String) } - def generate_command_for(constant); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#254 - sig { params(dir: ::Pathname).void } - def perform_dsl_verification(dir); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#263 - sig { params(files: T::Set[::Pathname]).void } - def purge_stale_dsl_rbi_files(files); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#360 - sig { params(constant: ::String).returns(::String) } - def rbi_filename_for(constant); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#341 - sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } - def rbi_files_in(path); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#321 - sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } - def report_diff_and_exit_if_out_of_date(diff, command); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#216 - sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } - def resolve(name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#348 - sig { params(class_name: ::String).returns(::String) } - def underscore(class_name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#280 - sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } - def verify_dsl_rbi(tmp_dir:); end end -# source://tapioca//lib/tapioca/commands/gem.rb#6 -class Tapioca::Commands::Gem < ::Tapioca::Commands::Command - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIFilesHelper - - # source://tapioca//lib/tapioca/commands/gem.rb#28 - sig do - params( - gem_names: T::Array[::String], - exclude: T::Array[::String], - prerequire: T.nilable(::String), - postrequire: ::String, - typed_overrides: T::Hash[::String, ::String], - outpath: ::Pathname, - file_header: T::Boolean, - include_doc: T::Boolean, - include_loc: T::Boolean, - include_exported_rbis: T::Boolean, - number_of_workers: T.nilable(::Integer), - auto_strictness: T::Boolean, - dsl_dir: ::String, - rbi_formatter: ::Tapioca::RBIFormatter - ).void - end - def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil)); end +# source://tapioca//lib/tapioca/commands/dsl_generate.rb#6 +class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl + private - # source://tapioca//lib/tapioca/commands/gem.rb#67 + # source://tapioca//lib/tapioca/commands/dsl_generate.rb#10 sig { override.void } def execute; end +end - # source://tapioca//lib/tapioca/commands/gem.rb#105 - sig { params(should_verify: T::Boolean, exclude: T::Array[::String]).void } - def sync(should_verify: T.unsafe(nil), exclude: T.unsafe(nil)); end - +# source://tapioca//lib/tapioca/commands/dsl_verify.rb#6 +class Tapioca::Commands::DslVerify < ::Tapioca::Commands::AbstractDsl private - # source://tapioca//lib/tapioca/commands/gem.rb#281 - sig { returns(T::Array[::String]) } - def added_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#342 - sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } - def build_error_for_files(cause, files); end - - # source://tapioca//lib/tapioca/commands/gem.rb#154 - sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } - def compile_gem_rbi(gem); end - - # source://tapioca//lib/tapioca/commands/gem.rb#276 - sig { params(gem_name: ::String).returns(::Pathname) } - def existing_rbi(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#324 - sig { returns(T::Hash[::String, ::String]) } - def existing_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#288 - sig { params(gem_name: ::String).returns(::Pathname) } - def expected_rbi(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#330 - sig { returns(T::Hash[::String, ::String]) } - def expected_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#293 - sig { params(gem_name: ::String).returns(T::Boolean) } - def gem_rbi_exists?(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#337 - sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } - def gem_rbi_filename(gem_name, version); end - - # source://tapioca//lib/tapioca/commands/gem.rb#139 - sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } - def gems_to_generate(gem_names); end - - # source://tapioca//lib/tapioca/commands/gem.rb#347 - sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } - def merge_with_exported_rbi(gem, file); end + # source://tapioca//lib/tapioca/commands/dsl_verify.rb#10 + sig { override.void } + def execute; end +end - # source://tapioca//lib/tapioca/commands/gem.rb#318 - sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } - def move(old_filename, new_filename); end +# source://tapioca//lib/tapioca/commands/gem_generate.rb#6 +class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem + private - # source://tapioca//lib/tapioca/commands/gem.rb#229 - sig { void } - def perform_additions; end + # source://tapioca//lib/tapioca/commands/gem_generate.rb#10 + sig { override.void } + def execute; end +end - # source://tapioca//lib/tapioca/commands/gem.rb#202 - sig { void } - def perform_removals; end +# source://tapioca//lib/tapioca/commands/gem_sync.rb#6 +class Tapioca::Commands::GemSync < ::Tapioca::Commands::AbstractGem + private - # source://tapioca//lib/tapioca/commands/gem.rb#183 - sig { params(exclude: T::Array[::String]).void } - def perform_sync_verification(exclude: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/commands/gem_sync.rb#10 + sig { override.void } + def execute; end +end - # source://tapioca//lib/tapioca/commands/gem.rb#271 - sig { returns(T::Array[::String]) } - def removed_rbis; end +# source://tapioca//lib/tapioca/commands/gem_verify.rb#6 +class Tapioca::Commands::GemVerify < ::Tapioca::Commands::AbstractGem + private - # source://tapioca//lib/tapioca/commands/gem.rb#298 - sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } - def report_diff_and_exit_if_out_of_date(diff, command); end + # source://tapioca//lib/tapioca/commands/gem_verify.rb#10 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/gem_verify.rb#17 + sig { void } + def perform_sync_verification; end end # source://tapioca//lib/tapioca/commands/require.rb#6 -class Tapioca::Commands::Require < ::Tapioca::Commands::Command +class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker # source://tapioca//lib/tapioca/commands/require.rb#13 sig { params(requires_path: ::String, sorbet_config_path: ::String).void } def initialize(requires_path:, sorbet_config_path:); end - # source://tapioca//lib/tapioca/commands/require.rb#21 + private + + # source://tapioca//lib/tapioca/commands/require.rb#23 sig { override.void } def execute; end end # source://tapioca//lib/tapioca/commands/todo.rb#6 -class Tapioca::Commands::Todo < ::Tapioca::Commands::Command +class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker include ::Tapioca::SorbetHelper - # source://tapioca//lib/tapioca/commands/todo.rb#15 + # source://tapioca//lib/tapioca/commands/todo.rb#26 sig { params(todo_file: ::String, file_header: T::Boolean).void } def initialize(todo_file:, file_header:); end - # source://tapioca//lib/tapioca/commands/todo.rb#23 - sig { override.void } - def execute; end + # source://tapioca//lib/tapioca/commands/todo.rb#34 + sig { void } + def run_with_deprecation; end private - # source://tapioca//lib/tapioca/commands/todo.rb#49 + # source://tapioca//lib/tapioca/commands/todo.rb#44 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/todo.rb#68 sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) } def rbi(constants, command:); end - # source://tapioca//lib/tapioca/commands/todo.rb#69 + # source://tapioca//lib/tapioca/commands/todo.rb#88 sig { returns(T::Array[::String]) } def unresolved_constants; end end +# source://tapioca//lib/tapioca/commands/todo.rb#9 +Tapioca::Commands::Todo::DEPRECATION_MESSAGE = T.let(T.unsafe(nil), String) + # source://tapioca//lib/tapioca/helpers/config_helper.rb#5 module Tapioca::ConfigHelper requires_ancestor { Thor } @@ -1163,53 +1121,53 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end # source://tapioca//lib/tapioca/helpers/config_helper.rb#141 class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct - const :colors, T::Array[::Symbol] const :message, ::String + const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end -# source://tapioca//lib/tapioca.rb#54 +# source://tapioca//lib/tapioca.rb#44 Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#50 +# source://tapioca//lib/tapioca.rb#40 Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#63 +# source://tapioca//lib/tapioca.rb#56 Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#51 +# source://tapioca//lib/tapioca.rb#41 Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#56 +# source://tapioca//lib/tapioca.rb#46 Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) -# source://tapioca//lib/tapioca.rb#48 +# source://tapioca//lib/tapioca.rb#38 Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#49 +# source://tapioca//lib/tapioca.rb#39 Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/rbi_formatter.rb#29 Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) -# source://tapioca//lib/tapioca.rb#62 +# source://tapioca//lib/tapioca.rb#55 Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) -# source://tapioca//lib/tapioca.rb#52 +# source://tapioca//lib/tapioca.rb#42 Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#53 +# source://tapioca//lib/tapioca.rb#43 Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/dsl/compilers.rb#5 @@ -1222,24 +1180,26 @@ class Tapioca::Dsl::Compiler extend T::Generic include ::Tapioca::SorbetHelper include ::Tapioca::RBIHelper + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection + extend ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::Reflection abstract! ConstantType = type_member { { upper: Module } } - # source://tapioca//lib/tapioca/dsl/compiler.rb#60 + # source://tapioca//lib/tapioca/dsl/compiler.rb#64 sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void } def initialize(pipeline, root, constant); end # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. # - # source://tapioca//lib/tapioca/dsl/compiler.rb#77 + # source://tapioca//lib/tapioca/dsl/compiler.rb#81 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#68 + # source://tapioca//lib/tapioca/dsl/compiler.rb#72 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end @@ -1249,7 +1209,7 @@ class Tapioca::Dsl::Compiler # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#73 + # source://tapioca//lib/tapioca/dsl/compiler.rb#77 sig { abstract.void } def decorate; end @@ -1259,21 +1219,21 @@ class Tapioca::Dsl::Compiler private - # source://tapioca//lib/tapioca/dsl/compiler.rb#123 + # source://tapioca//lib/tapioca/dsl/compiler.rb#130 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } def compile_method_parameters_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#159 + # source://tapioca//lib/tapioca/dsl/compiler.rb#166 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } def compile_method_return_type_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#113 + # source://tapioca//lib/tapioca/dsl/compiler.rb#120 sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end # Get the types of each parameter from a method signature # - # source://tapioca//lib/tapioca/dsl/compiler.rb#90 + # source://tapioca//lib/tapioca/dsl/compiler.rb#94 sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } def parameters_types_from_signature(method_def, signature); end @@ -1295,10 +1255,10 @@ class Tapioca::Dsl::Compiler private # source://tapioca//lib/tapioca/dsl/compiler.rb#47 - sig { returns(T::Enumerable[::Class]) } + sig { returns(T::Enumerable[T::Class[T.anything]]) } def all_classes; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#53 + # source://tapioca//lib/tapioca/dsl/compiler.rb#55 sig { returns(T::Enumerable[::Module]) } def all_modules; end end @@ -1319,39 +1279,40 @@ Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/dsl/pipeline.rb#6 class Tapioca::Dsl::Pipeline - # source://tapioca//lib/tapioca/dsl/pipeline.rb#30 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#34 sig do params( requested_constants: T::Array[::Module], + requested_paths: T::Array[::Pathname], requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], error_handler: T.proc.params(error: ::String).void, number_of_workers: T.nilable(::Integer) ).void end - def initialize(requested_constants:, requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end + def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end # source://tapioca//lib/tapioca/dsl/pipeline.rb#10 sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } def active_compilers; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#82 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#93 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#87 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#98 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#96 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def compilers; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#16 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 sig { returns(T.proc.params(error: ::String).void) } def error_handler; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 sig { returns(T::Array[::String]) } def errors; end @@ -1359,7 +1320,11 @@ class Tapioca::Dsl::Pipeline sig { returns(T::Array[::Module]) } def requested_constants; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#52 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#16 + sig { returns(T::Array[::Pathname]) } + def requested_paths; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#58 sig do type_parameters(:T) .params( @@ -1370,11 +1335,15 @@ class Tapioca::Dsl::Pipeline private - # source://tapioca//lib/tapioca/dsl/pipeline.rb#128 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#195 + sig { void } + def abort_if_pending_migrations!; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#141 sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } def filter_anonymous_and_reloaded_constants(constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#111 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#124 sig do params( requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], @@ -1383,15 +1352,20 @@ class Tapioca::Dsl::Pipeline end def gather_active_compilers(requested_compilers, excluded_compilers); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#119 - sig { params(requested_constants: T::Array[::Module]).returns(T::Set[::Module]) } - def gather_constants(requested_constants); end + # source://tapioca//lib/tapioca/dsl/pipeline.rb#132 + sig do + params( + requested_constants: T::Array[::Module], + requested_paths: T::Array[::Pathname] + ).returns(T::Set[::Module]) + end + def gather_constants(requested_constants, requested_paths); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#153 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#169 sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#172 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#188 sig { params(error: ::String).returns(T.noreturn) } def report_error(error); end end @@ -1421,6 +1395,12 @@ class Tapioca::Executor ).returns(T::Array[T.type_parameter(:T)]) end def run_in_parallel(&block); end + + private + + # source://tapioca//lib/tapioca/executor.rb#37 + sig { returns(::Integer) } + def max_processors; end end # source://tapioca//lib/tapioca/executor.rb#8 @@ -1460,9 +1440,6 @@ end # source://tapioca//lib/tapioca/gem/events.rb#6 class Tapioca::Gem::Event abstract! - - # source://sorbet-runtime/0.5.10439/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end end # source://tapioca//lib/tapioca/gem/events.rb#43 @@ -1517,6 +1494,7 @@ end # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#7 class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection private @@ -1532,15 +1510,16 @@ end # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#7 class Tapioca::Gem::Listeners::ForeignConstants < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection private - # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#59 + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#60 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#54 + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#55 sig { params(location: ::String).returns(T::Boolean) } def mixed_in_by_gem?(location); end @@ -1553,15 +1532,24 @@ end class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base include ::Tapioca::SorbetHelper include ::Tapioca::RBIHelper + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection private - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#34 - sig { params(tree: ::RBI::Tree, module_name: ::String, mod: ::Module, for_visibility: T::Array[::Symbol]).void } - def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil)); end + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#35 + sig do + params( + tree: ::RBI::Tree, + module_name: ::String, + mod: ::Module, + for_visibility: T::Array[::Symbol], + attached_class: T.nilable(::Module) + ).void + end + def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil), attached_class: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#63 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#71 sig do params( tree: ::RBI::Tree, @@ -1573,18 +1561,22 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base end def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#191 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#212 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#184 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#205 sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } def initialize_method_for(constant); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#165 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#173 sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } def method_names_by_visibility(mod); end + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#197 + sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) } + def method_new_in_abstract_class?(attached_class, method_name); end + # Check whether the method is defined by the constant. # # In most cases, it works to check that the constant is the method owner. However, @@ -1595,7 +1587,7 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base # It walks up the ancestor tree via the `super_method` method; if any of the super # methods are owned by the constant, it means that the constant declares the method. # - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#151 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#159 sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) } def method_owned_by_constant?(method, constant); end @@ -1603,13 +1595,14 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#174 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#182 sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) } def struct_method?(constant, method_name); end end # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#7 class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection private @@ -1625,11 +1618,11 @@ class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base end def add_mixins(tree, constant, mods, mixin_type); end - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#88 + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#84 sig { params(mixin_name: ::String).returns(T::Boolean) } def filtered_mixin?(mixin_name); end - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#95 + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#91 sig { params(constant: ::Module).returns(T::Array[::Module]) } def interesting_ancestors_of(constant); end @@ -1650,6 +1643,7 @@ end # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#7 class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection private @@ -1678,11 +1672,12 @@ end # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#7 class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#28 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#27 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end @@ -1719,6 +1714,7 @@ end # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#7 class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection include ::Tapioca::SorbetHelper include ::Tapioca::RBIHelper @@ -1747,6 +1743,7 @@ Tapioca::Gem::Listeners::SorbetSignatures::TYPE_PARAMETER_MATCHER = T.let(T.unsa # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#7 class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection private @@ -1755,10 +1752,14 @@ class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners:: sig { params(tree: ::RBI::Tree, constant: ::Module).void } def compile_type_variable_declarations(tree, constant); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#63 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50 + sig { params(type_variable: ::Tapioca::TypeVariableModule).returns(T.nilable(::RBI::Node)) } + def node_from_type_variable(type_variable); end + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#15 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end @@ -1787,6 +1788,7 @@ end # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#7 class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection private @@ -1802,29 +1804,29 @@ end # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#7 class Tapioca::Gem::Listeners::YardDoc < ::Tapioca::Gem::Listeners::Base - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#24 + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#27 sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } def initialize(pipeline); end private - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#51 + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#55 sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } def documentation_comments(name, sigs: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#95 + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#99 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#32 + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#36 sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } def on_const(event); end - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#42 + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#46 sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } def on_method(event); end - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#37 + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#41 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1832,7 +1834,7 @@ end # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#10 Tapioca::Gem::Listeners::YardDoc::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#21 +# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#24 Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/gem/events.rb#105 @@ -1888,6 +1890,7 @@ end # source://tapioca//lib/tapioca/gem/pipeline.rb#6 class Tapioca::Gem::Pipeline + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection include ::Tapioca::SorbetHelper include ::Tapioca::RBIHelper @@ -1900,35 +1903,41 @@ class Tapioca::Gem::Pipeline sig { returns(::RBI::Tree) } def compile; end + # source://tapioca//lib/tapioca/gem/pipeline.rb#119 + sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } + def constant_in_gem?(name); end + # source://tapioca//lib/tapioca/gem/pipeline.rb#14 sig { returns(::Tapioca::Gemfile::GemSpec) } def gem; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#110 + # source://tapioca//lib/tapioca/gem/pipeline.rb#137 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_in_gem?(method); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#118 + # Helpers + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#147 sig { params(constant: ::Module).returns(T.nilable(::String)) } def name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#69 + # source://tapioca//lib/tapioca/gem/pipeline.rb#71 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } def push_const(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#59 + # source://tapioca//lib/tapioca/gem/pipeline.rb#61 sig { params(symbol: ::String, constant: ::BasicObject).void } def push_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#64 + # source://tapioca//lib/tapioca/gem/pipeline.rb#66 sig { params(symbol: ::String, constant: ::Module).void } def push_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#83 + # source://tapioca//lib/tapioca/gem/pipeline.rb#85 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_foreign_scope(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#97 + # source://tapioca//lib/tapioca/gem/pipeline.rb#99 sig do params( symbol: ::String, @@ -1941,103 +1950,148 @@ class Tapioca::Gem::Pipeline end def push_method(symbol, constant, method, node, signature, parameters); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#76 + # source://tapioca//lib/tapioca/gem/pipeline.rb#78 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_scope(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#54 + # Events handling + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#56 sig { params(symbol: ::String).void } def push_symbol(symbol); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#102 + # Constants and properties filtering + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#106 sig { params(symbol_name: ::String).returns(T::Boolean) } def symbol_in_payload?(symbol_name); end private - # source://tapioca//lib/tapioca/gem/pipeline.rb#364 + # source://tapioca//lib/tapioca/gem/pipeline.rb#441 sig { params(name: ::String).void } def add_to_alias_namespace(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#369 + # source://tapioca//lib/tapioca/gem/pipeline.rb#446 sig { params(name: ::String).returns(T::Boolean) } def alias_namespaced?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#213 + # source://tapioca//lib/tapioca/gem/pipeline.rb#244 sig { params(name: ::String, constant: ::Module).void } def compile_alias(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#199 + # source://tapioca//lib/tapioca/gem/pipeline.rb#230 sig { params(symbol: ::String, constant: ::BasicObject).void } def compile_constant(symbol, constant); end - # Compile + # Compiling # - # source://tapioca//lib/tapioca/gem/pipeline.rb#194 + # source://tapioca//lib/tapioca/gem/pipeline.rb#219 sig { params(symbol: ::String, constant: ::Module).void } def compile_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#269 - sig { params(name: ::String, constant: ::Module, foreign_constant: T::Boolean).void } - def compile_module(name, constant, foreign_constant: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/gem/pipeline.rb#300 + sig { params(name: ::String, constant: ::Module).void } + def compile_module(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#234 + # source://tapioca//lib/tapioca/gem/pipeline.rb#265 sig { params(name: ::String, value: ::BasicObject).void } def compile_object(name, value); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#294 - sig { params(constant: ::Class).returns(T.nilable(::String)) } + # source://tapioca//lib/tapioca/gem/pipeline.rb#311 + sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } + def compile_scope(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#325 + sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } def compile_superclass(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#343 + # source://tapioca//lib/tapioca/gem/pipeline.rb#422 sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#146 + # source://tapioca//lib/tapioca/gem/pipeline.rb#177 sig { params(event: ::Tapioca::Gem::Event).void } def dispatch(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#386 + # Helpers + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#465 sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } def generic_name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#355 - sig { params(constant: ::Module).returns(T::Array[::String]) } + # source://tapioca//lib/tapioca/gem/pipeline.rb#434 + sig { params(constant: ::Module).returns(T::Set[::String]) } def get_file_candidates(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#133 + # source://tapioca//lib/tapioca/gem/pipeline.rb#162 sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def load_bootstrap_symbols(gem); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#376 - sig { params(name: ::String).void } - def mark_seen(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#399 + # source://tapioca//lib/tapioca/gem/pipeline.rb#481 sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } def name_of_proxy_target(constant, class_name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#141 + # Events handling + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#172 sig { returns(::Tapioca::Gem::Event) } def next_event; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#169 + # source://tapioca//lib/tapioca/gem/pipeline.rb#200 sig { params(event: ::Tapioca::Gem::ConstantFound).void } def on_constant(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#187 + # source://tapioca//lib/tapioca/gem/pipeline.rb#212 sig { params(event: ::Tapioca::Gem::NodeAdded).void } def on_node(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#160 + # source://tapioca//lib/tapioca/gem/pipeline.rb#191 sig { params(event: ::Tapioca::Gem::SymbolFound).void } def on_symbol(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#381 + # source://tapioca//lib/tapioca/gem/pipeline.rb#453 + sig { params(name: ::String).void } + def seen!(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#458 sig { params(name: ::String).returns(T::Boolean) } def seen?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#393 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_alias?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#381 + sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } + def skip_constant?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#409 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_foreign_constant?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#414 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_module?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#401 + sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } + def skip_object?(name, constant); end + + # Constants and properties filtering + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#376 + sig { params(name: ::String).returns(T::Boolean) } + def skip_symbol?(name); end end +# this looks something like: +# "(eval at /path/to/file.rb:123)" +# and we are just interested in the "/path/to/file.rb" part +# +# source://tapioca//lib/tapioca/gem/pipeline.rb#116 +Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp) + # source://tapioca//lib/tapioca/gem/pipeline.rb#11 Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) @@ -2066,201 +2120,192 @@ end # source://tapioca//lib/tapioca/helpers/gem_helper.rb#5 module Tapioca::GemHelper # source://tapioca//lib/tapioca/helpers/gem_helper.rb#9 - sig { params(gemfile_dir: ::String, full_gem_path: ::String).returns(T::Boolean) } - def gem_in_app_dir?(gemfile_dir, full_gem_path); end + sig { params(app_dir: T.any(::Pathname, ::String), full_gem_path: ::String).returns(T::Boolean) } + def gem_in_app_dir?(app_dir, full_gem_path); end - # source://tapioca//lib/tapioca/helpers/gem_helper.rb#15 + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#17 sig { params(full_gem_path: ::String).returns(T::Boolean) } def gem_in_bundle_path?(full_gem_path); end - # source://tapioca//lib/tapioca/helpers/gem_helper.rb#20 + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#22 + sig { params(full_gem_path: ::String).returns(T::Boolean) } + def gem_in_ruby_path?(full_gem_path); end + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#27 sig { params(path: T.any(::Pathname, ::String)).returns(::String) } def to_realpath(path); end + + private + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#36 + sig { params(path: T.any(::Pathname, ::String), dir: T.any(::Pathname, ::String)).returns(T::Boolean) } + def path_in_dir?(path, dir); end end -# source://tapioca//lib/tapioca/gemfile.rb#5 +# source://tapioca//lib/tapioca/gemfile.rb#7 class Tapioca::Gemfile - # source://tapioca//lib/tapioca/gemfile.rb#69 - sig { params(exclude: T::Array[::String]).void } - def initialize(exclude); end + # source://tapioca//lib/tapioca/gemfile.rb#27 + sig { params(excluded_gems: T::Array[::String]).void } + def initialize(excluded_gems); end - # source://tapioca//lib/tapioca/gemfile.rb#60 + # source://tapioca//lib/tapioca/gemfile.rb#18 sig { returns(::Bundler::Definition) } def definition; end - # source://tapioca//lib/tapioca/gemfile.rb#63 + # source://tapioca//lib/tapioca/gemfile.rb#21 sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def dependencies; end - # source://tapioca//lib/tapioca/gemfile.rb#80 + # source://tapioca//lib/tapioca/gemfile.rb#40 sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) } def gem(gem_name); end - # source://tapioca//lib/tapioca/gemfile.rb#66 + # source://tapioca//lib/tapioca/gemfile.rb#24 sig { returns(T::Array[::String]) } def missing_specs; end - # source://tapioca//lib/tapioca/gemfile.rb#85 + # source://tapioca//lib/tapioca/gemfile.rb#45 sig { void } def require_bundle; end private - # source://tapioca//lib/tapioca/gemfile.rb#131 + # source://tapioca//lib/tapioca/gemfile.rb#92 sig { returns(::String) } def dir; end - # source://tapioca//lib/tapioca/gemfile.rb#92 + # source://tapioca//lib/tapioca/gemfile.rb#54 sig { returns(::File) } def gemfile; end - # source://tapioca//lib/tapioca/gemfile.rb#126 + # source://tapioca//lib/tapioca/gemfile.rb#87 sig { returns(T::Array[::Symbol]) } def groups; end - # source://tapioca//lib/tapioca/gemfile.rb#95 + # source://tapioca//lib/tapioca/gemfile.rb#57 sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) } def load_dependencies; end # @return [File] # - # source://tapioca//lib/tapioca/gemfile.rb#92 + # source://tapioca//lib/tapioca/gemfile.rb#54 def lockfile; end - # source://tapioca//lib/tapioca/gemfile.rb#106 + # source://tapioca//lib/tapioca/gemfile.rb#68 sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } def materialize_deps; end - # source://tapioca//lib/tapioca/gemfile.rb#121 + # source://tapioca//lib/tapioca/gemfile.rb#82 sig { returns(::Bundler::Runtime) } def runtime; end end -# This is a module that gets prepended to `Bundler::Dependency` and -# makes sure even gems marked as `require: false` are required during -# `Bundler.require`. -# -# source://tapioca//lib/tapioca/gemfile.rb#18 -module Tapioca::Gemfile::AutoRequireHook - requires_ancestor { Bundler::Dependency } - - # source://tapioca//lib/tapioca/gemfile.rb#39 - sig { returns(T.untyped) } - def autorequire; end - - class << self - # source://tapioca//lib/tapioca/gemfile.rb#30 - sig { params(exclude: T::Array[::String]).returns(T::Array[::String]) } - def exclude=(exclude); end - - # source://tapioca//lib/tapioca/gemfile.rb#33 - sig { params(name: T.untyped).returns(T::Boolean) } - def excluded?(name); end - end -end - -# source://tapioca//lib/tapioca/gemfile.rb#135 +# source://tapioca//lib/tapioca/gemfile.rb#96 class Tapioca::Gemfile::GemSpec include ::Tapioca::GemHelper - # source://tapioca//lib/tapioca/gemfile.rb#170 + # source://tapioca//lib/tapioca/gemfile.rb#135 sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } def initialize(spec); end - # source://tapioca//lib/tapioca/gemfile.rb#180 + # source://tapioca//lib/tapioca/gemfile.rb#145 sig { params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # source://tapioca//lib/tapioca/gemfile.rb#200 + # source://tapioca//lib/tapioca/gemfile.rb#170 sig { params(path: ::String).returns(T::Boolean) } def contains_path?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#219 + # source://tapioca//lib/tapioca/gemfile.rb#160 + sig { returns(T::Array[::Gem::Dependency]) } + def dependencies; end + + # source://tapioca//lib/tapioca/gemfile.rb#189 sig { returns(T::Boolean) } def export_rbi_files?; end - # source://tapioca//lib/tapioca/gemfile.rb#214 + # source://tapioca//lib/tapioca/gemfile.rb#184 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # source://tapioca//lib/tapioca/gemfile.rb#224 + # source://tapioca//lib/tapioca/gemfile.rb#194 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end - # source://tapioca//lib/tapioca/gemfile.rb#167 + # source://tapioca//lib/tapioca/gemfile.rb#132 sig { returns(T::Array[::Pathname]) } def files; end - # source://tapioca//lib/tapioca/gemfile.rb#164 + # source://tapioca//lib/tapioca/gemfile.rb#129 sig { returns(::String) } def full_gem_path; end - # source://tapioca//lib/tapioca/gemfile.rb#185 + # source://tapioca//lib/tapioca/gemfile.rb#150 sig { params(gemfile_dir: ::String).returns(T::Boolean) } def ignore?(gemfile_dir); end - # source://tapioca//lib/tapioca/gemfile.rb#190 + # source://tapioca//lib/tapioca/gemfile.rb#155 sig { returns(::String) } def name; end - # source://tapioca//lib/tapioca/gemfile.rb#209 + # source://tapioca//lib/tapioca/gemfile.rb#179 sig { void } def parse_yard_docs; end - # source://tapioca//lib/tapioca/gemfile.rb#195 + # source://tapioca//lib/tapioca/gemfile.rb#165 sig { returns(::String) } def rbi_file_name; end - # source://tapioca//lib/tapioca/gemfile.rb#236 + # source://tapioca//lib/tapioca/gemfile.rb#206 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end # @return [String] # - # source://tapioca//lib/tapioca/gemfile.rb#164 + # source://tapioca//lib/tapioca/gemfile.rb#129 def version; end private - # source://tapioca//lib/tapioca/gemfile.rb#247 + # source://tapioca//lib/tapioca/gemfile.rb#217 sig { returns(T::Array[::Pathname]) } def collect_files; end - # source://tapioca//lib/tapioca/gemfile.rb#262 + # source://tapioca//lib/tapioca/gemfile.rb#232 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # source://tapioca//lib/tapioca/gemfile.rb#320 + # source://tapioca//lib/tapioca/gemfile.rb#291 sig { returns(T::Boolean) } def gem_ignored?; end - # source://tapioca//lib/tapioca/gemfile.rb#299 + # source://tapioca//lib/tapioca/gemfile.rb#270 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#267 + # source://tapioca//lib/tapioca/gemfile.rb#237 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # source://tapioca//lib/tapioca/gemfile.rb#278 + # source://tapioca//lib/tapioca/gemfile.rb#249 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # source://tapioca//lib/tapioca/gemfile.rb#292 + # source://tapioca//lib/tapioca/gemfile.rb#263 sig { returns(::String) } def version_string; end class << self - # source://tapioca//lib/tapioca/gemfile.rb#143 + # source://tapioca//lib/tapioca/gemfile.rb#104 sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } def spec_lookup_by_file_path; end end end -# source://tapioca//lib/tapioca/gemfile.rb#155 +# source://tapioca//lib/tapioca/gemfile.rb#116 Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca/gemfile.rb#8 +# source://tapioca//lib/tapioca/gemfile.rb#10 Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } # source://tapioca//lib/tapioca/loaders/loader.rb#5 @@ -2268,77 +2313,89 @@ module Tapioca::Loaders; end # source://tapioca//lib/tapioca/loaders/dsl.rb#6 class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader - # source://tapioca//lib/tapioca/loaders/dsl.rb#30 - sig { params(tapioca_path: ::String, eager_load: T::Boolean).void } - def initialize(tapioca_path:, eager_load: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/loaders/dsl.rb#38 + sig do + params( + tapioca_path: ::String, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/loaders/dsl.rb#20 + # source://tapioca//lib/tapioca/loaders/dsl.rb#27 sig { override.void } def load; end protected - # source://tapioca//lib/tapioca/loaders/dsl.rb#73 - sig { void } - def abort_if_pending_migrations!; end - - # source://tapioca//lib/tapioca/loaders/dsl.rb#61 + # source://tapioca//lib/tapioca/loaders/dsl.rb#81 sig { void } def load_application; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#43 + # source://tapioca//lib/tapioca/loaders/dsl.rb#63 sig { void } def load_dsl_compilers; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#38 + # source://tapioca//lib/tapioca/loaders/dsl.rb#48 sig { void } def load_dsl_extensions; end class << self - # source://tapioca//lib/tapioca/loaders/dsl.rb#13 - sig { params(tapioca_path: ::String, eager_load: T::Boolean).void } - def load_application(tapioca_path:, eager_load: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/loaders/dsl.rb#15 + sig do + params( + tapioca_path: ::String, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end end end # source://tapioca//lib/tapioca/loaders/gem.rb#6 class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader - # source://tapioca//lib/tapioca/loaders/gem.rb#44 + # source://tapioca//lib/tapioca/loaders/gem.rb#49 sig do params( bundle: ::Tapioca::Gemfile, prerequire: T.nilable(::String), postrequire: ::String, - default_command: ::String + default_command: ::String, + halt_upon_load_error: T::Boolean ).void end - def initialize(bundle:, prerequire:, postrequire:, default_command:); end + def initialize(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end - # source://tapioca//lib/tapioca/loaders/gem.rb#30 + # source://tapioca//lib/tapioca/loaders/gem.rb#34 sig { override.void } def load; end protected - # source://tapioca//lib/tapioca/loaders/gem.rb#74 + # source://tapioca//lib/tapioca/loaders/gem.rb#80 sig { params(file: ::String, error: ::LoadError).void } def explain_failed_require(file, error); end - # source://tapioca//lib/tapioca/loaders/gem.rb#54 + # source://tapioca//lib/tapioca/loaders/gem.rb#60 sig { void } def require_gem_file; end class << self - # source://tapioca//lib/tapioca/loaders/gem.rb#20 + # source://tapioca//lib/tapioca/loaders/gem.rb#21 sig do params( bundle: ::Tapioca::Gemfile, prerequire: T.nilable(::String), postrequire: ::String, - default_command: ::String + default_command: ::String, + halt_upon_load_error: T::Boolean ).void end - def load_application(bundle:, prerequire:, postrequire:, default_command:); end + def load_application(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end end end @@ -2356,9 +2413,6 @@ class Tapioca::Loaders::Loader abstract! - # source://sorbet-runtime/0.5.10439/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - # @abstract # # source://tapioca//lib/tapioca/loaders/loader.rb#17 @@ -2367,43 +2421,71 @@ class Tapioca::Loaders::Loader private - # source://tapioca//lib/tapioca/loaders/loader.rb#109 + # source://tapioca//lib/tapioca/loaders/loader.rb#198 sig { void } def eager_load_rails_app; end - # source://tapioca//lib/tapioca/loaders/loader.rb#24 + # @return [Array] + # + # source://tapioca//lib/tapioca/loaders/loader.rb#169 + def engines; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#29 sig do params( gemfile: ::Tapioca::Gemfile, initialize_file: T.nilable(::String), - require_file: T.nilable(::String) + require_file: T.nilable(::String), + halt_upon_load_error: T::Boolean ).void end - def load_bundle(gemfile, initialize_file, require_file); end + def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end - # source://tapioca//lib/tapioca/loaders/loader.rb#37 - sig { params(environment_load: T::Boolean, eager_load: T::Boolean).void } - def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/loaders/loader.rb#127 + sig { void } + def load_engines_in_classic_mode; end - # source://tapioca//lib/tapioca/loaders/loader.rb#57 + # source://tapioca//lib/tapioca/loaders/loader.rb#105 sig { void } - def load_rails_engines; end + def load_engines_in_zeitwerk_mode; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#49 + sig do + params( + environment_load: T::Boolean, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end # source://tapioca//lib/tapioca/loaders/loader.rb#80 - sig { returns(T::Array[T.untyped]) } - def rails_engines; end + sig { void } + def load_rails_engines; end - # source://tapioca//lib/tapioca/loaders/loader.rb#135 + # source://tapioca//lib/tapioca/loaders/loader.rb#219 sig { params(file: T.nilable(::String)).void } def require_helper(file); end # source://tapioca//lib/tapioca/loaders/loader.rb#94 + def run_initializers; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#183 sig { params(path: ::String).void } def safe_require(path); end - # source://tapioca//lib/tapioca/loaders/loader.rb#101 + # source://tapioca//lib/tapioca/loaders/loader.rb#190 sig { void } def silence_deprecations; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#152 + sig { params(blk: T.proc.void).void } + def with_rails_application(&blk); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#145 + sig { returns(T::Boolean) } + def zeitwerk_mode?; end end # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#5 @@ -2441,26 +2523,26 @@ module Tapioca::RBIFilesHelper dsl_dir: ::String, auto_strictness: T::Boolean, gems: T::Array[::Tapioca::Gemfile::GemSpec], - compilers: T::Enumerable[::Class] + compilers: T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)] ).void end def validate_rbi_files(command:, gem_dir:, dsl_dir:, auto_strictness:, gems: T.unsafe(nil), compilers: T.unsafe(nil)); end private - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#208 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#209 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) } def extract_empty_scopes(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#213 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#214 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } def extract_methods_and_attrs(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#220 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#224 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) } def extract_mixins(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#227 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#234 sig do params( nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)] @@ -2468,7 +2550,7 @@ module Tapioca::RBIFilesHelper end def extract_nodes_with_sigs(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#201 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#202 sig do params( nodes: T::Array[::RBI::Node], @@ -2478,7 +2560,7 @@ module Tapioca::RBIFilesHelper end def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#259 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#266 sig { params(path: ::String).returns(::String) } def gem_name_from_rbi_path(path); end @@ -2486,11 +2568,11 @@ module Tapioca::RBIFilesHelper sig { params(index: ::RBI::Index, files: T::Array[::String], number_of_workers: T.nilable(::Integer)).void } def parse_and_index_files(index, files, number_of_workers:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#170 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#171 sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) } def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#232 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#239 sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } def update_gem_rbis_strictnesses(errors, gem_dir); end end @@ -2512,51 +2594,51 @@ module Tapioca::RBIHelper extend ::Tapioca::SorbetHelper extend ::Tapioca::RBIHelper - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#99 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#91 sig { params(type: ::String).returns(::String) } def as_nilable_type(type); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#80 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#72 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_block_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#70 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#62 sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } def create_kw_opt_param(name, type:, default:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#65 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#57 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_kw_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#75 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#67 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_kw_rest_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#55 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#47 sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } def create_opt_param(name, type:, default:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#50 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#42 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#60 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#52 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_rest_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#85 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#77 sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) } def create_typed_param(param, type); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#90 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#82 sig { params(sig_string: ::String).returns(::String) } def sanitize_signature_types(sig_string); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#108 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 sig { params(name: ::String).returns(T::Boolean) } def valid_method_name?(name); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#122 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#114 sig { params(name: ::String).returns(T::Boolean) } def valid_parameter_name?(name); end @@ -2607,8 +2689,19 @@ end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#5 module Tapioca::Runtime; end +# This module should only be included when running versions of Ruby +# older than 3.2. Because the Class#attached_object method is not +# available, it implements finding the attached class of a singleton +# class by iterating through ObjectSpace. +module Tapioca::Runtime::AttachedClassOf + # source://tapioca//lib/tapioca/runtime/attached_class_of_32.rb#14 + sig { params(singleton_class: ::Class).returns(T.nilable(::Module)) } + def attached_class_of(singleton_class); end +end + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#6 class Tapioca::Runtime::DynamicMixinCompiler + include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#20 @@ -2694,11 +2787,11 @@ end # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#23 module Tapioca::Runtime::GenericTypeRegistry class << self - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#64 + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#80 sig { params(instance: ::Object).returns(T::Boolean) } def generic_type_instance?(instance); end - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#69 + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#85 sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) } def lookup_type_variables(constant); end @@ -2714,7 +2807,7 @@ module Tapioca::Runtime::GenericTypeRegistry # # This method returns the created or cached clone of the constant. # - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#49 + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#65 sig { params(constant: T.untyped, types: T.untyped).returns(::Module) } def register_type(constant, types); end @@ -2728,50 +2821,69 @@ module Tapioca::Runtime::GenericTypeRegistry # Finally, the original `type_variable` is returned from this method, so that the caller # can return it from the original methods as well. # - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#88 + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#104 sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void } def register_type_variable(constant, type_variable); end private - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#97 + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#113 sig { params(constant: ::Module, name: ::String).returns(::Module) } def create_generic_type(constant, name); end - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#135 - sig { params(constant: ::Class).returns(::Class) } + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#155 + sig { params(constant: T::Class[T.anything]).returns(T::Class[T.anything]) } def create_safe_subclass(constant); end - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#162 + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#182 sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) } def lookup_or_initialize_type_variables(constant); end end end +# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#34 +class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#38 + sig { params(raw_type: ::Module, underlying_type: ::Module).void } + def initialize(raw_type, underlying_type); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45 + sig { params(obj: T.untyped).returns(T::Boolean) } + def valid?(obj); end +end + module Tapioca::Runtime::Reflection + include ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::Reflection - # source://tapioca//lib/tapioca/runtime/reflection.rb#60 + # source://tapioca//lib/tapioca/runtime/reflection.rb#196 + sig { params(constant: ::Module).returns(T.untyped) } + def abstract_type_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#77 sig { params(constant: ::Module).returns(T::Array[::Module]) } def ancestors_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#75 + # source://tapioca//lib/tapioca/runtime/reflection.rb#92 sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) } def are_equal?(object, other); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#172 - sig { params(singleton_class: ::Module).returns(T.nilable(::Module)) } - def attached_class_of(singleton_class); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#39 - sig { params(object: ::BasicObject).returns(::Class) } + # source://tapioca//lib/tapioca/runtime/reflection.rb#56 + sig { params(object: ::BasicObject).returns(T::Class[T.anything]) } def class_of(object); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#32 + # @param constant [BasicObject] + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#38 + def constant_defined?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#49 sig { params(symbol: ::String, inherit: T::Boolean, namespace: ::Module).returns(::BasicObject) } def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#44 + # source://tapioca//lib/tapioca/runtime/reflection.rb#61 sig { params(constant: ::Module).returns(T::Array[::Symbol]) } def constants_of(constant); end @@ -2789,48 +2901,56 @@ module Tapioca::Runtime::Reflection # class D < C; end # descendants_of(C) # => [B, A, D] # - # source://tapioca//lib/tapioca/runtime/reflection.rb#150 + # source://tapioca//lib/tapioca/runtime/reflection.rb#167 sig do type_parameters(:U) .params( - klass: T.all(::Class, T.type_parameter(:U)) + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) ).returns(T::Array[T.type_parameter(:U)]) end def descendants_of(klass); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#95 + # source://tapioca//lib/tapioca/runtime/reflection.rb#189 + sig { params(constant: ::Module).returns(T::Set[::String]) } + def file_candidates_for(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#202 + sig { params(constant: ::Module).returns(T::Boolean) } + def final_module?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#112 sig { params(constant: ::Module).returns(T::Array[::Module]) } def inherited_ancestors_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#128 + # source://tapioca//lib/tapioca/runtime/reflection.rb#145 sig { params(constant: ::Module, method: ::Symbol).returns(::Method) } def method_of(constant, method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#49 + # source://tapioca//lib/tapioca/runtime/reflection.rb#66 sig { params(constant: ::Module).returns(T.nilable(::String)) } def name_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#123 + # source://tapioca//lib/tapioca/runtime/reflection.rb#140 sig { params(type: ::T::Types::Base).returns(::String) } def name_of_type(type); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#70 + # source://tapioca//lib/tapioca/runtime/reflection.rb#87 sig { params(object: ::BasicObject).returns(::Integer) } def object_id_of(object); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#90 + # source://tapioca//lib/tapioca/runtime/reflection.rb#107 sig { params(constant: ::Module).returns(T::Array[::Symbol]) } def private_instance_methods_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#85 + # source://tapioca//lib/tapioca/runtime/reflection.rb#102 sig { params(constant: ::Module).returns(T::Array[::Symbol]) } def protected_instance_methods_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#80 + # source://tapioca//lib/tapioca/runtime/reflection.rb#97 sig { params(constant: ::Module).returns(T::Array[::Symbol]) } def public_instance_methods_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#104 + # source://tapioca//lib/tapioca/runtime/reflection.rb#121 sig { params(constant: ::Module).returns(T.nilable(::String)) } def qualified_name_of(constant); end @@ -2838,77 +2958,120 @@ module Tapioca::Runtime::Reflection # by searching for the label "". If none is found, it returns the location # labeled "
", which is the original call site. # - # source://tapioca//lib/tapioca/runtime/reflection.rb#162 + # source://tapioca//lib/tapioca/runtime/reflection.rb#179 sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } def resolve_loc(locations); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#116 + # source://tapioca//lib/tapioca/runtime/reflection.rb#207 + sig { params(constant: ::Module).returns(T::Boolean) } + def sealed_module?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#133 sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } def signature_of(method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#55 - sig { params(constant: ::Module).returns(::Class) } + # source://tapioca//lib/tapioca/runtime/reflection.rb#72 + sig { params(constant: ::Module).returns(T::Class[T.anything]) } def singleton_class_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#65 - sig { params(constant: ::Class).returns(T.nilable(::Class)) } + # source://tapioca//lib/tapioca/runtime/reflection.rb#82 + sig { params(constant: T::Class[T.anything]).returns(T.nilable(T::Class[T.anything])) } def superclass_of(constant); end + + private + + # source://tapioca//lib/tapioca/runtime/reflection.rb#244 + sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } + def child_module_for_parent_with_name(parent, name); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#255 + sig { params(method: ::UnboundMethod).returns(T::Boolean) } + def method_defined_by_forwardable_module?(method); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#230 + sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + def methods_for(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#214 + sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + def relevant_methods_for(constant); end end -# source://tapioca//lib/tapioca/runtime/reflection.rb#14 +# source://tapioca//lib/tapioca/runtime/reflection.rb#25 Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#10 +# source://tapioca//lib/tapioca/runtime/reflection.rb#21 Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#11 +# source://tapioca//lib/tapioca/runtime/reflection.rb#22 Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#17 +# source://tapioca//lib/tapioca/runtime/reflection.rb#28 Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#21 +# source://tapioca//lib/tapioca/runtime/reflection.rb#32 Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#12 +# source://tapioca//lib/tapioca/runtime/reflection.rb#23 Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#16 +# source://tapioca//lib/tapioca/runtime/reflection.rb#27 Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#20 +# source://tapioca//lib/tapioca/runtime/reflection.rb#31 Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#19 +# source://tapioca//lib/tapioca/runtime/reflection.rb#30 Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#18 +# source://tapioca//lib/tapioca/runtime/reflection.rb#29 Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#23 +# source://tapioca//lib/tapioca/runtime/reflection.rb#35 Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca/runtime/reflection.rb#13 +# source://tapioca//lib/tapioca/runtime/reflection.rb#24 Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/runtime/reflection.rb#15 +# source://tapioca//lib/tapioca/runtime/reflection.rb#26 Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#6 -module Tapioca::Runtime::Trackers; end +module Tapioca::Runtime::Trackers + class << self + # source://tapioca//lib/tapioca/runtime/trackers.rb#34 + sig { void } + def disable_all!; end + + # source://tapioca//lib/tapioca/runtime/trackers.rb#39 + sig { params(tracker: ::Tapioca::Runtime::Trackers::Tracker).void } + def register_tracker(tracker); end + + # source://tapioca//lib/tapioca/runtime/trackers.rb#21 + sig do + type_parameters(:Return) + .params( + blk: T.proc.returns(T.type_parameter(:Return)) + ).returns(T.type_parameter(:Return)) + end + def with_trackers_enabled(&blk); end + end +end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#7 module Tapioca::Runtime::Trackers::Autoload + extend ::Tapioca::Runtime::Trackers::Tracker + class << self - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#18 + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#19 sig { void } def eager_load_all!; end - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#30 + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#31 sig { params(constant_name: ::String).void } def register(constant_name); end - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#39 + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#42 sig do type_parameters(:Result) .params( @@ -2919,7 +3082,7 @@ module Tapioca::Runtime::Trackers::Autoload end end -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#10 +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#11 Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc) # Registers a TracePoint immediately upon load to track points at which @@ -2927,37 +3090,34 @@ Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc) # correspondence between classes/modules and files, as this information isn't # available in the ruby runtime without extra accounting. module Tapioca::Runtime::Trackers::ConstantDefinition + extend ::Tapioca::Runtime::Trackers::Tracker + extend ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::Reflection class << self - # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#53 + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#61 def build_constant_location(tp, locations); end + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#55 + def disable!; end + # Returns the files in which this class or module was opened. Doesn't know # about situations where the class was opened prior to +require+ing, # or where metaprogramming was used via +eval+, etc. # - # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#63 + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#71 def files_for(klass); end - # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#67 + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#75 def locations_for(klass); end end end -class Tapioca::Runtime::Trackers::ConstantDefinition::ConstantLocation < ::T::Struct - const :lineno, ::Integer - const :path, ::String - - class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 - def inherited(s); end - end -end - module Tapioca::Runtime::Trackers::Mixin + extend ::Tapioca::Runtime::Trackers::Tracker + class << self - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#55 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#56 sig do params( mixin: ::Module @@ -2965,10 +3125,23 @@ module Tapioca::Runtime::Trackers::Mixin end def constants_with_mixin(mixin); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#45 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#61 + sig do + params( + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, + constant: ::Module + ).returns(T.nilable(::String)) + end + def mixin_location(mixin, mixin_type, constant); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#35 sig { params(constant: ::Module, mixin: ::Module, mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type).void } def register(constant, mixin, mixin_type); end + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#43 + def resolve_to_attached_class(constant, mixin, mixin_type); end + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#30 sig do type_parameters(:Result) @@ -2977,6 +3150,27 @@ module Tapioca::Runtime::Trackers::Mixin ).returns(T.type_parameter(:Result)) end def with_disabled_registration(&block); end + + private + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#76 + sig do + params( + mixin: ::Module + ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) + end + def find_or_initialize_mixin_lookup(mixin); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#68 + sig do + params( + constant: ::Module, + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, + location: ::String + ).void + end + def register_with_location(constant, mixin, mixin_type, location); end end end @@ -2990,43 +3184,68 @@ end # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#7 module Tapioca::Runtime::Trackers::RequiredAncestor + extend ::Tapioca::Runtime::Trackers::Tracker + class << self - # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#14 - sig { params(requiring: ::T::Helpers, block: T.proc.returns(::Module)).void } + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#15 + sig { params(requiring: ::T::Helpers, block: T.proc.void).void } def register(requiring, block); end - # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#20 - sig { params(mod: ::Module).returns(T::Array[T.proc.returns(::Module)]) } + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#23 + sig { params(mod: ::Module).returns(T::Array[T.proc.void]) } def required_ancestors_blocks_by(mod); end - # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#25 - sig { params(mod: ::Module).returns(T::Array[T.nilable(::Module)]) } + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#28 + sig { params(mod: ::Module).returns(T::Array[T.untyped]) } def required_ancestors_by(mod); end end end -# source://tapioca//lib/tapioca.rb#43 +# @abstract Subclasses must implement the `abstract` methods below. +module Tapioca::Runtime::Trackers::Tracker + abstract! + + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#26 + sig { void } + def disable!; end + + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#30 + def enabled?; end + + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#34 + def with_disabled_tracker(&block); end + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#17 + sig { params(base: T.all(::Module, ::Tapioca::Runtime::Trackers::Tracker)).void } + def extended(base); end + end +end + +# source://tapioca//lib/tapioca.rb#33 Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#42 +# source://tapioca//lib/tapioca.rb#32 Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 module Tapioca::SorbetHelper - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#29 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#34 sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } def sorbet(*sorbet_args); end - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#34 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#39 sig { returns(::String) } def sorbet_path; end - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#41 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#46 sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } def sorbet_supports?(feature, version: T.unsafe(nil)); end end -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#22 +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#24 Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#13 @@ -3041,6 +3260,9 @@ Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#20 Tapioca::SorbetHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String) +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#22 +Tapioca::SorbetHelper::SPOOM_CONTEXT = T.let(T.unsafe(nil), Spoom::Context) + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#5 module Tapioca::Static; end @@ -3076,6 +3298,7 @@ end # source://tapioca//lib/tapioca/static/symbol_loader.rb#6 module Tapioca::Static::SymbolLoader extend ::Tapioca::SorbetHelper + extend ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::Reflection class << self @@ -3091,20 +3314,20 @@ module Tapioca::Static::SymbolLoader sig { returns(T::Set[::String]) } def payload_symbols; end + # source://tapioca//lib/tapioca/static/symbol_loader.rb#45 + sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } + def symbols_from_paths(paths); end + private # @return [Array] # - # source://sorbet-runtime/0.5.10439/lib/types/private/methods/_methods.rb#250 + # source://sorbet-runtime/0.5.11074/lib/types/private/methods/_methods.rb#255 def engines(*args, **_arg1, &blk); end - # source://tapioca//lib/tapioca/static/symbol_loader.rb#59 + # source://tapioca//lib/tapioca/static/symbol_loader.rb#74 sig { params(input: ::String, table_type: ::String).returns(::String) } def symbol_table_json_from(input, table_type: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/static/symbol_loader.rb#64 - sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } - def symbols_from_paths(paths); end end end @@ -3114,7 +3337,7 @@ class Tapioca::Static::SymbolTableParser sig { void } def initialize; end - # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#59 + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#65 sig { params(name: ::String).returns(::String) } def fully_qualified_name(name); end @@ -3136,22 +3359,22 @@ end # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca.rb#45 +# source://tapioca//lib/tapioca.rb#35 Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#44 +# source://tapioca//lib/tapioca.rb#34 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#98 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#137 class Tapioca::TypeVariable < ::T::Types::TypeVariable # @return [TypeVariable] a new instance of TypeVariable # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#99 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#138 def initialize(name, variance); end # Returns the value of attribute name. # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#104 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#143 def name; end end @@ -3161,9 +3384,9 @@ end # need to do any matching of constants to type variables to bind their names, Ruby will # do that automatically for us and we get the `name` method for free from `Module`. # -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#112 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#151 class Tapioca::TypeVariableModule < ::Module - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#134 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#177 sig do params( context: ::Module, @@ -3177,21 +3400,33 @@ class Tapioca::TypeVariableModule < ::Module end def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#184 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#218 sig { returns(::Tapioca::TypeVariable) } def coerce_to_type_variable; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#149 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#198 + sig { returns(T::Boolean) } + def fixed?; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#192 sig { returns(T.nilable(::String)) } def name; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#168 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#203 sig { returns(::String) } def serialize; end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#163 + sig { returns(::Tapioca::TypeVariableModule::Type) } + def type; end + private - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#194 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#238 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def bounds; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#228 sig do params( fixed: T.untyped, @@ -3200,54 +3435,51 @@ class Tapioca::TypeVariableModule < ::Module ).returns(T.proc.returns(T::Hash[::Symbol, T.untyped])) end def build_bounds_proc(fixed, lower, upper); end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#208 - sig do - type_parameters(:Result) - .params( - block: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end - def with_bound_name_pre_3_0(&block); end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#115 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#154 class Tapioca::TypeVariableModule::Type < ::T::Enum enums do Member = new Template = new + HasAttachedClass = new end end # source://tapioca//lib/tapioca/version.rb#5 Tapioca::VERSION = T.let(T.unsafe(nil), String) +# source://tapioca//lib/tapioca/helpers/source_uri.rb#6 +module URI + include ::URI::RFC2396_REGEXP +end + # source://tapioca//lib/tapioca/helpers/source_uri.rb#7 class URI::Source < ::URI::File - # source://tapioca//lib/tapioca/helpers/source_uri.rb#55 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.11.0/uri/generic.rb#243 + # source://uri/0.12.1/uri/generic.rb#243 def gem_name; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#22 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.11.0/uri/generic.rb#283 + # source://uri/0.12.1/uri/generic.rb#283 def line_number; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#48 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#67 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#70 sig { returns(::String) } def to_s; end class << self - # source://tapioca//lib/tapioca/helpers/source_uri.rb#35 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#38 sig do params( gem_name: ::String, @@ -3262,3 +3494,5 @@ end # source://tapioca//lib/tapioca/helpers/source_uri.rb#10 URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) + +class URI::WSS < ::URI::WS; end diff --git a/sorbet/rbi/gems/thor@1.2.1.rbi b/sorbet/rbi/gems/thor@1.2.2.rbi similarity index 97% rename from sorbet/rbi/gems/thor@1.2.1.rbi rename to sorbet/rbi/gems/thor@1.2.2.rbi index d81a4f5..dcb11ee 100644 --- a/sorbet/rbi/gems/thor@1.2.1.rbi +++ b/sorbet/rbi/gems/thor@1.2.2.rbi @@ -693,7 +693,7 @@ module Thor::Actions # flag:: the regexp or string to be replaced # replacement:: the replacement, can be also given as a block # config:: give :verbose => false to not log the status, and - # :force => true, to force the replacement regardles of runner behavior. + # :force => true, to force the replacement regardless of runner behavior. # # ==== Example # @@ -871,7 +871,7 @@ module Thor::Actions # run('ln -s ~/edge rails') # end # - # source://thor//lib/thor/actions.rb#248 + # source://thor//lib/thor/actions.rb#249 def run(command, config = T.unsafe(nil)); end # Executes a ruby script (taking into account WIN32 platform quirks). @@ -880,7 +880,7 @@ module Thor::Actions # command:: the command to be executed. # config:: give :verbose => false to not log the status. # - # source://thor//lib/thor/actions.rb#285 + # source://thor//lib/thor/actions.rb#286 def run_ruby_script(command, config = T.unsafe(nil)); end # Holds source paths in instance so they can be manipulated. @@ -924,7 +924,7 @@ module Thor::Actions # thor :list, :all => true, :substring => 'rails' # #=> thor list --all --substring=rails # - # source://thor//lib/thor/actions.rb#308 + # source://thor//lib/thor/actions.rb#309 def thor(command, *args); end # Uncomment all lines matching a given regex. It will leave the space @@ -945,12 +945,12 @@ module Thor::Actions protected - # source://thor//lib/thor/actions.rb#329 + # source://thor//lib/thor/actions.rb#330 def _cleanup_options_and_set(options, key); end # Allow current root to be shared between invocations. # - # source://thor//lib/thor/actions.rb#325 + # source://thor//lib/thor/actions.rb#326 def _shared_configuration; end private @@ -1297,10 +1297,10 @@ end # source://thor//lib/thor/actions/inject_into_file.rb#24 Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) -# source://thor//lib/thor/error.rb#60 +# source://thor//lib/thor/error.rb#68 class Thor::AmbiguousCommandError < ::Thor::Error; end -# source://thor//lib/thor/error.rb#62 +# source://thor//lib/thor/error.rb#70 Thor::AmbiguousTaskError = Thor::AmbiguousCommandError # source://thor//lib/thor/parser/argument.rb#2 @@ -1982,12 +1982,12 @@ module Thor::Base::ClassMethods # SIGNATURE: Sets the baseclass. This is where the superclass lookup # finishes. # - # source://thor//lib/thor/base.rb#679 + # source://thor//lib/thor/base.rb#678 def baseclass; end # The basename of the program invoking the thor class. # - # source://thor//lib/thor/base.rb#673 + # source://thor//lib/thor/base.rb#672 def basename; end # Build an option and adds it to the given scope. @@ -1997,7 +1997,7 @@ module Thor::Base::ClassMethods # options:: Described in both class_option and method_option. # scope:: Options hash that is being built up # - # source://thor//lib/thor/base.rb#590 + # source://thor//lib/thor/base.rb#589 def build_option(name, options, scope); end # Receives a hash of options, parse them and add to the scope. This is a @@ -2008,7 +2008,7 @@ module Thor::Base::ClassMethods # ==== Parameters # Hash[Symbol => Object] # - # source://thor//lib/thor/base.rb#601 + # source://thor//lib/thor/base.rb#600 def build_options(options, scope); end # Prints the class options per group. If an option does not belong to @@ -2020,65 +2020,65 @@ module Thor::Base::ClassMethods # SIGNATURE: Creates a new command if valid_command? is true. This method is # called when a new method is added to the class. # - # source://thor//lib/thor/base.rb#684 + # source://thor//lib/thor/base.rb#683 def create_command(meth); end # SIGNATURE: Creates a new command if valid_command? is true. This method is # called when a new method is added to the class. # - # source://thor//lib/thor/base.rb#684 + # source://thor//lib/thor/base.rb#683 def create_task(meth); end # SIGNATURE: The hook invoked by start. # # @raise [NotImplementedError] # - # source://thor//lib/thor/base.rb#694 + # source://thor//lib/thor/base.rb#693 def dispatch(command, given_args, given_opts, config); end # Finds a command with the given name. If the command belongs to the current # class, just return it, otherwise dup it and add the fresh copy to the # current command hash. # - # source://thor//lib/thor/base.rb#610 + # source://thor//lib/thor/base.rb#609 def find_and_refresh_command(name); end # Finds a command with the given name. If the command belongs to the current # class, just return it, otherwise dup it and add the fresh copy to the # current command hash. # - # source://thor//lib/thor/base.rb#610 + # source://thor//lib/thor/base.rb#609 def find_and_refresh_task(name); end # Retrieves a value from superclass. If it reaches the baseclass, # returns default. # - # source://thor//lib/thor/base.rb#651 + # source://thor//lib/thor/base.rb#650 def from_superclass(method, default = T.unsafe(nil)); end - # Everytime someone inherits from a Thor class, register the klass + # Every time someone inherits from a Thor class, register the klass # and file into baseclass. # - # source://thor//lib/thor/base.rb#623 + # source://thor//lib/thor/base.rb#622 def inherited(klass); end # SIGNATURE: Defines behavior when the initialize method is added to the # class. # - # source://thor//lib/thor/base.rb#690 + # source://thor//lib/thor/base.rb#689 def initialize_added; end # Raises an error if the word given is a Thor reserved word. # # @return [Boolean] # - # source://thor//lib/thor/base.rb#579 + # source://thor//lib/thor/base.rb#578 def is_thor_reserved_word?(word, type); end # Fire this callback whenever a method is added. Added methods are # tracked as commands by invoking the create_command method. # - # source://thor//lib/thor/base.rb#631 + # source://thor//lib/thor/base.rb#630 def method_added(meth); end # Receives a set of options and print them. @@ -2241,8 +2241,14 @@ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash def method_missing(method, *args); end end -# source://thor//lib/thor/error.rb#2 -Thor::Correctable = DidYouMean::Correctable +# source://thor//lib/thor/error.rb#14 +module Thor::Correctable + # source://thor//lib/thor/error.rb#19 + def corrections; end + + # source://thor//lib/thor/error.rb#15 + def to_s; end +end # A dynamic command that handles method missing scenarios. # @@ -2267,7 +2273,7 @@ Thor::DynamicTask = Thor::DynamicCommand # overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we # ensure that developer errors are shown with full backtrace. # -# source://thor//lib/thor/error.rb#23 +# source://thor//lib/thor/error.rb#31 class Thor::Error < ::StandardError; end # Thor has a special class called Thor::Group. The main difference to Thor class @@ -2605,7 +2611,7 @@ end # Raised when a command was found, but not invoked properly. # -# source://thor//lib/thor/error.rb#65 +# source://thor//lib/thor/error.rb#73 class Thor::InvocationError < ::Thor::Error; end # source://thor//lib/thor/line_editor/basic.rb#2 @@ -2718,7 +2724,7 @@ class Thor::LineEditor::Readline::PathCompletion def text; end end -# source://thor//lib/thor/error.rb#101 +# source://thor//lib/thor/error.rb#109 class Thor::MalformattedArgumentError < ::Thor::InvocationError; end # source://thor//lib/thor/nested_context.rb#2 @@ -2763,10 +2769,13 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def aliases; end - # source://thor//lib/thor/parser/option.rb#105 + # source://thor//lib/thor/parser/option.rb#99 + def aliases_for_usage; end + + # source://thor//lib/thor/parser/option.rb#109 def array?; end - # source://thor//lib/thor/parser/option.rb#105 + # source://thor//lib/thor/parser/option.rb#109 def boolean?; end # Returns the value of attribute group. @@ -2774,7 +2783,7 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def group; end - # source://thor//lib/thor/parser/option.rb#105 + # source://thor//lib/thor/parser/option.rb#109 def hash?; end # Returns the value of attribute hide. @@ -2790,7 +2799,7 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def lazy_default; end - # source://thor//lib/thor/parser/option.rb#105 + # source://thor//lib/thor/parser/option.rb#109 def numeric?; end # Returns the value of attribute repeatable. @@ -2798,7 +2807,7 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def repeatable; end - # source://thor//lib/thor/parser/option.rb#105 + # source://thor//lib/thor/parser/option.rb#109 def string?; end # source://thor//lib/thor/parser/option.rb#75 @@ -2809,23 +2818,23 @@ class Thor::Option < ::Thor::Argument protected - # source://thor//lib/thor/parser/option.rb#155 + # source://thor//lib/thor/parser/option.rb#159 def dasherize(str); end # @return [Boolean] # - # source://thor//lib/thor/parser/option.rb#147 + # source://thor//lib/thor/parser/option.rb#151 def dasherized?; end - # source://thor//lib/thor/parser/option.rb#151 + # source://thor//lib/thor/parser/option.rb#155 def undasherize(str); end # @raise [ArgumentError] # - # source://thor//lib/thor/parser/option.rb#113 + # source://thor//lib/thor/parser/option.rb#117 def validate!; end - # source://thor//lib/thor/parser/option.rb#118 + # source://thor//lib/thor/parser/option.rb#122 def validate_default_type!; end class << self @@ -2977,7 +2986,40 @@ Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp) # source://thor//lib/thor/parser/options.rb#6 Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp) -# source://thor//lib/thor/error.rb#98 +# Adds a compatibility layer to your Thor classes which allows you to use +# rake package tasks. For example, to use rspec rake tasks, one can do: +# +# require 'thor/rake_compat' +# require 'rspec/core/rake_task' +# +# class Default < Thor +# include Thor::RakeCompat +# +# RSpec::Core::RakeTask.new(:spec) do |t| +# t.spec_opts = ['--options', './.rspec'] +# t.spec_files = FileList['spec/**/*_spec.rb'] +# end +# end +# +# source://thor//lib/thor/rake_compat.rb#20 +module Thor::RakeCompat + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL + + class << self + # @private + # + # source://thor//lib/thor/rake_compat.rb#27 + def included(base); end + + # source://thor//lib/thor/rake_compat.rb#23 + def rake_classes; end + end +end + +# source://thor//lib/thor/error.rb#106 class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end # source://thor//lib/thor/util.rb#4 @@ -3333,7 +3375,7 @@ Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) # Inherit from Thor::Shell::Basic and add set_color behavior. Check # Thor::Shell::Basic to see all available methods. # -# source://thor//lib/thor/shell/color.rb#9 +# source://thor//lib/thor/shell/color.rb#8 class Thor::Shell::Color < ::Thor::Shell::Basic # Set color by using a string or one of the defined constants. If a third # option is set to true, it also adds bold to the string. This is based @@ -3498,7 +3540,7 @@ Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) # Inherit from Thor::Shell::Basic and add set_color behavior. Check # Thor::Shell::Basic to see all available methods. # -# source://thor//lib/thor/shell/html.rb#9 +# source://thor//lib/thor/shell/html.rb#8 class Thor::Shell::HTML < ::Thor::Shell::Basic # Ask something to the user and receives a response. # @@ -3646,84 +3688,84 @@ Thor::Task = Thor::Command # Raised when a command was not found. # -# source://thor//lib/thor/error.rb#27 +# source://thor//lib/thor/error.rb#35 class Thor::UndefinedCommandError < ::Thor::Error - include ::DidYouMean::Correctable + include ::Thor::Correctable # @return [UndefinedCommandError] a new instance of UndefinedCommandError # - # source://thor//lib/thor/error.rb#46 + # source://thor//lib/thor/error.rb#54 def initialize(command, all_commands, namespace); end # Returns the value of attribute all_commands. # - # source://thor//lib/thor/error.rb#44 + # source://thor//lib/thor/error.rb#52 def all_commands; end # Returns the value of attribute command. # - # source://thor//lib/thor/error.rb#44 + # source://thor//lib/thor/error.rb#52 def command; end end -# source://thor//lib/thor/error.rb#28 +# source://thor//lib/thor/error.rb#36 class Thor::UndefinedCommandError::SpellChecker # @return [SpellChecker] a new instance of SpellChecker # - # source://thor//lib/thor/error.rb#31 + # source://thor//lib/thor/error.rb#39 def initialize(error); end - # source://thor//lib/thor/error.rb#35 + # source://thor//lib/thor/error.rb#43 def corrections; end # Returns the value of attribute error. # - # source://thor//lib/thor/error.rb#29 + # source://thor//lib/thor/error.rb#37 def error; end - # source://thor//lib/thor/error.rb#39 + # source://thor//lib/thor/error.rb#47 def spell_checker; end end -# source://thor//lib/thor/error.rb#58 +# source://thor//lib/thor/error.rb#66 Thor::UndefinedTaskError = Thor::UndefinedCommandError -# source://thor//lib/thor/error.rb#68 +# source://thor//lib/thor/error.rb#76 class Thor::UnknownArgumentError < ::Thor::Error - include ::DidYouMean::Correctable + include ::Thor::Correctable # @return [UnknownArgumentError] a new instance of UnknownArgumentError # - # source://thor//lib/thor/error.rb#88 + # source://thor//lib/thor/error.rb#96 def initialize(switches, unknown); end # Returns the value of attribute switches. # - # source://thor//lib/thor/error.rb#86 + # source://thor//lib/thor/error.rb#94 def switches; end # Returns the value of attribute unknown. # - # source://thor//lib/thor/error.rb#86 + # source://thor//lib/thor/error.rb#94 def unknown; end end -# source://thor//lib/thor/error.rb#69 +# source://thor//lib/thor/error.rb#77 class Thor::UnknownArgumentError::SpellChecker # @return [SpellChecker] a new instance of SpellChecker # - # source://thor//lib/thor/error.rb#72 + # source://thor//lib/thor/error.rb#80 def initialize(error); end - # source://thor//lib/thor/error.rb#76 + # source://thor//lib/thor/error.rb#84 def corrections; end # Returns the value of attribute error. # - # source://thor//lib/thor/error.rb#70 + # source://thor//lib/thor/error.rb#78 def error; end - # source://thor//lib/thor/error.rb#81 + # source://thor//lib/thor/error.rb#89 def spell_checker; end end diff --git a/sorbet/rbi/gems/unparser@0.6.5.rbi b/sorbet/rbi/gems/unparser@0.6.5.rbi deleted file mode 100644 index a885094..0000000 --- a/sorbet/rbi/gems/unparser@0.6.5.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `unparser` gem. -# Please instead update this file by running `bin/tapioca gem unparser`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/webrick@1.7.0.rbi b/sorbet/rbi/gems/webrick@1.7.0.rbi deleted file mode 100644 index ec98e78..0000000 --- a/sorbet/rbi/gems/webrick@1.7.0.rbi +++ /dev/null @@ -1,2555 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `webrick` gem. -# Please instead update this file by running `bin/tapioca gem webrick`. - -# AccessLog provides logging to various files in various formats. -# -# Multiple logs may be written to at the same time: -# -# access_log = [ -# [$stderr, WEBrick::AccessLog::COMMON_LOG_FORMAT], -# [$stderr, WEBrick::AccessLog::REFERER_LOG_FORMAT], -# ] -# -# server = WEBrick::HTTPServer.new :AccessLog => access_log -# -# Custom log formats may be defined. WEBrick::AccessLog provides a subset -# of the formatting from Apache's mod_log_config -# http://httpd.apache.org/docs/mod/mod_log_config.html#formats. See -# AccessLog::setup_params for a list of supported options -# -# source://webrick//lib/webrick/accesslog.rb#30 -module WEBrick::AccessLog - private - - # Escapes control characters in +data+ - # - # source://webrick//lib/webrick/accesslog.rb#151 - def escape(data); end - - # Formats +params+ according to +format_string+ which is described in - # setup_params. - # - # source://webrick//lib/webrick/accesslog.rb#123 - def format(format_string, params); end - - # This format specification is a subset of mod_log_config of Apache: - # - # %a:: Remote IP address - # %b:: Total response size - # %e{variable}:: Given variable in ENV - # %f:: Response filename - # %h:: Remote host name - # %{header}i:: Given request header - # %l:: Remote logname, always "-" - # %m:: Request method - # %{attr}n:: Given request attribute from req.attributes - # %{header}o:: Given response header - # %p:: Server's request port - # %{format}p:: The canonical port of the server serving the request or the - # actual port or the client's actual port. Valid formats are - # canonical, local or remote. - # %q:: Request query string - # %r:: First line of the request - # %s:: Request status - # %t:: Time the request was received - # %T:: Time taken to process the request - # %u:: Remote user from auth - # %U:: Unparsed URI - # %%:: Literal % - # - # source://webrick//lib/webrick/accesslog.rb#95 - def setup_params(config, req, res); end - - class << self - # Escapes control characters in +data+ - # - # source://webrick//lib/webrick/accesslog.rb#151 - def escape(data); end - - # Formats +params+ according to +format_string+ which is described in - # setup_params. - # - # source://webrick//lib/webrick/accesslog.rb#123 - def format(format_string, params); end - - # This format specification is a subset of mod_log_config of Apache: - # - # %a:: Remote IP address - # %b:: Total response size - # %e{variable}:: Given variable in ENV - # %f:: Response filename - # %h:: Remote host name - # %{header}i:: Given request header - # %l:: Remote logname, always "-" - # %m:: Request method - # %{attr}n:: Given request attribute from req.attributes - # %{header}o:: Given response header - # %p:: Server's request port - # %{format}p:: The canonical port of the server serving the request or the - # actual port or the client's actual port. Valid formats are - # canonical, local or remote. - # %q:: Request query string - # %r:: First line of the request - # %s:: Request status - # %t:: Time the request was received - # %T:: Time taken to process the request - # %u:: Remote user from auth - # %U:: Unparsed URI - # %%:: Literal % - # - # source://webrick//lib/webrick/accesslog.rb#95 - def setup_params(config, req, res); end - end -end - -# A generic logging class -# -# source://webrick//lib/webrick/log.rb#17 -class WEBrick::BasicLog - # Initializes a new logger for +log_file+ that outputs messages at +level+ - # or higher. +log_file+ can be a filename, an IO-like object that - # responds to #<< or nil which outputs to $stderr. - # - # If no level is given INFO is chosen by default - # - # @return [BasicLog] a new instance of BasicLog - # - # source://webrick//lib/webrick/log.rb#50 - def initialize(log_file = T.unsafe(nil), level = T.unsafe(nil)); end - - # Synonym for log(INFO, obj.to_s) - # - # source://webrick//lib/webrick/log.rb#84 - def <<(obj); end - - # Closes the logger (also closes the log device associated to the logger) - # - # source://webrick//lib/webrick/log.rb#66 - def close; end - - # Shortcut for logging a DEBUG message - # - # source://webrick//lib/webrick/log.rb#97 - def debug(msg); end - - # Will the logger output DEBUG messages? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/log.rb#108 - def debug?; end - - # Shortcut for logging an ERROR message - # - # source://webrick//lib/webrick/log.rb#91 - def error(msg); end - - # Will the logger output ERROR messages? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/log.rb#102 - def error?; end - - # Shortcut for logging a FATAL message - # - # source://webrick//lib/webrick/log.rb#89 - def fatal(msg); end - - # Will the logger output FATAL messages? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/log.rb#100 - def fatal?; end - - # Shortcut for logging an INFO message - # - # source://webrick//lib/webrick/log.rb#95 - def info(msg); end - - # Will the logger output INFO messages? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/log.rb#106 - def info?; end - - # log-level, messages above this level will be logged - # - # source://webrick//lib/webrick/log.rb#41 - def level; end - - # log-level, messages above this level will be logged - # - # source://webrick//lib/webrick/log.rb#41 - def level=(_arg0); end - - # Logs +data+ at +level+ if the given level is above the current log - # level. - # - # source://webrick//lib/webrick/log.rb#75 - def log(level, data); end - - # Shortcut for logging a WARN message - # - # source://webrick//lib/webrick/log.rb#93 - def warn(msg); end - - # Will the logger output WARN messages? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/log.rb#104 - def warn?; end - - private - - # Formats +arg+ for the logger - # - # * If +arg+ is an Exception, it will format the error message and - # the back trace. - # * If +arg+ responds to #to_str, it will return it. - # * Otherwise it will return +arg+.inspect. - # - # source://webrick//lib/webrick/log.rb#119 - def format(arg); end -end - -# -- -# Updates WEBrick::GenericServer with SSL functionality -# -# source://webrick//lib/webrick/server.rb#56 -class WEBrick::GenericServer - # Creates a new generic server from +config+. The default configuration - # comes from +default+. - # - # @return [GenericServer] a new instance of GenericServer - # - # source://webrick//lib/webrick/server.rb#88 - def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end - - # Retrieves +key+ from the configuration - # - # source://webrick//lib/webrick/server.rb#121 - def [](key); end - - # The server configuration - # - # source://webrick//lib/webrick/server.rb#66 - def config; end - - # Updates +listen+ to enable SSL when the SSL configuration is active. - # - # source://webrick//lib/webrick/server.rb#129 - def listen(address, port); end - - # Sockets listening for connections. - # - # source://webrick//lib/webrick/server.rb#82 - def listeners; end - - # The server logger. This is independent from the HTTP access log. - # - # source://webrick//lib/webrick/server.rb#71 - def logger; end - - # You must subclass GenericServer and implement \#run which accepts a TCP - # client socket - # - # source://webrick//lib/webrick/server.rb#244 - def run(sock); end - - # Shuts down the server and all listening sockets. New listeners must be - # provided to restart the server. - # - # source://webrick//lib/webrick/server.rb#234 - def shutdown; end - - # Starts the server and runs the +block+ for each connection. This method - # does not return until the server is stopped from a signal handler or - # another thread using #stop or #shutdown. - # - # If the block raises a subclass of StandardError the exception is logged - # and ignored. If an IOError or Errno::EBADF exception is raised the - # exception is ignored. If an Exception subclass is raised the exception - # is logged and re-raised which stops the server. - # - # To completely shut down a server call #shutdown from ensure: - # - # server = WEBrick::GenericServer.new - # # or WEBrick::HTTPServer.new - # - # begin - # server.start - # ensure - # server.shutdown - # end - # - # @raise [ServerError] - # - # source://webrick//lib/webrick/server.rb#154 - def start(&block); end - - # The server status. One of :Stop, :Running or :Shutdown - # - # source://webrick//lib/webrick/server.rb#61 - def status; end - - # Stops the server from accepting new connections. - # - # source://webrick//lib/webrick/server.rb#222 - def stop; end - - # Tokens control the number of outstanding clients. The - # :MaxClients configuration sets this. - # - # source://webrick//lib/webrick/server.rb#77 - def tokens; end - - private - - # Accepts a TCP client socket from the TCP server socket +svr+ and returns - # the client socket. - # - # source://webrick//lib/webrick/server.rb#256 - def accept_client(svr); end - - # source://webrick//lib/webrick/server.rb#347 - def alarm_shutdown_pipe; end - - # Calls the callback +callback_name+ from the configuration with +args+ - # - # source://webrick//lib/webrick/server.rb#334 - def call_callback(callback_name, *args); end - - # source://webrick//lib/webrick/server.rb#359 - def cleanup_listener; end - - # source://webrick//lib/webrick/server.rb#342 - def cleanup_shutdown_pipe(shutdown_pipe); end - - # source://webrick//lib/webrick/server.rb#338 - def setup_shutdown_pipe; end - - # Starts a server thread for the client socket +sock+ that runs the given - # +block+. - # - # Sets the socket to the :WEBrickSocket thread local variable - # in the thread. - # - # If any errors occur in the block they are logged and handled. - # - # source://webrick//lib/webrick/server.rb#288 - def start_thread(sock, &block); end -end - -# source://webrick//lib/webrick/htmlutils.rb#13 -module WEBrick::HTMLUtils - private - - # Escapes &, ", > and < in +string+ - # - # source://webrick//lib/webrick/htmlutils.rb#18 - def escape(string); end - - class << self - # Escapes &, ", > and < in +string+ - # - # source://webrick//lib/webrick/htmlutils.rb#18 - def escape(string); end - end -end - -# HTTPAuth provides both basic and digest authentication. -# -# To enable authentication for requests in WEBrick you will need a user -# database and an authenticator. To start, here's an Htpasswd database for -# use with a DigestAuth authenticator: -# -# config = { :Realm => 'DigestAuth example realm' } -# -# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' -# htpasswd.auth_type = WEBrick::HTTPAuth::DigestAuth -# htpasswd.set_passwd config[:Realm], 'username', 'password' -# htpasswd.flush -# -# The +:Realm+ is used to provide different access to different groups -# across several resources on a server. Typically you'll need only one -# realm for a server. -# -# This database can be used to create an authenticator: -# -# config[:UserDB] = htpasswd -# -# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config -# -# To authenticate a request call #authenticate with a request and response -# object in a servlet: -# -# def do_GET req, res -# @authenticator.authenticate req, res -# end -# -# For digest authentication the authenticator must not be created every -# request, it must be passed in as an option via WEBrick::HTTPServer#mount. -# -# source://webrick//lib/webrick/httpauth/authenticator.rb#12 -module WEBrick::HTTPAuth - private - - # source://webrick//lib/webrick/httpauth.rb#57 - def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end - - # Simple wrapper for providing basic authentication for a request. When - # called with a request +req+, response +res+, authentication +realm+ and - # +block+ the block will be called with a +username+ and +password+. If - # the block returns true the request is allowed to continue, otherwise an - # HTTPStatus::Unauthorized error is raised. - # - # source://webrick//lib/webrick/httpauth.rb#79 - def basic_auth(req, res, realm, &block); end - - # Simple wrapper for providing basic authentication for a proxied request. - # When called with a request +req+, response +res+, authentication +realm+ - # and +block+ the block will be called with a +username+ and +password+. - # If the block returns true the request is allowed to continue, otherwise - # an HTTPStatus::ProxyAuthenticationRequired error is raised. - # - # source://webrick//lib/webrick/httpauth.rb#91 - def proxy_basic_auth(req, res, realm, &block); end - - class << self - # source://webrick//lib/webrick/httpauth.rb#57 - def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end - - # Simple wrapper for providing basic authentication for a request. When - # called with a request +req+, response +res+, authentication +realm+ and - # +block+ the block will be called with a +username+ and +password+. If - # the block returns true the request is allowed to continue, otherwise an - # HTTPStatus::Unauthorized error is raised. - # - # source://webrick//lib/webrick/httpauth.rb#79 - def basic_auth(req, res, realm, &block); end - - # Simple wrapper for providing basic authentication for a proxied request. - # When called with a request +req+, response +res+, authentication +realm+ - # and +block+ the block will be called with a +username+ and +password+. - # If the block returns true the request is allowed to continue, otherwise - # an HTTPStatus::ProxyAuthenticationRequired error is raised. - # - # source://webrick//lib/webrick/httpauth.rb#91 - def proxy_basic_auth(req, res, realm, &block); end - end -end - -# Module providing generic support for both Digest and Basic -# authentication schemes. -# -# source://webrick//lib/webrick/httpauth/authenticator.rb#18 -module WEBrick::HTTPAuth::Authenticator - # The logger for this authenticator - # - # source://webrick//lib/webrick/httpauth/authenticator.rb#43 - def logger; end - - # The realm this authenticator covers - # - # source://webrick//lib/webrick/httpauth/authenticator.rb#33 - def realm; end - - # The user database for this authenticator - # - # source://webrick//lib/webrick/httpauth/authenticator.rb#38 - def userdb; end - - private - - # Initializes the authenticator from +config+ - # - # source://webrick//lib/webrick/httpauth/authenticator.rb#52 - def check_init(config); end - - # Ensures +req+ has credentials that can be authenticated. - # - # source://webrick//lib/webrick/httpauth/authenticator.rb#72 - def check_scheme(req); end - - # source://webrick//lib/webrick/httpauth/authenticator.rb#91 - def error(fmt, *args); end - - # source://webrick//lib/webrick/httpauth/authenticator.rb#97 - def info(fmt, *args); end - - # source://webrick//lib/webrick/httpauth/authenticator.rb#85 - def log(meth, fmt, *args); end -end - -# source://webrick//lib/webrick/httpauth/authenticator.rb#23 -WEBrick::HTTPAuth::Authenticator::AuthException = WEBrick::HTTPStatus::Unauthorized - -# Basic Authentication for WEBrick -# -# Use this class to add basic authentication to a WEBrick servlet. -# -# Here is an example of how to set up a BasicAuth: -# -# config = { :Realm => 'BasicAuth example realm' } -# -# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file', password_hash: :bcrypt -# htpasswd.set_passwd config[:Realm], 'username', 'password' -# htpasswd.flush -# -# config[:UserDB] = htpasswd -# -# basic_auth = WEBrick::HTTPAuth::BasicAuth.new config -# -# source://webrick//lib/webrick/httpauth/basicauth.rb#35 -class WEBrick::HTTPAuth::BasicAuth - include ::WEBrick::HTTPAuth::Authenticator - - # Creates a new BasicAuth instance. - # - # See WEBrick::Config::BasicAuth for default configuration entries - # - # You must supply the following configuration entries: - # - # :Realm:: The name of the realm being protected. - # :UserDB:: A database of usernames and passwords. - # A WEBrick::HTTPAuth::Htpasswd instance should be used. - # - # @return [BasicAuth] a new instance of BasicAuth - # - # source://webrick//lib/webrick/httpauth/basicauth.rb#61 - def initialize(config, default = T.unsafe(nil)); end - - # Authenticates a +req+ and returns a 401 Unauthorized using +res+ if - # the authentication was not correct. - # - # source://webrick//lib/webrick/httpauth/basicauth.rb#70 - def authenticate(req, res); end - - # Returns a challenge response which asks for authentication information - # - # @raise [@auth_exception] - # - # source://webrick//lib/webrick/httpauth/basicauth.rb#103 - def challenge(req, res); end - - # Returns the value of attribute logger. - # - # source://webrick//lib/webrick/httpauth/basicauth.rb#48 - def logger; end - - # Returns the value of attribute realm. - # - # source://webrick//lib/webrick/httpauth/basicauth.rb#48 - def realm; end - - # Returns the value of attribute userdb. - # - # source://webrick//lib/webrick/httpauth/basicauth.rb#48 - def userdb; end - - class << self - # Used by UserDB to create a basic password entry - # - # source://webrick//lib/webrick/httpauth/basicauth.rb#43 - def make_passwd(realm, user, pass); end - end -end - -# RFC 2617 Digest Access Authentication for WEBrick -# -# Use this class to add digest authentication to a WEBrick servlet. -# -# Here is an example of how to set up DigestAuth: -# -# config = { :Realm => 'DigestAuth example realm' } -# -# htdigest = WEBrick::HTTPAuth::Htdigest.new 'my_password_file' -# htdigest.set_passwd config[:Realm], 'username', 'password' -# htdigest.flush -# -# config[:UserDB] = htdigest -# -# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config -# -# When using this as with a servlet be sure not to create a new DigestAuth -# object in the servlet's #initialize. By default WEBrick creates a new -# servlet instance for every request and the DigestAuth object must be -# used across requests. -# -# source://webrick//lib/webrick/httpauth/digestauth.rb#46 -class WEBrick::HTTPAuth::DigestAuth - include ::WEBrick::HTTPAuth::Authenticator - - # Creates a new DigestAuth instance. Be sure to use the same DigestAuth - # instance for multiple requests as it saves state between requests in - # order to perform authentication. - # - # See WEBrick::Config::DigestAuth for default configuration entries - # - # You must supply the following configuration entries: - # - # :Realm:: The name of the realm being protected. - # :UserDB:: A database of usernames and passwords. - # A WEBrick::HTTPAuth::Htdigest instance should be used. - # - # @return [DigestAuth] a new instance of DigestAuth - # - # source://webrick//lib/webrick/httpauth/digestauth.rb#87 - def initialize(config, default = T.unsafe(nil)); end - - # Digest authentication algorithm - # - # source://webrick//lib/webrick/httpauth/digestauth.rb#59 - def algorithm; end - - # Authenticates a +req+ and returns a 401 Unauthorized using +res+ if - # the authentication was not correct. - # - # source://webrick//lib/webrick/httpauth/digestauth.rb#121 - def authenticate(req, res); end - - # Returns a challenge response which asks for authentication information - # - # @raise [@auth_exception] - # - # source://webrick//lib/webrick/httpauth/digestauth.rb#134 - def challenge(req, res, stale = T.unsafe(nil)); end - - # Quality of protection. RFC 2617 defines "auth" and "auth-int" - # - # source://webrick//lib/webrick/httpauth/digestauth.rb#64 - def qop; end - - private - - # source://webrick//lib/webrick/httpauth/digestauth.rb#163 - def _authenticate(req, res); end - - # source://webrick//lib/webrick/httpauth/digestauth.rb#306 - def check_nonce(req, auth_req); end - - # source://webrick//lib/webrick/httpauth/digestauth.rb#349 - def check_opaque(opaque_struct, req, auth_req); end - - # source://webrick//lib/webrick/httpauth/digestauth.rb#365 - def check_uri(req, auth_req); end - - # source://webrick//lib/webrick/httpauth/digestauth.rb#299 - def generate_next_nonce(req); end - - # source://webrick//lib/webrick/httpauth/digestauth.rb#332 - def generate_opaque(req); end - - # source://webrick//lib/webrick/httpauth/digestauth.rb#376 - def hexdigest(*args); end - - # source://webrick//lib/webrick/httpauth/digestauth.rb#291 - def split_param_value(string); end - - class << self - # Used by UserDB to create a digest password entry - # - # source://webrick//lib/webrick/httpauth/digestauth.rb#69 - def make_passwd(realm, user, pass); end - end -end - -# Htdigest accesses apache-compatible digest password files. Passwords are -# matched to a realm where they are valid. For security, the path for a -# digest password database should be stored outside of the paths available -# to the HTTP server. -# -# Htdigest is intended for use with WEBrick::HTTPAuth::DigestAuth and -# stores passwords using cryptographic hashes. -# -# htpasswd = WEBrick::HTTPAuth::Htdigest.new 'my_password_file' -# htpasswd.set_passwd 'my realm', 'username', 'password' -# htpasswd.flush -# -# source://webrick//lib/webrick/httpauth/htdigest.rb#31 -class WEBrick::HTTPAuth::Htdigest - include ::WEBrick::HTTPAuth::UserDB - - # Open a digest password database at +path+ - # - # @return [Htdigest] a new instance of Htdigest - # - # source://webrick//lib/webrick/httpauth/htdigest.rb#37 - def initialize(path); end - - # Removes a password from the database for +user+ in +realm+. - # - # source://webrick//lib/webrick/httpauth/htdigest.rb#113 - def delete_passwd(realm, user); end - - # Iterate passwords in the database. - # - # source://webrick//lib/webrick/httpauth/htdigest.rb#122 - def each; end - - # Flush the password database. If +output+ is given the database will - # be written there instead of to the original path. - # - # source://webrick//lib/webrick/httpauth/htdigest.rb#72 - def flush(output = T.unsafe(nil)); end - - # Retrieves a password from the database for +user+ in +realm+. If - # +reload_db+ is true the database will be reloaded first. - # - # source://webrick//lib/webrick/httpauth/htdigest.rb#91 - def get_passwd(realm, user, reload_db); end - - # Reloads passwords from the database - # - # source://webrick//lib/webrick/httpauth/htdigest.rb#50 - def reload; end - - # Sets a password in the database for +user+ in +realm+ to +pass+. - # - # source://webrick//lib/webrick/httpauth/htdigest.rb#101 - def set_passwd(realm, user, pass); end -end - -# Htgroup accesses apache-compatible group files. Htgroup can be used to -# provide group-based authentication for users. Currently Htgroup is not -# directly integrated with any authenticators in WEBrick. For security, -# the path for a digest password database should be stored outside of the -# paths available to the HTTP server. -# -# Example: -# -# htgroup = WEBrick::HTTPAuth::Htgroup.new 'my_group_file' -# htgroup.add 'superheroes', %w[spiderman batman] -# -# htgroup.members('superheroes').include? 'magneto' # => false -# -# source://webrick//lib/webrick/httpauth/htgroup.rb#30 -class WEBrick::HTTPAuth::Htgroup - # Open a group database at +path+ - # - # @return [Htgroup] a new instance of Htgroup - # - # source://webrick//lib/webrick/httpauth/htgroup.rb#35 - def initialize(path); end - - # Add an Array of +members+ to +group+ - # - # source://webrick//lib/webrick/httpauth/htgroup.rb#92 - def add(group, members); end - - # Flush the group database. If +output+ is given the database will be - # written there instead of to the original path. - # - # source://webrick//lib/webrick/httpauth/htgroup.rb#64 - def flush(output = T.unsafe(nil)); end - - # Retrieve the list of members from +group+ - # - # source://webrick//lib/webrick/httpauth/htgroup.rb#84 - def members(group); end - - # Reload groups from the database - # - # source://webrick//lib/webrick/httpauth/htgroup.rb#46 - def reload; end -end - -# Htpasswd accesses apache-compatible password files. Passwords are -# matched to a realm where they are valid. For security, the path for a -# password database should be stored outside of the paths available to the -# HTTP server. -# -# Htpasswd is intended for use with WEBrick::HTTPAuth::BasicAuth. -# -# To create an Htpasswd database with a single user: -# -# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' -# htpasswd.set_passwd 'my realm', 'username', 'password' -# htpasswd.flush -# -# source://webrick//lib/webrick/httpauth/htpasswd.rb#32 -class WEBrick::HTTPAuth::Htpasswd - include ::WEBrick::HTTPAuth::UserDB - - # Open a password database at +path+ - # - # @return [Htpasswd] a new instance of Htpasswd - # - # source://webrick//lib/webrick/httpauth/htpasswd.rb#38 - def initialize(path, password_hash: T.unsafe(nil)); end - - # Removes a password from the database for +user+ in +realm+. - # - # source://webrick//lib/webrick/httpauth/htpasswd.rb#144 - def delete_passwd(realm, user); end - - # Iterate passwords in the database. - # - # source://webrick//lib/webrick/httpauth/htpasswd.rb#151 - def each; end - - # Flush the password database. If +output+ is given the database will - # be written there instead of to the original path. - # - # source://webrick//lib/webrick/httpauth/htpasswd.rb#103 - def flush(output = T.unsafe(nil)); end - - # Retrieves a password from the database for +user+ in +realm+. If - # +reload_db+ is true the database will be reloaded first. - # - # source://webrick//lib/webrick/httpauth/htpasswd.rb#122 - def get_passwd(realm, user, reload_db); end - - # Reload passwords from the database - # - # source://webrick//lib/webrick/httpauth/htpasswd.rb#68 - def reload; end - - # Sets a password in the database for +user+ in +realm+ to +pass+. - # - # source://webrick//lib/webrick/httpauth/htpasswd.rb#130 - def set_passwd(realm, user, pass); end -end - -# source://webrick//lib/webrick/httpauth/authenticator.rb#114 -WEBrick::HTTPAuth::ProxyAuthenticator::AuthException = WEBrick::HTTPStatus::ProxyAuthenticationRequired - -# Basic authentication for proxy servers. See BasicAuth for details. -# -# source://webrick//lib/webrick/httpauth/basicauth.rb#112 -class WEBrick::HTTPAuth::ProxyBasicAuth < ::WEBrick::HTTPAuth::BasicAuth - include ::WEBrick::HTTPAuth::ProxyAuthenticator -end - -# Digest authentication for proxy servers. See DigestAuth for details. -# -# source://webrick//lib/webrick/httpauth/digestauth.rb#386 -class WEBrick::HTTPAuth::ProxyDigestAuth < ::WEBrick::HTTPAuth::DigestAuth - include ::WEBrick::HTTPAuth::ProxyAuthenticator - - private - - # source://webrick//lib/webrick/httpauth/digestauth.rb#390 - def check_uri(req, auth_req); end -end - -# User database mixin for HTTPAuth. This mixin dispatches user record -# access to the underlying auth_type for this database. -# -# source://webrick//lib/webrick/httpauth/userdb.rb#18 -module WEBrick::HTTPAuth::UserDB - # The authentication type. - # - # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are - # built-in. - # - # source://webrick//lib/webrick/httpauth/userdb.rb#26 - def auth_type; end - - # The authentication type. - # - # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are - # built-in. - # - # source://webrick//lib/webrick/httpauth/userdb.rb#26 - def auth_type=(_arg0); end - - # Retrieves a password in +realm+ for +user+ for the auth_type of this - # database. +reload_db+ is a dummy value. - # - # source://webrick//lib/webrick/httpauth/userdb.rb#48 - def get_passwd(realm, user, reload_db = T.unsafe(nil)); end - - # Creates an obscured password in +realm+ with +user+ and +password+ - # using the auth_type of this database. - # - # source://webrick//lib/webrick/httpauth/userdb.rb#32 - def make_passwd(realm, user, pass); end - - # Sets a password in +realm+ with +user+ and +password+ for the - # auth_type of this database. - # - # source://webrick//lib/webrick/httpauth/userdb.rb#40 - def set_passwd(realm, user, pass); end -end - -# -- -# Adds SSL functionality to WEBrick::HTTPRequest -# -# source://webrick//lib/webrick/httprequest.rb#25 -class WEBrick::HTTPRequest - # Creates a new HTTP request. WEBrick::Config::HTTP is the default - # configuration. - # - # @return [HTTPRequest] a new instance of HTTPRequest - # - # source://webrick//lib/webrick/httprequest.rb#153 - def initialize(config); end - - # Retrieves +header_name+ - # - # source://webrick//lib/webrick/httprequest.rb#318 - def [](header_name); end - - # The Accept header value - # - # source://webrick//lib/webrick/httprequest.rb#100 - def accept; end - - # The Accept-Charset header value - # - # source://webrick//lib/webrick/httprequest.rb#105 - def accept_charset; end - - # The Accept-Encoding header value - # - # source://webrick//lib/webrick/httprequest.rb#110 - def accept_encoding; end - - # The Accept-Language header value - # - # source://webrick//lib/webrick/httprequest.rb#115 - def accept_language; end - - # The socket address of the server - # - # source://webrick//lib/webrick/httprequest.rb#127 - def addr; end - - # Hash of request attributes - # - # source://webrick//lib/webrick/httprequest.rb#137 - def attributes; end - - # Returns the request body. - # - # source://webrick//lib/webrick/httprequest.rb#255 - def body(&block); end - - # Prepares the HTTPRequest object for use as the - # source for IO.copy_stream - # - # source://webrick//lib/webrick/httprequest.rb#265 - def body_reader; end - - # The content-length header - # - # source://webrick//lib/webrick/httprequest.rb#304 - def content_length; end - - # The content-type header - # - # source://webrick//lib/webrick/httprequest.rb#311 - def content_type; end - - # Generate HTTP/1.1 100 continue response if the client expects it, - # otherwise does nothing. - # - # source://webrick//lib/webrick/httprequest.rb#245 - def continue; end - - # The parsed request cookies - # - # source://webrick//lib/webrick/httprequest.rb#95 - def cookies; end - - # Iterates over the request headers - # - # source://webrick//lib/webrick/httprequest.rb#328 - def each; end - - # Consumes any remaining body and updates keep-alive status - # - # source://webrick//lib/webrick/httprequest.rb#390 - def fixup; end - - # The parsed header of the request - # - # source://webrick//lib/webrick/httprequest.rb#90 - def header; end - - # The host this request is for - # - # source://webrick//lib/webrick/httprequest.rb#340 - def host; end - - # The HTTP version of the request - # - # source://webrick//lib/webrick/httprequest.rb#51 - def http_version; end - - # Is this a keep-alive connection? - # - # source://webrick//lib/webrick/httprequest.rb#142 - def keep_alive; end - - # Should the connection this request was made on be kept alive? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httprequest.rb#375 - def keep_alive?; end - - # This method provides the metavariables defined by the revision 3 - # of "The WWW Common Gateway Interface Version 1.1" - # To browse the current document of CGI Version 1.1, see below: - # http://tools.ietf.org/html/rfc3875 - # - # source://webrick//lib/webrick/httprequest.rb#407 - def meta_vars; end - - # Parses a request from +socket+. This is called internally by - # WEBrick::HTTPServer. - # - # source://webrick//lib/webrick/httprequest.rb#193 - def parse(socket = T.unsafe(nil)); end - - # The request path - # - # source://webrick//lib/webrick/httprequest.rb#63 - def path; end - - # The path info (CGI variable) - # - # source://webrick//lib/webrick/httprequest.rb#73 - def path_info; end - - # The path info (CGI variable) - # - # source://webrick//lib/webrick/httprequest.rb#73 - def path_info=(_arg0); end - - # The socket address of the client - # - # source://webrick//lib/webrick/httprequest.rb#132 - def peeraddr; end - - # The port this request is for - # - # source://webrick//lib/webrick/httprequest.rb#347 - def port; end - - # Request query as a Hash - # - # source://webrick//lib/webrick/httprequest.rb#294 - def query; end - - # The query from the URI of the request - # - # source://webrick//lib/webrick/httprequest.rb#78 - def query_string; end - - # The query from the URI of the request - # - # source://webrick//lib/webrick/httprequest.rb#78 - def query_string=(_arg0); end - - # The raw header of the request - # - # source://webrick//lib/webrick/httprequest.rb#85 - def raw_header; end - - # for IO.copy_stream. - # - # source://webrick//lib/webrick/httprequest.rb#278 - def readpartial(size, buf = T.unsafe(nil)); end - - # The client's IP address - # - # source://webrick//lib/webrick/httprequest.rb#361 - def remote_ip; end - - # The complete request line such as: - # - # GET / HTTP/1.1 - # - # source://webrick//lib/webrick/httprequest.rb#36 - def request_line; end - - # The request method, GET, POST, PUT, etc. - # - # source://webrick//lib/webrick/httprequest.rb#41 - def request_method; end - - # The local time this request was received - # - # source://webrick//lib/webrick/httprequest.rb#147 - def request_time; end - - # The parsed URI of the request - # - # source://webrick//lib/webrick/httprequest.rb#58 - def request_uri; end - - # The script name (CGI variable) - # - # source://webrick//lib/webrick/httprequest.rb#68 - def script_name; end - - # The script name (CGI variable) - # - # source://webrick//lib/webrick/httprequest.rb#68 - def script_name=(_arg0); end - - # The server name this request is for - # - # source://webrick//lib/webrick/httprequest.rb#354 - def server_name; end - - # Is this an SSL request? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httprequest.rb#368 - def ssl?; end - - # source://webrick//lib/webrick/httprequest.rb#379 - def to_s; end - - # The unparsed URI of the request - # - # source://webrick//lib/webrick/httprequest.rb#46 - def unparsed_uri; end - - # The remote user (CGI variable) - # - # source://webrick//lib/webrick/httprequest.rb#122 - def user; end - - # The remote user (CGI variable) - # - # source://webrick//lib/webrick/httprequest.rb#122 - def user=(_arg0); end - - private - - # source://webrick//lib/webrick/httprequest.rb#562 - def _read_data(io, method, *arg); end - - # source://webrick//lib/webrick/httprequest.rb#582 - def parse_query; end - - # source://webrick//lib/webrick/httprequest.rb#484 - def parse_uri(str, scheme = T.unsafe(nil)); end - - # source://webrick//lib/webrick/httprequest.rb#507 - def read_body(socket, block); end - - # source://webrick//lib/webrick/httprequest.rb#531 - def read_chunk_size(socket); end - - # source://webrick//lib/webrick/httprequest.rb#542 - def read_chunked(socket, block); end - - # source://webrick//lib/webrick/httprequest.rb#578 - def read_data(io, size); end - - # source://webrick//lib/webrick/httprequest.rb#471 - def read_header(socket); end - - # source://webrick//lib/webrick/httprequest.rb#574 - def read_line(io, size = T.unsafe(nil)); end - - # @raise [HTTPStatus::EOFError] - # - # source://webrick//lib/webrick/httprequest.rb#451 - def read_request_line(socket); end - - # It's said that all X-Forwarded-* headers will contain more than one - # (comma-separated) value if the original request already contained one of - # these headers. Since we could use these values as Host header, we choose - # the initial(first) value. (apr_table_mergen() adds new value after the - # existing value with ", " prefix) - # - # source://webrick//lib/webrick/httprequest.rb#610 - def setup_forwarded_info; end -end - -# same as Mongrel, Thin and Puma -# -# source://webrick//lib/webrick/httprequest.rb#449 -WEBrick::HTTPRequest::MAX_HEADER_LENGTH = T.let(T.unsafe(nil), Integer) - -# An HTTP response. This is filled in by the service or do_* methods of a -# WEBrick HTTP Servlet. -# -# source://webrick//lib/webrick/httpresponse.rb#24 -class WEBrick::HTTPResponse - # Creates a new HTTP response object. WEBrick::Config::HTTP is the - # default configuration. - # - # @return [HTTPResponse] a new instance of HTTPResponse - # - # source://webrick//lib/webrick/httpresponse.rb#112 - def initialize(config); end - - # Retrieves the response header +field+ - # - # source://webrick//lib/webrick/httpresponse.rb#150 - def [](field); end - - # Sets the response header +field+ to +value+ - # - # source://webrick//lib/webrick/httpresponse.rb#157 - def []=(field, value); end - - # Body may be: - # * a String; - # * an IO-like object that responds to +#read+ and +#readpartial+; - # * a Proc-like object that responds to +#call+. - # - # In the latter case, either #chunked= should be set to +true+, - # or header['content-length'] explicitly provided. - # Example: - # - # server.mount_proc '/' do |req, res| - # res.chunked = true - # # or - # # res.header['content-length'] = 10 - # res.body = proc { |out| out.write(Time.now.to_s) } - # end - # - # source://webrick//lib/webrick/httpresponse.rb#70 - def body; end - - # Body may be: - # * a String; - # * an IO-like object that responds to +#read+ and +#readpartial+; - # * a Proc-like object that responds to +#call+. - # - # In the latter case, either #chunked= should be set to +true+, - # or header['content-length'] explicitly provided. - # Example: - # - # server.mount_proc '/' do |req, res| - # res.chunked = true - # # or - # # res.header['content-length'] = 10 - # res.body = proc { |out| out.write(Time.now.to_s) } - # end - # - # source://webrick//lib/webrick/httpresponse.rb#70 - def body=(_arg0); end - - # Enables chunked transfer encoding. - # - # source://webrick//lib/webrick/httpresponse.rb#209 - def chunked=(val); end - - # Will this response body be returned using chunked transfer-encoding? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpresponse.rb#202 - def chunked?; end - - # Configuration for this response - # - # source://webrick//lib/webrick/httpresponse.rb#101 - def config; end - - # The content-length header - # - # source://webrick//lib/webrick/httpresponse.rb#165 - def content_length; end - - # Sets the content-length header to +len+ - # - # source://webrick//lib/webrick/httpresponse.rb#174 - def content_length=(len); end - - # The content-type header - # - # source://webrick//lib/webrick/httpresponse.rb#181 - def content_type; end - - # Sets the content-type header to +type+ - # - # source://webrick//lib/webrick/httpresponse.rb#188 - def content_type=(type); end - - # Response cookies - # - # source://webrick//lib/webrick/httpresponse.rb#46 - def cookies; end - - # Iterates over each header in the response - # - # source://webrick//lib/webrick/httpresponse.rb#195 - def each; end - - # Filename of the static file in this response. Only used by the - # FileHandler servlet. - # - # source://webrick//lib/webrick/httpresponse.rb#91 - def filename; end - - # Filename of the static file in this response. Only used by the - # FileHandler servlet. - # - # source://webrick//lib/webrick/httpresponse.rb#91 - def filename=(_arg0); end - - # Response header - # - # source://webrick//lib/webrick/httpresponse.rb#41 - def header; end - - # HTTP Response version - # - # source://webrick//lib/webrick/httpresponse.rb#31 - def http_version; end - - # Is this a keep-alive response? - # - # source://webrick//lib/webrick/httpresponse.rb#96 - def keep_alive; end - - # Is this a keep-alive response? - # - # source://webrick//lib/webrick/httpresponse.rb#96 - def keep_alive=(_arg0); end - - # Will this response's connection be kept alive? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpresponse.rb#216 - def keep_alive?; end - - # source://webrick//lib/webrick/httpresponse.rb#303 - def make_body_tempfile; end - - # Response reason phrase ("OK") - # - # source://webrick//lib/webrick/httpresponse.rb#51 - def reason_phrase; end - - # Response reason phrase ("OK") - # - # source://webrick//lib/webrick/httpresponse.rb#51 - def reason_phrase=(_arg0); end - - # source://webrick//lib/webrick/httpresponse.rb#321 - def remove_body_tempfile; end - - # Request HTTP version for this response - # - # source://webrick//lib/webrick/httpresponse.rb#85 - def request_http_version; end - - # Request HTTP version for this response - # - # source://webrick//lib/webrick/httpresponse.rb#85 - def request_http_version=(_arg0); end - - # Request method for this response - # - # source://webrick//lib/webrick/httpresponse.rb#75 - def request_method; end - - # Request method for this response - # - # source://webrick//lib/webrick/httpresponse.rb#75 - def request_method=(_arg0); end - - # Request URI for this response - # - # source://webrick//lib/webrick/httpresponse.rb#80 - def request_uri; end - - # Request URI for this response - # - # source://webrick//lib/webrick/httpresponse.rb#80 - def request_uri=(_arg0); end - - # Sends the body on +socket+ - # - # source://webrick//lib/webrick/httpresponse.rb#356 - def send_body(socket); end - - # Sends the headers on +socket+ - # - # source://webrick//lib/webrick/httpresponse.rb#333 - def send_header(socket); end - - # Sends the response on +socket+ - # - # source://webrick//lib/webrick/httpresponse.rb#223 - def send_response(socket); end - - # Bytes sent in this response - # - # source://webrick//lib/webrick/httpresponse.rb#106 - def sent_size; end - - # Creates an error page for exception +ex+ with an optional +backtrace+ - # - # source://webrick//lib/webrick/httpresponse.rb#383 - def set_error(ex, backtrace = T.unsafe(nil)); end - - # Redirects to +url+ with a WEBrick::HTTPStatus::Redirect +status+. - # - # Example: - # - # res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect - # - # source://webrick//lib/webrick/httpresponse.rb#373 - def set_redirect(status, url); end - - # Sets up the headers for sending - # - # source://webrick//lib/webrick/httpresponse.rb#240 - def setup_header; end - - # Response status code (200) - # - # source://webrick//lib/webrick/httpresponse.rb#36 - def status; end - - # Sets the response's status to the +status+ code - # - # source://webrick//lib/webrick/httpresponse.rb#142 - def status=(status); end - - # The response's HTTP status line - # - # source://webrick//lib/webrick/httpresponse.rb#135 - def status_line; end - - private - - # preserved for compatibility with some 3rd-party handlers - # - # source://webrick//lib/webrick/httpresponse.rb#557 - def _write_data(socket, data); end - - # source://webrick//lib/webrick/httpresponse.rb#410 - def check_header(header_value); end - - # :stopdoc: - # - # source://webrick//lib/webrick/httpresponse.rb#421 - def error_body(backtrace, ex, host, port); end - - # source://webrick//lib/webrick/httpresponse.rb#451 - def send_body_io(socket); end - - # source://webrick//lib/webrick/httpresponse.rb#513 - def send_body_proc(socket); end - - # source://webrick//lib/webrick/httpresponse.rb#491 - def send_body_string(socket); end -end - -# source://webrick//lib/webrick/httpresponse.rb#531 -class WEBrick::HTTPResponse::ChunkedWrapper - # @return [ChunkedWrapper] a new instance of ChunkedWrapper - # - # source://webrick//lib/webrick/httpresponse.rb#532 - def initialize(socket, resp); end - - # source://webrick//lib/webrick/httpresponse.rb#550 - def <<(*buf); end - - # source://webrick//lib/webrick/httpresponse.rb#537 - def write(buf); end -end - -# An HTTP Server -# -# source://webrick//lib/webrick/httpserver.rb#44 -class WEBrick::HTTPServer < ::WEBrick::GenericServer - # Creates a new HTTP server according to +config+ - # - # An HTTP server uses the following attributes: - # - # :AccessLog:: An array of access logs. See WEBrick::AccessLog - # :BindAddress:: Local address for the server to bind to - # :DocumentRoot:: Root path to serve files from - # :DocumentRootOptions:: Options for the default HTTPServlet::FileHandler - # :HTTPVersion:: The HTTP version of this server - # :Port:: Port to listen on - # :RequestCallback:: Called with a request and response before each - # request is serviced. - # :RequestTimeout:: Maximum time to wait between requests - # :ServerAlias:: Array of alternate names for this server for virtual - # hosting - # :ServerName:: Name for this server for virtual hosting - # - # @return [HTTPServer] a new instance of HTTPServer - # - # source://webrick//lib/webrick/httpserver.rb#46 - def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end - - # Logs +req+ and +res+ in the access logs. +config+ is used for the - # server name. - # - # source://webrick//lib/webrick/httpserver.rb#220 - def access_log(config, req, res); end - - # Creates the HTTPRequest used when handling the HTTP - # request. Can be overridden by subclasses. - # - # source://webrick//lib/webrick/httpserver.rb#230 - def create_request(with_webrick_config); end - - # Creates the HTTPResponse used when handling the HTTP - # request. Can be overridden by subclasses. - # - # source://webrick//lib/webrick/httpserver.rb#237 - def create_response(with_webrick_config); end - - # The default OPTIONS request handler says GET, HEAD, POST and OPTIONS - # requests are allowed. - # - # source://webrick//lib/webrick/httpserver.rb#147 - def do_OPTIONS(req, res); end - - # Finds the appropriate virtual host to handle +req+ - # - # source://webrick//lib/webrick/httpserver.rb#207 - def lookup_server(req); end - - # Mounts +servlet+ on +dir+ passing +options+ to the servlet at creation - # time - # - # source://webrick//lib/webrick/httpserver.rb#155 - def mount(dir, servlet, *options); end - - # Mounts +proc+ or +block+ on +dir+ and calls it with a - # WEBrick::HTTPRequest and WEBrick::HTTPResponse - # - # @raise [HTTPServerError] - # - # source://webrick//lib/webrick/httpserver.rb#164 - def mount_proc(dir, proc = T.unsafe(nil), &block); end - - # Processes requests on +sock+ - # - # source://webrick//lib/webrick/httpserver.rb#69 - def run(sock); end - - # Finds a servlet for +path+ - # - # source://webrick//lib/webrick/httpserver.rb#182 - def search_servlet(path); end - - # Services +req+ and fills in +res+ - # - # @raise [HTTPStatus::NotFound] - # - # source://webrick//lib/webrick/httpserver.rb#125 - def service(req, res); end - - # Unmounts +dir+ - # - # source://webrick//lib/webrick/httpserver.rb#173 - def umount(dir); end - - # Unmounts +dir+ - # - # source://webrick//lib/webrick/httpserver.rb#173 - def unmount(dir); end - - # Adds +server+ as a virtual host. - # - # source://webrick//lib/webrick/httpserver.rb#193 - def virtual_host(server); end -end - -# Mount table for the path a servlet is mounted on in the directory space -# of the server. Users of WEBrick can only access this indirectly via -# WEBrick::HTTPServer#mount, WEBrick::HTTPServer#unmount and -# WEBrick::HTTPServer#search_servlet -# -# source://webrick//lib/webrick/httpserver.rb#247 -class WEBrick::HTTPServer::MountTable - # @return [MountTable] a new instance of MountTable - # - # source://webrick//lib/webrick/httpserver.rb#248 - def initialize; end - - # source://webrick//lib/webrick/httpserver.rb#253 - def [](dir); end - - # source://webrick//lib/webrick/httpserver.rb#258 - def []=(dir, val); end - - # source://webrick//lib/webrick/httpserver.rb#265 - def delete(dir); end - - # source://webrick//lib/webrick/httpserver.rb#272 - def scan(path); end - - private - - # source://webrick//lib/webrick/httpserver.rb#279 - def compile; end - - # source://webrick//lib/webrick/httpserver.rb#287 - def normalize(dir); end -end - -# AbstractServlet allows HTTP server modules to be reused across multiple -# servers and allows encapsulation of functionality. -# -# By default a servlet will respond to GET, HEAD (through an alias to GET) -# and OPTIONS requests. -# -# By default a new servlet is initialized for every request. A servlet -# instance can be reused by overriding ::get_instance in the -# AbstractServlet subclass. -# -# == A Simple Servlet -# -# class Simple < WEBrick::HTTPServlet::AbstractServlet -# def do_GET request, response -# status, content_type, body = do_stuff_with request -# -# response.status = status -# response['Content-Type'] = content_type -# response.body = body -# end -# -# def do_stuff_with request -# return 200, 'text/plain', 'you got a page' -# end -# end -# -# This servlet can be mounted on a server at a given path: -# -# server.mount '/simple', Simple -# -# == Servlet Configuration -# -# Servlets can be configured via initialize. The first argument is the -# HTTP server the servlet is being initialized for. -# -# class Configurable < Simple -# def initialize server, color, size -# super server -# @color = color -# @size = size -# end -# -# def do_stuff_with request -# content = "

Hello, World!" -# -# return 200, "text/html", content -# end -# end -# -# This servlet must be provided two arguments at mount time: -# -# server.mount '/configurable', Configurable, 'red', '2em' -# -# source://webrick//lib/webrick/httpservlet/abstract.rb#76 -class WEBrick::HTTPServlet::AbstractServlet - # Initializes a new servlet for +server+ using +options+ which are - # stored as-is in +@options+. +@logger+ is also provided. - # - # @return [AbstractServlet] a new instance of AbstractServlet - # - # source://webrick//lib/webrick/httpservlet/abstract.rb#91 - def initialize(server, *options); end - - # Raises a NotFound exception - # - # @raise [HTTPStatus::NotFound] - # - # source://webrick//lib/webrick/httpservlet/abstract.rb#115 - def do_GET(req, res); end - - # Dispatches to do_GET - # - # source://webrick//lib/webrick/httpservlet/abstract.rb#122 - def do_HEAD(req, res); end - - # Returns the allowed HTTP request methods - # - # source://webrick//lib/webrick/httpservlet/abstract.rb#129 - def do_OPTIONS(req, res); end - - # Dispatches to a +do_+ method based on +req+ if such a method is - # available. (+do_GET+ for a GET request). Raises a MethodNotAllowed - # exception if the method is not implemented. - # - # source://webrick//lib/webrick/httpservlet/abstract.rb#102 - def service(req, res); end - - private - - # Redirects to a path ending in / - # - # source://webrick//lib/webrick/httpservlet/abstract.rb#140 - def redirect_to_directory_uri(req, res); end - - class << self - # Factory for servlet instances that will handle a request from +server+ - # using +options+ from the mount point. By default a new servlet - # instance is created for every call. - # - # source://webrick//lib/webrick/httpservlet/abstract.rb#83 - def get_instance(server, *options); end - end -end - -# Servlet for handling CGI scripts -# -# Example: -# -# server.mount('/cgi/my_script', WEBrick::HTTPServlet::CGIHandler, -# '/path/to/my_script') -# -# source://webrick//lib/webrick/httpservlet/cgihandler.rb#28 -class WEBrick::HTTPServlet::CGIHandler < ::WEBrick::HTTPServlet::AbstractServlet - # Creates a new CGI script servlet for the script at +name+ - # - # @return [CGIHandler] a new instance of CGIHandler - # - # source://webrick//lib/webrick/httpservlet/cgihandler.rb#36 - def initialize(server, name); end - - # :stopdoc: - # - # @raise [HTTPStatus::InternalServerError] - # - # source://webrick//lib/webrick/httpservlet/cgihandler.rb#50 - def do_GET(req, res); end - - # :stopdoc: - # - # @raise [HTTPStatus::InternalServerError] - # - # source://webrick//lib/webrick/httpservlet/cgihandler.rb#50 - def do_POST(req, res); end -end - -# source://webrick//lib/webrick/httpservlet/cgihandler.rb#31 -WEBrick::HTTPServlet::CGIHandler::CGIRunnerArray = T.let(T.unsafe(nil), Array) - -# Servlet for serving a single file. You probably want to use the -# FileHandler servlet instead as it handles directories and fancy indexes. -# -# Example: -# -# server.mount('/my_page.txt', WEBrick::HTTPServlet::DefaultFileHandler, -# '/path/to/my_page.txt') -# -# This servlet handles If-Modified-Since and Range requests. -# -# source://webrick//lib/webrick/httpservlet/filehandler.rb#32 -class WEBrick::HTTPServlet::DefaultFileHandler < ::WEBrick::HTTPServlet::AbstractServlet - # Creates a DefaultFileHandler instance for the file at +local_path+. - # - # @return [DefaultFileHandler] a new instance of DefaultFileHandler - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#37 - def initialize(server, local_path); end - - # :stopdoc: - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#44 - def do_GET(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#118 - def make_partial_content(req, res, filename, filesize); end - - # returns a lambda for webrick/httpresponse.rb send_body_proc - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#90 - def multipart_body(body, parts, boundary, mtype, filesize); end - - # @return [Boolean] - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#64 - def not_modified?(req, res, mtime, etag); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#155 - def prepare_range(range, filesize); end -end - -# ERBHandler evaluates an ERB file and returns the result. This handler -# is automatically used if there are .rhtml files in a directory served by -# the FileHandler. -# -# ERBHandler supports GET and POST methods. -# -# The ERB file is evaluated with the local variables +servlet_request+ and -# +servlet_response+ which are a WEBrick::HTTPRequest and -# WEBrick::HTTPResponse respectively. -# -# Example .rhtml file: -# -# Request to <%= servlet_request.request_uri %> -# -# Query params <%= servlet_request.query.inspect %> -# -# source://webrick//lib/webrick/httpservlet/erbhandler.rb#36 -class WEBrick::HTTPServlet::ERBHandler < ::WEBrick::HTTPServlet::AbstractServlet - # Creates a new ERBHandler on +server+ that will evaluate and serve the - # ERB file +name+ - # - # @return [ERBHandler] a new instance of ERBHandler - # - # source://webrick//lib/webrick/httpservlet/erbhandler.rb#42 - def initialize(server, name); end - - # Handles GET requests - # - # source://webrick//lib/webrick/httpservlet/erbhandler.rb#50 - def do_GET(req, res); end - - # Handles GET requests - # - # Handles POST requests - # - # source://webrick//lib/webrick/httpservlet/erbhandler.rb#50 - def do_POST(req, res); end - - private - - # Evaluates +erb+ providing +servlet_request+ and +servlet_response+ as - # local variables. - # - # source://webrick//lib/webrick/httpservlet/erbhandler.rb#79 - def evaluate(erb, servlet_request, servlet_response); end -end - -# Serves a directory including fancy indexing and a variety of other -# options. -# -# Example: -# -# server.mount('/assets', WEBrick::HTTPServlet::FileHandler, -# '/path/to/assets') -# -# source://webrick//lib/webrick/httpservlet/filehandler.rb#175 -class WEBrick::HTTPServlet::FileHandler < ::WEBrick::HTTPServlet::AbstractServlet - # Creates a FileHandler servlet on +server+ that serves files starting - # at directory +root+ - # - # +options+ may be a Hash containing keys from - # WEBrick::Config::FileHandler or +true+ or +false+. - # - # If +options+ is true or false then +:FancyIndexing+ is enabled or - # disabled respectively. - # - # @return [FileHandler] a new instance of FileHandler - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#203 - def initialize(server, root, options = T.unsafe(nil), default = T.unsafe(nil)); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#245 - def do_GET(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#257 - def do_OPTIONS(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#251 - def do_POST(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#224 - def service(req, res); end - - # :stopdoc: - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#215 - def set_filesystem_encoding(str); end - - private - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#416 - def call_callback(callback_name, req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#369 - def check_filename(req, res, name); end - - # @raise [HTTPStatus::NotFound] - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#309 - def exec_handler(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#322 - def get_handler(req, res); end - - # @return [Boolean] - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#428 - def nondisclosure_name?(name); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#286 - def prevent_directory_traversal(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#394 - def search_file(req, res, basename); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#385 - def search_index_file(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#437 - def set_dir_list(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#335 - def set_filename(req, res); end - - # source://webrick//lib/webrick/httpservlet/filehandler.rb#376 - def shift_path_info(req, res, path_info, base = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#277 - def trailing_pathsep?(path); end - - # @return [Boolean] - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#422 - def windows_ambiguous_name?(name); end - - class << self - # Allow custom handling of requests for files with +suffix+ by class - # +handler+ - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#182 - def add_handler(suffix, handler); end - - # Remove custom handling of requests for files with +suffix+ - # - # source://webrick//lib/webrick/httpservlet/filehandler.rb#189 - def remove_handler(suffix); end - end -end - -# This module is used to manager HTTP status codes. -# -# See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more -# information. -# -# source://webrick//lib/webrick/httpstatus.rb#21 -module WEBrick::HTTPStatus - private - - # Is +code+ a client error status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#170 - def client_error?(code); end - - # Is +code+ an error status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#164 - def error?(code); end - - # Is +code+ an informational status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#146 - def info?(code); end - - # Returns the description corresponding to the HTTP status +code+ - # - # WEBrick::HTTPStatus.reason_phrase 404 - # => "Not Found" - # - # source://webrick//lib/webrick/httpstatus.rb#140 - def reason_phrase(code); end - - # Is +code+ a redirection status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#158 - def redirect?(code); end - - # Is +code+ a server error status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#176 - def server_error?(code); end - - # Is +code+ a successful status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#152 - def success?(code); end - - class << self - # Returns the status class corresponding to +code+ - # - # WEBrick::HTTPStatus[302] - # => WEBrick::HTTPStatus::NotFound - # - # source://webrick//lib/webrick/httpstatus.rb#186 - def [](code); end - - # Is +code+ a client error status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#170 - def client_error?(code); end - - # Is +code+ an error status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#164 - def error?(code); end - - # Is +code+ an informational status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#146 - def info?(code); end - - # Returns the description corresponding to the HTTP status +code+ - # - # WEBrick::HTTPStatus.reason_phrase 404 - # => "Not Found" - # - # source://webrick//lib/webrick/httpstatus.rb#140 - def reason_phrase(code); end - - # Is +code+ a redirection status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#158 - def redirect?(code); end - - # Is +code+ a server error status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#176 - def server_error?(code); end - - # Is +code+ a successful status? - # - # @return [Boolean] - # - # source://webrick//lib/webrick/httpstatus.rb#152 - def success?(code); end - end -end - -# Root of the HTTP status class hierarchy -# -# source://webrick//lib/webrick/httpstatus.rb#25 -class WEBrick::HTTPStatus::Status < ::StandardError - # Returns the HTTP status code - # - # source://webrick//lib/webrick/httpstatus.rb#31 - def code; end - - # Returns the HTTP status description - # - # source://webrick//lib/webrick/httpstatus.rb#34 - def reason_phrase; end - - # Returns the HTTP status code - # - # source://webrick//lib/webrick/httpstatus.rb#31 - def to_i; end - - class << self - # source://webrick//lib/webrick/httpstatus.rb#27 - def code; end - - # source://webrick//lib/webrick/httpstatus.rb#27 - def reason_phrase; end - end -end - -# HTTPUtils provides utility methods for working with the HTTP protocol. -# -# This module is generally used internally by WEBrick -# -# source://webrick//lib/webrick/httputils.rb#25 -module WEBrick::HTTPUtils - private - - # source://webrick//lib/webrick/httputils.rb#443 - def _escape(str, regex); end - - # :stopdoc: - # - # source://webrick//lib/webrick/httputils.rb#441 - def _make_regex(str); end - - # source://webrick//lib/webrick/httputils.rb#442 - def _make_regex!(str); end - - # source://webrick//lib/webrick/httputils.rb#449 - def _unescape(str, regex); end - - # Removes quotes and escapes from +str+ - # - # source://webrick//lib/webrick/httputils.rb#223 - def dequote(str); end - - # Escapes HTTP reserved and unwise characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#467 - def escape(str); end - - # Escapes 8 bit characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#508 - def escape8bit(str); end - - # Escapes form reserved characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#481 - def escape_form(str); end - - # Escapes path +str+ - # - # source://webrick//lib/webrick/httputils.rb#497 - def escape_path(str); end - - # Loads Apache-compatible mime.types in +file+. - # - # source://webrick//lib/webrick/httputils.rb#112 - def load_mime_types(file); end - - # Returns the mime type of +filename+ from the list in +mime_tab+. If no - # mime type was found application/octet-stream is returned. - # - # source://webrick//lib/webrick/httputils.rb#134 - def mime_type(filename, mime_tab); end - - # Normalizes a request path. Raises an exception if the path cannot be - # normalized. - # - # source://webrick//lib/webrick/httputils.rb#31 - def normalize_path(path); end - - # Parses form data in +io+ with the given +boundary+ - # - # source://webrick//lib/webrick/httputils.rb#395 - def parse_form_data(io, boundary); end - - # Parses an HTTP header +raw+ into a hash of header fields with an Array - # of values. - # - # source://webrick//lib/webrick/httputils.rb#145 - def parse_header(raw); end - - # Parses the query component of a URI in +str+ - # - # source://webrick//lib/webrick/httputils.rb#371 - def parse_query(str); end - - # Parses q values in +value+ as used in Accept headers. - # - # source://webrick//lib/webrick/httputils.rb#202 - def parse_qvalues(value); end - - # Parses a Range header value +ranges_specifier+ - # - # source://webrick//lib/webrick/httputils.rb#184 - def parse_range_header(ranges_specifier); end - - # Quotes and escapes quotes in +str+ - # - # source://webrick//lib/webrick/httputils.rb#233 - def quote(str); end - - # Splits a header value +str+ according to HTTP specification. - # - # source://webrick//lib/webrick/httputils.rb#175 - def split_header_value(str); end - - # Unescapes HTTP reserved and unwise characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#474 - def unescape(str); end - - # Unescapes form reserved characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#490 - def unescape_form(str); end - - class << self - # source://webrick//lib/webrick/httputils.rb#443 - def _escape(str, regex); end - - # :stopdoc: - # - # source://webrick//lib/webrick/httputils.rb#441 - def _make_regex(str); end - - # source://webrick//lib/webrick/httputils.rb#442 - def _make_regex!(str); end - - # source://webrick//lib/webrick/httputils.rb#449 - def _unescape(str, regex); end - - # Removes quotes and escapes from +str+ - # - # source://webrick//lib/webrick/httputils.rb#223 - def dequote(str); end - - # Escapes HTTP reserved and unwise characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#467 - def escape(str); end - - # Escapes 8 bit characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#508 - def escape8bit(str); end - - # Escapes form reserved characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#481 - def escape_form(str); end - - # Escapes path +str+ - # - # source://webrick//lib/webrick/httputils.rb#497 - def escape_path(str); end - - # Loads Apache-compatible mime.types in +file+. - # - # source://webrick//lib/webrick/httputils.rb#112 - def load_mime_types(file); end - - # Returns the mime type of +filename+ from the list in +mime_tab+. If no - # mime type was found application/octet-stream is returned. - # - # source://webrick//lib/webrick/httputils.rb#134 - def mime_type(filename, mime_tab); end - - # Normalizes a request path. Raises an exception if the path cannot be - # normalized. - # - # source://webrick//lib/webrick/httputils.rb#31 - def normalize_path(path); end - - # Parses form data in +io+ with the given +boundary+ - # - # source://webrick//lib/webrick/httputils.rb#395 - def parse_form_data(io, boundary); end - - # Parses an HTTP header +raw+ into a hash of header fields with an Array - # of values. - # - # source://webrick//lib/webrick/httputils.rb#145 - def parse_header(raw); end - - # Parses the query component of a URI in +str+ - # - # source://webrick//lib/webrick/httputils.rb#371 - def parse_query(str); end - - # Parses q values in +value+ as used in Accept headers. - # - # source://webrick//lib/webrick/httputils.rb#202 - def parse_qvalues(value); end - - # Parses a Range header value +ranges_specifier+ - # - # source://webrick//lib/webrick/httputils.rb#184 - def parse_range_header(ranges_specifier); end - - # Quotes and escapes quotes in +str+ - # - # source://webrick//lib/webrick/httputils.rb#233 - def quote(str); end - - # Splits a header value +str+ according to HTTP specification. - # - # source://webrick//lib/webrick/httputils.rb#175 - def split_header_value(str); end - - # Unescapes HTTP reserved and unwise characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#474 - def unescape(str); end - - # Unescapes form reserved characters in +str+ - # - # source://webrick//lib/webrick/httputils.rb#490 - def unescape_form(str); end - end -end - -# Stores multipart form data. FormData objects are created when -# WEBrick::HTTPUtils.parse_form_data is called. -# -# source://webrick//lib/webrick/httputils.rb#242 -class WEBrick::HTTPUtils::FormData < ::String - # Creates a new FormData object. - # - # +args+ is an Array of form data entries. One FormData will be created - # for each entry. - # - # This is called by WEBrick::HTTPUtils.parse_form_data for you - # - # @return [FormData] a new instance of FormData - # - # source://webrick//lib/webrick/httputils.rb#267 - def initialize(*args); end - - # Adds +str+ to this FormData which may be the body, a header or a - # header entry. - # - # This is called by WEBrick::HTTPUtils.parse_form_data for you - # - # source://webrick//lib/webrick/httputils.rb#300 - def <<(str); end - - # Retrieves the header at the first entry in +key+ - # - # source://webrick//lib/webrick/httputils.rb#286 - def [](*key); end - - # Adds +data+ at the end of the chain of entries - # - # This is called by WEBrick::HTTPUtils.parse_form_data for you. - # - # source://webrick//lib/webrick/httputils.rb#320 - def append_data(data); end - - # Yields each entry in this FormData - # - # source://webrick//lib/webrick/httputils.rb#335 - def each_data; end - - # The filename of the form data part - # - # source://webrick//lib/webrick/httputils.rb#254 - def filename; end - - # The filename of the form data part - # - # source://webrick//lib/webrick/httputils.rb#254 - def filename=(_arg0); end - - # Returns all the FormData as an Array - # - # source://webrick//lib/webrick/httputils.rb#347 - def list; end - - # The name of the form data part - # - # source://webrick//lib/webrick/httputils.rb#249 - def name; end - - # The name of the form data part - # - # source://webrick//lib/webrick/httputils.rb#249 - def name=(_arg0); end - - # source://webrick//lib/webrick/httputils.rb#256 - def next_data=(_arg0); end - - # Returns all the FormData as an Array - # - # A FormData will behave like an Array - # - # source://webrick//lib/webrick/httputils.rb#347 - def to_ary; end - - # This FormData's body - # - # source://webrick//lib/webrick/httputils.rb#363 - def to_s; end - - protected - - # source://webrick//lib/webrick/httputils.rb#256 - def next_data; end -end - -# source://webrick//lib/webrick/utils.rb#17 -module WEBrick::Utils - private - - # Creates TCP server sockets bound to +address+:+port+ and returns them. - # - # It will create IPV4 and IPV6 sockets on all interfaces. - # - # source://webrick//lib/webrick/utils.rb#56 - def create_listeners(address, port); end - - # The server hostname - # - # source://webrick//lib/webrick/utils.rb#47 - def getservername; end - - # Generates a random string of length +len+ - # - # source://webrick//lib/webrick/utils.rb#79 - def random_string(len); end - - # Sets the close on exec flag for +io+ - # - # source://webrick//lib/webrick/utils.rb#27 - def set_close_on_exec(io); end - - # Sets IO operations on +io+ to be non-blocking - # - # source://webrick//lib/webrick/utils.rb#20 - def set_non_blocking(io); end - - # Changes the process's uid and gid to the ones of +user+ - # - # source://webrick//lib/webrick/utils.rb#34 - def su(user); end - - # Executes the passed block and raises +exception+ if execution takes more - # than +seconds+. - # - # If +seconds+ is zero or nil, simply executes the block - # - # source://webrick//lib/webrick/utils.rb#253 - def timeout(seconds, exception = T.unsafe(nil)); end - - class << self - # Creates TCP server sockets bound to +address+:+port+ and returns them. - # - # It will create IPV4 and IPV6 sockets on all interfaces. - # - # source://webrick//lib/webrick/utils.rb#56 - def create_listeners(address, port); end - - # The server hostname - # - # source://webrick//lib/webrick/utils.rb#47 - def getservername; end - - # Generates a random string of length +len+ - # - # source://webrick//lib/webrick/utils.rb#79 - def random_string(len); end - - # Sets the close on exec flag for +io+ - # - # source://webrick//lib/webrick/utils.rb#27 - def set_close_on_exec(io); end - - # Sets IO operations on +io+ to be non-blocking - # - # source://webrick//lib/webrick/utils.rb#20 - def set_non_blocking(io); end - - # Changes the process's uid and gid to the ones of +user+ - # - # source://webrick//lib/webrick/utils.rb#34 - def su(user); end - - # Executes the passed block and raises +exception+ if execution takes more - # than +seconds+. - # - # If +seconds+ is zero or nil, simply executes the block - # - # source://webrick//lib/webrick/utils.rb#253 - def timeout(seconds, exception = T.unsafe(nil)); end - end -end - -# Class used to manage timeout handlers across multiple threads. -# -# Timeout handlers should be managed by using the class methods which are -# synchronized. -# -# id = TimeoutHandler.register(10, Timeout::Error) -# begin -# sleep 20 -# puts 'foo' -# ensure -# TimeoutHandler.cancel(id) -# end -# -# will raise Timeout::Error -# -# id = TimeoutHandler.register(10, Timeout::Error) -# begin -# sleep 5 -# puts 'foo' -# ensure -# TimeoutHandler.cancel(id) -# end -# -# will print 'foo' -# -# source://webrick//lib/webrick/utils.rb#118 -class WEBrick::Utils::TimeoutHandler - include ::Singleton - extend ::Singleton::SingletonClassMethods - - # Creates a new TimeoutHandler. You should use ::register and ::cancel - # instead of creating the timeout handler directly. - # - # @return [TimeoutHandler] a new instance of TimeoutHandler - # - # source://webrick//lib/webrick/utils.rb#148 - def initialize; end - - # Cancels the timeout handler +id+ - # - # source://webrick//lib/webrick/utils.rb#226 - def cancel(thread, id); end - - # Interrupts the timeout handler +id+ and raises +exception+ - # - # source://webrick//lib/webrick/utils.rb#203 - def interrupt(thread, id, exception); end - - # Registers a new timeout handler - # - # +time+:: Timeout in seconds - # +exception+:: Exception to raise when timeout elapsed - # - # source://webrick//lib/webrick/utils.rb#214 - def register(thread, time, exception); end - - # source://webrick//lib/webrick/utils.rb#240 - def terminate; end - - private - - # source://webrick//lib/webrick/utils.rb#158 - def watch; end - - # source://webrick//lib/webrick/utils.rb#193 - def watcher; end - - class << self - # Cancels the timeout handler +id+ - # - # source://webrick//lib/webrick/utils.rb#137 - def cancel(id); end - - # Registers a new timeout handler - # - # +time+:: Timeout in seconds - # +exception+:: Exception to raise when timeout elapsed - # - # source://webrick//lib/webrick/utils.rb#130 - def register(seconds, exception); end - - # source://webrick//lib/webrick/utils.rb#141 - def terminate; end - end -end diff --git a/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi similarity index 73% rename from sorbet/rbi/gems/yard-sorbet@0.7.0.rbi rename to sorbet/rbi/gems/yard-sorbet@0.8.1.rbi index d4a41c0..c68d72b 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi @@ -83,7 +83,7 @@ class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base private - # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#30 + # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#28 sig { returns(::YARD::CodeObjects::NamespaceObject) } def included_in; end end @@ -100,7 +100,7 @@ class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby: class << self # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#18 - sig { params(code_obj: ::String).returns(T.nilable(::String)) } + sig { params(code_obj: ::String).returns(T.nilable(T::Array[::String])) } def mixed_in_class_methods(code_obj); end end end @@ -112,35 +112,59 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base # Swap the method definition docstring and the sig docstring. # Parse relevant parts of the `sig` and include them as well. # - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#20 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#24 sig { void } def process; end private - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#52 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73 + sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void } + def document_attr_methods(method_objects); end + + # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr* + # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr* + # declarations. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#60 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) } + def merged_into_attr?(attr_node); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#78 sig do params( - method_node: ::YARD::Parser::Ruby::AstNode, - node: ::YARD::Parser::Ruby::AstNode, - docstring: ::YARD::Docstring + attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode), + docstring: T.nilable(::String), + include_params: T::Boolean ).void end - def parse_params(method_node, node, docstring); end + def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#99 + sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } + def parse_params(node, docstring); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#64 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#109 sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } def parse_return(node, docstring); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#32 - sig { params(method_node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } - def parse_sig(method_node, docstring); end + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#87 + sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void } + def parse_sig(docstring, include_params: T.unsafe(nil)); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#50 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).void } + def process_attr(attr_node); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#36 + sig { params(def_node: ::YARD::Parser::Ruby::MethodDefinitionNode).void } + def process_def(def_node); end end -# These node types attached to sigs represent attr_* declarations +# YARD types that can have docstrings attached to them # # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#14 -YARDSorbet::Handlers::SigHandler::ATTR_NODE_TYPES = T.let(T.unsafe(nil), Array) +YARDSorbet::Handlers::SigHandler::Documentable = T.type_alias { T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } # Class-level handler that folds all `const` and `prop` declarations into the constructor documentation # this needs to be injected as a module otherwise the default Class handler will overwrite documentation @@ -194,26 +218,31 @@ class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void } def decorate_object(object, prop); end - # Get the default prop value - # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#39 - sig { returns(T.nilable(::String)) } - def default_value; end + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#38 + sig { returns(T::Boolean) } + def immutable?; end # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#44 + sig { params(kwd: ::String).returns(T.nilable(::String)) } + def kw_arg(kwd); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#49 sig { params(name: ::String).returns(::YARDSorbet::TStructProp) } def make_prop(name); end + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 + sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) } + def params; end + # Register the field explicitly as an attribute. - # While `const` attributes are immutable, `prop` attributes may be reassigned. # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#57 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#66 sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void } def register_attrs(object, name); end # Store the prop for use in the constructor definition # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#65 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#74 sig { params(prop: ::YARDSorbet::TStructProp).void } def update_state(prop); end end @@ -228,7 +257,7 @@ module YARDSorbet::NodeUtils # @note This will skip over some node types. # @yield [YARD::Parser::Ruby::AstNode] # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#22 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#21 sig do params( node: ::YARD::Parser::Ruby::AstNode, @@ -237,9 +266,13 @@ module YARDSorbet::NodeUtils end def bfs_traverse(node, &_blk); end + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#32 + sig { params(node: ::YARD::Parser::Ruby::AstNode).void } + def delete_node(node); end + # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#34 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#38 sig do params( node: ::YARD::Parser::Ruby::AstNode @@ -251,9 +284,19 @@ module YARDSorbet::NodeUtils # # @raise [IndexError] if the node does not have an adjacent sibling (ascending) # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#48 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#45 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) } def sibling_node(node); end + + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#52 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } + def sigable_node?(node); end + + # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#63 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } + def validated_attribute_names(attr_node); end end end @@ -279,65 +322,54 @@ module YARDSorbet::SigToYARD class << self # @see https://yardoc.org/types.html # - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#21 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#23 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert(node); end private - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#54 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#61 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) } def build_generic_type(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#63 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#70 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_aref(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#75 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#82 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_array(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#83 - sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } - def convert_call(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#88 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#90 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_collection(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#95 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#97 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_hash(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#103 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#105 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_list(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#27 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#31 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_node(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#36 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#43 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_node_type(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#108 - sig { params(node_source: ::String).returns([::String]) } - def convert_ref(node_source); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#113 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#110 sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } def convert_t_method(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#125 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#121 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_unknown(node); end end end -# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#9 -YARDSorbet::SigToYARD::REF_TYPES = T.let(T.unsafe(nil), Hash) - # Used to store the details of a `T::Struct` `prop` definition # # source://yard-sorbet//lib/yard-sorbet/t_struct_prop.rb#6 @@ -349,7 +381,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.10439/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 def inherited(s); end end end @@ -359,7 +391,7 @@ end # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#6 module YARDSorbet::TagUtils class << self - # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#13 + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#16 sig do params( docstring: ::YARD::Docstring, @@ -371,7 +403,7 @@ module YARDSorbet::TagUtils # Create or update a `YARD` tag with type information # - # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#27 + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#30 sig do params( docstring: ::YARD::Docstring, @@ -385,6 +417,11 @@ module YARDSorbet::TagUtils end end +# The `void` return type, as a constant to reduce array allocations +# +# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#10 +YARDSorbet::TagUtils::VOID_RETURN_TYPE = T.let(T.unsafe(nil), Array) + # {https://rubygems.org/gems/yard-sorbet Version history} # # source://yard-sorbet//lib/yard-sorbet/version.rb#7 diff --git a/sorbet/rbi/gems/yard@0.9.28.rbi b/sorbet/rbi/gems/yard@0.9.34.rbi similarity index 94% rename from sorbet/rbi/gems/yard@0.9.28.rbi rename to sorbet/rbi/gems/yard@0.9.34.rbi index 97ae074..fbb05f8 100644 --- a/sorbet/rbi/gems/yard@0.9.28.rbi +++ b/sorbet/rbi/gems/yard@0.9.34.rbi @@ -4,6 +4,12 @@ # This is an autogenerated file for types exported from the `yard` gem. # Please instead update this file by running `bin/tapioca gem yard`. +# source://yard//lib/yard.rb#61 +::RUBY18 = T.let(T.unsafe(nil), FalseClass) + +# source://yard//lib/yard.rb#62 +::RUBY19 = T.let(T.unsafe(nil), TrueClass) + # source://yard//lib/yard/core_ext/array.rb#2 class Array include ::Enumerable @@ -76,10 +82,6 @@ File::RELATIVE_PARENTDIR = T.let(T.unsafe(nil), String) # source://yard//lib/yard/core_ext/file.rb#6 File::RELATIVE_SAMEDIR = T.let(T.unsafe(nil), String) -class File::Stat - include ::Comparable -end - # :stopdoc: # # source://yard//lib/yard/rubygems/backports/gem.rb#2 @@ -98,56 +100,6 @@ end # source://yard//lib/yard/rubygems/backports/source_index.rb#363 Gem::Cache = Gem::SourceIndex -Gem::ConfigMap = T.let(T.unsafe(nil), Hash) - -module Gem::DefaultUserInteraction - include ::Gem::Text -end - -Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES = T.let(T.unsafe(nil), TrueClass) - -class Gem::List - include ::Enumerable -end - -Gem::RbConfigPriorities = T.let(T.unsafe(nil), Array) - -class Gem::RequestSet - include ::Gem::TSort -end - -class Gem::Resolver - include ::Gem::Resolver::Molinillo::UI - include ::Gem::Resolver::Molinillo::SpecificationProvider -end - -class Gem::Resolver::CurrentSet < ::Gem::Resolver::Set - def find_all(req); end -end - -class Gem::Resolver::LocalSpecification < ::Gem::Resolver::SpecSpecification - def installable_platform?; end - def local?; end - def pretty_print(q); end -end - -class Gem::Resolver::RequirementList - include ::Enumerable -end - -Gem::RubyGemsVersion = T.let(T.unsafe(nil), String) - -class Gem::RuntimeRequirementNotMetError < ::Gem::InstallError - def message; end - def suggestion; end - def suggestion=(_arg0); end -end - -class Gem::Source - include ::Comparable - include ::Gem::Text -end - # The SourceIndex object indexes all the gems available from a # particular source (e.g. a list of gem directories, or a remote # source). A SourceIndex maps a gem full name to a gem @@ -330,138 +282,6 @@ class Gem::SourceIndex end end -class Gem::Specification < ::Gem::BasicSpecification - include ::Gem::Specification::YamlBackfiller - include ::Bundler::GemHelpers - include ::Bundler::MatchPlatform - extend ::Gem::Deprecate - extend ::Enumerable -end - -Gem::Specification::LATEST_RUBY_WITHOUT_PATCH_VERSIONS = T.let(T.unsafe(nil), Gem::Version) -Gem::Specification::REMOVED_METHODS = T.let(T.unsafe(nil), Array) - -module Gem::Specification::YamlBackfiller - def to_yaml(opts = T.unsafe(nil)); end -end - -class Gem::StreamUI - extend ::Gem::Deprecate -end - -class Gem::StreamUI::SilentDownloadReporter - def initialize(out_stream, *args); end - - def done; end - def fetch(filename, filesize); end - def update(current); end -end - -class Gem::StreamUI::SilentProgressReporter - def initialize(out_stream, size, initial_message, terminal_message = T.unsafe(nil)); end - - def count; end - def done; end - def updated(message); end -end - -class Gem::StreamUI::SimpleProgressReporter - include ::Gem::Text - include ::Gem::DefaultUserInteraction - - def initialize(out_stream, size, initial_message, terminal_message = T.unsafe(nil)); end - - def count; end - def done; end - def updated(message); end -end - -class Gem::StreamUI::ThreadedDownloadReporter - def initialize(out_stream, *args); end - - def done; end - def fetch(file_name, *args); end - def file_name; end - def update(bytes); end - - private - - def locked_puts(message); end -end - -Gem::StreamUI::ThreadedDownloadReporter::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) - -class Gem::StreamUI::VerboseProgressReporter - include ::Gem::Text - include ::Gem::DefaultUserInteraction - - def initialize(out_stream, size, initial_message, terminal_message = T.unsafe(nil)); end - - def count; end - def done; end - def updated(message); end -end - -module Gem::TSort - def each_strongly_connected_component(&block); end - def each_strongly_connected_component_from(node, id_map = T.unsafe(nil), stack = T.unsafe(nil), &block); end - def strongly_connected_components; end - def tsort; end - def tsort_each(&block); end - def tsort_each_child(node); end - def tsort_each_node; end - - class << self - def each_strongly_connected_component(each_node, each_child); end - def each_strongly_connected_component_from(node, each_child, id_map = T.unsafe(nil), stack = T.unsafe(nil)); end - def strongly_connected_components(each_node, each_child); end - def tsort(each_node, each_child); end - def tsort_each(each_node, each_child); end - end -end - -class Gem::TSort::Cyclic < ::StandardError; end -Gem::UNTAINT = T.let(T.unsafe(nil), Proc) - -class Gem::UninstallError < ::Gem::Exception - def spec; end - def spec=(_arg0); end -end - -class Gem::UnknownCommandError < ::Gem::Exception - def initialize(unknown_command); end - - def unknown_command; end - - class << self - def attach_correctable; end - end -end - -class Gem::UnknownCommandSpellChecker - def initialize(error); end - - def corrections; end - def error; end - - private - - def spell_checker; end -end - -Gem::UnsatisfiableDepedencyError = Gem::UnsatisfiableDependencyError - -module Gem::UserInteraction - include ::Gem::Text - include ::Gem::DefaultUserInteraction -end - -class Gem::Version - include ::Comparable -end - -Gem::Version::Requirement = Gem::Requirement - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#17 class IRB::SLex # @return [SLex] a new instance of SLex @@ -643,6 +463,26 @@ class Module def class_name; end end +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://yard//lib/yard/globals.rb#8 + def P(namespace, name = T.unsafe(nil), type = T.unsafe(nil)); end + + # source://yard//lib/yard/globals.rb#20 + def log; end +end + +# Keep track of Ruby version for compatibility code +# +# @deprecated Use {YARD.ruby18?} or {YARD.ruby19?} instead. +# +# source://yard//lib/yard.rb#61 +RUBY18 = T.let(T.unsafe(nil), FalseClass) + # source://yard//lib/yard.rb#62 RUBY19 = T.let(T.unsafe(nil), TrueClass) @@ -663,7 +503,7 @@ end # A subclass of Hash where all keys are converted into Symbols, and # optionally, all String values are converted into Symbols. # -# source://yard//lib/yard/core_ext/symbol_hash.rb#8 +# source://yard//lib/yard/core_ext/symbol_hash.rb#4 class SymbolHash < ::Hash # Creates a new SymbolHash object # @@ -750,31 +590,6 @@ class SymbolHash < ::Hash end end -# @private -# -# source://yard//lib/yard/server/webrick_adapter.rb#42 -class WEBrick::HTTPRequest - # Returns the value of attribute version_supplied. - # - # source://yard//lib/yard/server/webrick_adapter.rb#43 - def version_supplied; end - - # Sets the attribute version_supplied - # - # @param value the value to set the attribute version_supplied to. - # - # source://yard//lib/yard/server/webrick_adapter.rb#43 - def version_supplied=(_arg0); end - - # @return [Boolean] - # - # source://yard//lib/yard/server/webrick_adapter.rb#44 - def xhr?; end -end - -# source://webrick/1.7.0/lib/webrick/httprequest.rb#449 -WEBrick::HTTPRequest::MAX_HEADER_LENGTH = T.let(T.unsafe(nil), Integer) - # Gem::YARDoc provides methods to generate YARDoc and yri data for installed gems # upon gem installation. # @@ -993,7 +808,7 @@ end # # @since 0.6.2 # -# source://yard//lib/yard/cli/config.rb#7 +# source://yard//lib/yard/cli/config.rb#6 class YARD::CLI::Config < ::YARD::CLI::Command # @return [Config] a new instance of Config # @since 0.6.2 @@ -1314,7 +1129,7 @@ end # @see Graph#run # @since 0.6.0 # -# source://yard//lib/yard/cli/graph.rb#27 +# source://yard//lib/yard/cli/graph.rb#24 class YARD::CLI::Graph < ::YARD::CLI::YardoptsCommand # Creates a new instance of the command-line utility # @@ -1374,7 +1189,7 @@ end # Options to pass to the {Graph} CLI. # -# source://yard//lib/yard/cli/graph.rb#6 +# source://yard//lib/yard/cli/graph.rb#5 class YARD::CLI::GraphOptions < ::YARD::Templates::TemplateOptions # @return [String] any contents to pass to the digraph # @@ -1514,7 +1329,7 @@ end # # @since 0.6.0 # -# source://yard//lib/yard/cli/server.rb#8 +# source://yard//lib/yard/cli/server.rb#7 class YARD::CLI::Server < ::YARD::CLI::Command # Creates a new instance of the Server command line utility # @@ -1817,7 +1632,7 @@ YARD::CLI::Stats::STATS_ORDER = T.let(T.unsafe(nil), Array) # A tool to view documentation in the console like `ri` # -# source://yard//lib/yard/cli/yri.rb#9 +# source://yard//lib/yard/cli/yri.rb#7 class YARD::CLI::YRI < ::YARD::CLI::Command # @return [YRI] a new instance of YRI # @@ -1947,7 +1762,7 @@ YARD::CLI::YRI::DEFAULT_SEARCH_PATHS = T.let(T.unsafe(nil), Array) # source://yard//lib/yard/cli/yri.rb#15 YARD::CLI::YRI::SEARCH_PATHS_FILE = T.let(T.unsafe(nil), String) -# source://yard//lib/yard/cli/yardoc.rb#147 +# source://yard//lib/yard/cli/yardoc.rb#145 class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand # Creates a new instance of the commandline utility # @@ -2284,7 +2099,7 @@ class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand # Generates output for objects # - # @param checksums [Hash, nil] if supplied, a list of checkums for files. + # @param checksums [Hash, nil] if supplied, a list of checksums for files. # @return [void] # @since 0.5.1 # @@ -2320,7 +2135,7 @@ end # Default options used in +yard doc+ command. # -# source://yard//lib/yard/cli/yardoc.rb#10 +# source://yard//lib/yard/cli/yardoc.rb#8 class YARD::CLI::YardocOptions < ::YARD::Templates::TemplateOptions # @return [CodeObjects::ExtraFileObject] the file object being rendered. # The +object+ key is not used so that a file may be rendered in the context @@ -2448,7 +2263,7 @@ end # @abstract # @since 0.8.3 # -# source://yard//lib/yard/cli/yardopts_command.rb#11 +# source://yard//lib/yard/cli/yardopts_command.rb#10 class YARD::CLI::YardoptsCommand < ::YARD::CLI::Command # Creates a new command that reads .yardopts # @@ -2705,7 +2520,7 @@ class YARD::CodeObjects::Base # @see Docstring#add_tag # @since 0.8.4 # - # source://yard//lib/yard/code_objects/base.rb#557 + # source://yard//lib/yard/code_objects/base.rb#560 def add_tag(*tags); end # The non-localized documentation string associated with the object @@ -2814,7 +2629,7 @@ class YARD::CodeObjects::Base # @return [String] the rendered template # @see Templates::Engine#render # - # source://yard//lib/yard/code_objects/base.rb#501 + # source://yard//lib/yard/code_objects/base.rb#504 def format(options = T.unsafe(nil)); end # @return [String] the group this object is associated with @@ -2834,7 +2649,7 @@ class YARD::CodeObjects::Base # @return [Boolean] # @see Docstring#has_tag? # - # source://yard//lib/yard/code_objects/base.rb#552 + # source://yard//lib/yard/code_objects/base.rb#555 def has_tag?(name); end # @return [Integer] the object's hash value (for equality checking) @@ -2846,7 +2661,7 @@ class YARD::CodeObjects::Base # # @return [String] a string describing the object # - # source://yard//lib/yard/code_objects/base.rb#509 + # source://yard//lib/yard/code_objects/base.rb#512 def inspect; end # Returns the line the object was first parsed at (or nil) @@ -2888,7 +2703,7 @@ class YARD::CodeObjects::Base # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. # - # source://yard//lib/yard/code_objects/base.rb#518 + # source://yard//lib/yard/code_objects/base.rb#521 def namespace=(obj); end # The namespace the object is defined in. If the object is in the @@ -2905,7 +2720,7 @@ class YARD::CodeObjects::Base # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. # - # source://yard//lib/yard/code_objects/base.rb#518 + # source://yard//lib/yard/code_objects/base.rb#521 def parent=(obj); end # Represents the unique path of the object. The default implementation @@ -2918,19 +2733,19 @@ class YARD::CodeObjects::Base # @return [String] the unique path of the object # @see #sep # - # source://yard//lib/yard/code_objects/base.rb#449 + # source://yard//lib/yard/code_objects/base.rb#452 def path; end # @param other [Base, String] another code object (or object path) # @return [String] the shortest relative path from this object to +other+ # @since 0.5.3 # - # source://yard//lib/yard/code_objects/base.rb#471 + # source://yard//lib/yard/code_objects/base.rb#474 def relative_path(other); end # @return [Boolean] whether or not this object is a RootObject # - # source://yard//lib/yard/code_objects/base.rb#563 + # source://yard//lib/yard/code_objects/base.rb#566 def root?; end # Override this method with a custom component separator. For instance, @@ -2941,7 +2756,7 @@ class YARD::CodeObjects::Base # @return [String] the component that separates the namespace path # and the name (default is {NSEP}) # - # source://yard//lib/yard/code_objects/base.rb#572 + # source://yard//lib/yard/code_objects/base.rb#575 def sep; end # The one line signature representing an object. For a method, this will @@ -2997,14 +2812,14 @@ class YARD::CodeObjects::Base # # @see Docstring#tag # - # source://yard//lib/yard/code_objects/base.rb#544 + # source://yard//lib/yard/code_objects/base.rb#547 def tag(name); end # Gets a list of tags from the {#docstring} # # @see Docstring#tags # - # source://yard//lib/yard/code_objects/base.rb#548 + # source://yard//lib/yard/code_objects/base.rb#551 def tags(name = T.unsafe(nil)); end # @note Override this method if your object has a special title that does @@ -3013,7 +2828,7 @@ class YARD::CodeObjects::Base # @return [String] the display title for an object # @see 0.8.4 # - # source://yard//lib/yard/code_objects/base.rb#464 + # source://yard//lib/yard/code_objects/base.rb#467 def title; end # @return [nil] this object does not turn into an array @@ -3031,7 +2846,7 @@ class YARD::CodeObjects::Base # @return [String] the unique path of the object # @see #sep # - # source://yard//lib/yard/code_objects/base.rb#449 + # source://yard//lib/yard/code_objects/base.rb#452 def to_s; end # Default type is the lowercase class name without the "Object" suffix. @@ -3062,7 +2877,7 @@ class YARD::CodeObjects::Base # @see #copy_to # @since 0.8.0 # - # source://yard//lib/yard/code_objects/base.rb#583 + # source://yard//lib/yard/code_objects/base.rb#586 def copyable_attributes; end private @@ -3072,10 +2887,10 @@ class YARD::CodeObjects::Base # @param source [String] the source code to format # @return [String] formatted source # - # source://yard//lib/yard/code_objects/base.rb#595 + # source://yard//lib/yard/code_objects/base.rb#598 def format_source(source); end - # source://yard//lib/yard/code_objects/base.rb#602 + # source://yard//lib/yard/code_objects/base.rb#605 def translate_docstring(locale); end class << self @@ -3122,7 +2937,7 @@ YARD::CodeObjects::CSEPQ = T.let(T.unsafe(nil), String) # A ClassObject represents a Ruby class in source code. It is a {ModuleObject} # with extra inheritance semantics through the superclass. # -# source://yard//lib/yard/code_objects/class_object.rb#9 +# source://yard//lib/yard/code_objects/class_object.rb#7 class YARD::CodeObjects::ClassObject < ::YARD::CodeObjects::NamespaceObject # Creates a new class object in +namespace+ with +name+ # @@ -3203,7 +3018,7 @@ end # Represents a class variable inside a namespace. The path is expressed # in the form "A::B::@@classvariable" # -# source://yard//lib/yard/code_objects/class_variable_object.rb#8 +# source://yard//lib/yard/code_objects/class_variable_object.rb#7 class YARD::CodeObjects::ClassVariableObject < ::YARD::CodeObjects::Base # @return [String] the class variable's value # @@ -3219,7 +3034,7 @@ end # A list of code objects. This array acts like a set (no unique items) # but also disallows any {Proxy} objects from being added. # -# source://yard//lib/yard/code_objects/base.rb#10 +# source://yard//lib/yard/code_objects/base.rb#6 class YARD::CodeObjects::CodeObjectList < ::Array # Creates a new object list associated with a namespace # @@ -3249,7 +3064,7 @@ end # A +ConstantObject+ represents a Ruby constant (not a module or class). # To access the constant's (source code) value, use {#value}. # -# source://yard//lib/yard/code_objects/constant_object.rb#9 +# source://yard//lib/yard/code_objects/constant_object.rb#7 class YARD::CodeObjects::ConstantObject < ::YARD::CodeObjects::Base # The source code representing the constant's value # @@ -3616,7 +3431,7 @@ YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) # Represents a Ruby method in source # -# source://yard//lib/yard/code_objects/method_object.rb#10 +# source://yard//lib/yard/code_objects/method_object.rb#7 class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base # Creates a new method object in +namespace+ with +name+ and an instance # or class +scope+ @@ -3789,7 +3604,7 @@ end # Represents a Ruby module. # -# source://yard//lib/yard/code_objects/module_object.rb#11 +# source://yard//lib/yard/code_objects/module_object.rb#6 class YARD::CodeObjects::ModuleObject < ::YARD::CodeObjects::NamespaceObject # Returns the inheritance tree of mixins. # @@ -3954,7 +3769,7 @@ end # The two main Ruby objects that can act as namespaces are modules # ({ModuleObject}) and classes ({ClassObject}). # -# source://yard//lib/yard/code_objects/namespace_object.rb#11 +# source://yard//lib/yard/code_objects/namespace_object.rb#9 class YARD::CodeObjects::NamespaceObject < ::YARD::CodeObjects::Base # Creates a new namespace object inside +namespace+ with +name+. # @@ -4926,7 +4741,7 @@ YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) # # == Subclassing Notes # -# The DocstringParser can be subclassed and subtituted during parsing by +# The DocstringParser can be subclassed and substituted during parsing by # setting the {Docstring.default_parser} attribute with the name of the # subclass. This allows developers to change the way docstrings are # parsed, allowing for completely different docstring syntaxes. @@ -6100,7 +5915,7 @@ class YARD::Handlers::HandlerAborted < ::RuntimeError; end # an operation on an object's namespace but the namespace could # not be resolved. # -# source://yard//lib/yard/handlers/base.rb#15 +# source://yard//lib/yard/handlers/base.rb#13 class YARD::Handlers::NamespaceMissingError < ::YARD::Parser::UndocumentableError # @return [NamespaceMissingError] a new instance of NamespaceMissingError # @@ -6688,7 +6503,7 @@ class YARD::Handlers::Ruby::Legacy::AttributeHandler < ::YARD::Handlers::Ruby::L # # @abstract See {Handlers::Base} for subclassing information. # -# source://yard//lib/yard/handlers/ruby/legacy/base.rb#10 +# source://yard//lib/yard/handlers/ruby/legacy/base.rb#9 class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base include ::YARD::Parser::Ruby::Legacy::RubyToken @@ -7006,7 +6821,7 @@ class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#25 def process_mixin(mixin); end - # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#43 + # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#50 def recipient(mixin); end end @@ -7231,7 +7046,7 @@ class YARD::I18n::Locale def name; end # @param message [String] the translation target message. - # @return [String] translated message. If tarnslation isn't + # @return [String] translated message. If translation isn't # registered, the +message+ is returned. # @since 0.8.2 # @@ -7260,7 +7075,7 @@ end # # source://yard//lib/yard/i18n/message.rb#10 class YARD::I18n::Message - # Creates a trasnlate target message for message ID +id+. + # Creates a translate target message for message ID +id+. # # @param id [String] the message ID of the translate target message. # @return [Message] a new instance of Message @@ -7301,7 +7116,7 @@ class YARD::I18n::Message # source://yard//lib/yard/i18n/message.rb#19 def comments; end - # @return [String] the message ID of the trnslation target message. + # @return [String] the message ID of the translation target message. # @since 0.8.1 # # source://yard//lib/yard/i18n/message.rb#12 @@ -7359,7 +7174,7 @@ class YARD::I18n::Messages # source://yard//lib/yard/i18n/messages.rb#20 def each(&block); end - # Registers a {Message}, the mssage ID of which is +id+. If + # Registers a {Message}, the message ID of which is +id+. If # corresponding +Message+ is already registered, the previously # registered object is returned. # @@ -7461,7 +7276,7 @@ class YARD::I18n::PotGenerator # # Locations of the +Message+ are used to generate the reference # line that is started with "#: ". +relative_base_path+ passed - # when the generater is created is prepended to each path in location. + # when the generator is created is prepended to each path in location. # # Comments of the +Message+ are used to generate the # translator-comment line that is started with "# ". @@ -7644,7 +7459,7 @@ end # Handles console logging for info, warnings and errors. # Uses the stdlib Logger class in Ruby for all the backend logic. # -# source://yard//lib/yard/logging.rb#12 +# source://yard//lib/yard/logging.rb#9 class YARD::Logger < ::Logger # Creates a new logger # @@ -7820,7 +7635,7 @@ class YARD::Logger < ::Logger # source://yard//lib/yard/logging.rb#201 def format_log(sev, _time, _prog, msg); end - # source://logger/1.5.0/logger.rb#485 + # source://logger/1.5.3/logger.rb#682 def print_no_newline(msg); end class << self @@ -7930,7 +7745,7 @@ class YARD::Options # # @example Setting an option with Hash syntax # options[:format] = :html # equivalent to: options.format = :html - # @param key [Symbol, String] the optin to set + # @param key [Symbol, String] the option to set # @param value [Object] the value to set for the option # @return [Object] the value being set # @@ -10289,490 +10104,490 @@ class YARD::Parser::Ruby::RipperParser < ::Ripper # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 def frozen_string_line; end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_BEGIN(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_CHAR(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_END(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on___end__(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_alias(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_alias_error(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_arg_ambiguous(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_arg_paren(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_args_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_args_add_block(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_args_add_star(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_args_forward(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_args_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_aryptn(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_assign(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_assign_error(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_assoc_splat(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_backref(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_backtick(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_begin(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_binary(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_block_var(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_blockarg(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_brace_block(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_break(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_call(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_case(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_class(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_class_name_error(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_comma(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_command(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_command_call(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_const(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_const_path_field(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_const_ref(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_cvar(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_def(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_defined(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_defs(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_do_block(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_dot2(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_dot3(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_else(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_elsif(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_embexpr_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_embexpr_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_embvar(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_ensure(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_excessed_comma(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_fcall(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_field(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_float(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_fndptn(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_for(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_gvar(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_heredoc_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_heredoc_dedent(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_heredoc_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_hshptn(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_ident(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_if(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#443 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 def on_if_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_ifop(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#216 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 def on_ignored_nl(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_ignored_sp(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_imaginary(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_in(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_int(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_ivar(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#203 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 def on_kw(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_kwrest_param(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_label_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_lbrace(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_lparen(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_magic_comment(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_massign(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_method_add_arg(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_method_add_block(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mlhs_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mlhs_add_post(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mlhs_add_star(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_mlhs_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_mlhs_paren(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_module(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mrhs_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_mrhs_add_star(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_mrhs_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_mrhs_new_from_args(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_next(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#216 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 def on_nl(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_nokw_param(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#203 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 def on_op(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_opassign(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_operator_ambiguous(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_param_error(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_paren(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_period(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#468 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 def on_qsymbols_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_qsymbols_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#456 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 def on_qsymbols_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#468 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 def on_qwords_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_qwords_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#456 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 def on_qwords_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_rational(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_rbrace(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_redo(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_regexp_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_regexp_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_regexp_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_regexp_literal(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_regexp_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_rescue_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_rest_param(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_retry(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_return(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_return0(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_rparen(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_sclass(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_semicolon(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_stmts_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_stmts_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_string_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_string_concat(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_string_dvar(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_string_embexpr(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_super(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_symbeg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_symbol(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_symbol_literal(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#468 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 def on_symbols_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_symbols_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#456 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 def on_symbols_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_tlambda(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_tlambeg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_top_const_field(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_tstring_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_tstring_content(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_tstring_end(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_undef(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_unless(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#443 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 def on_unless_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_until(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#443 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 def on_until_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_var_alias(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_var_field(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_var_ref(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#171 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 def on_vcall(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_when(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_while(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#443 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 def on_while_mod(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_word_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_word_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#468 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 def on_words_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#193 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 def on_words_beg(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#456 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 def on_words_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#182 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 def on_words_sep(tok); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#156 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 def on_xstring_add(list, item); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_xstring_literal(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#149 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 def on_xstring_new(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_yield(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_yield0(*args); end - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#164 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 def on_zsuper(*args); end # @since 0.5.6 @@ -10799,195 +10614,195 @@ class YARD::Parser::Ruby::RipperParser < ::Ripper # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#661 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#667 def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#265 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#271 def add_token(token, data); end # @return [Boolean] # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#605 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#611 def comment_starts_line?(charno); end # @raise [ParserSyntaxError] # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#600 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 def compile_error(msg); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#687 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#693 def freeze_tree(node = T.unsafe(nil)); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#614 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#620 def insert_comments; end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#371 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#377 def on_aref(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#379 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#385 def on_aref_field(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#385 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#391 def on_array(other); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#346 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#352 def on_assoc_new(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#358 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#364 def on_assoclist_from_args(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#354 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#360 def on_bare_assoc_hash(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#341 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 def on_body_stmt(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#341 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 def on_bodystmt(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#536 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#542 def on_comment(comment); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#435 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#441 def on_const_path_ref(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#413 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#419 def on_dyna_symbol(sym); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#586 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#592 def on_embdoc(text); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#580 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#586 def on_embdoc_beg(text); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#591 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#597 def on_embdoc_end(text); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#350 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#356 def on_hash(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#528 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#534 def on_label(data); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#491 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#497 def on_lambda(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#403 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#409 def on_lbracket(tok); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#509 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#515 def on_params(*args); end # @raise [ParserSyntaxError] # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#600 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 def on_parse_error(msg); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#337 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#343 def on_program(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#408 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#414 def on_rbracket(tok); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#500 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#506 def on_rescue(exc, *args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#226 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#232 def on_sp(tok); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#495 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#501 def on_string_content(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#478 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#484 def on_string_literal(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#423 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#429 def on_top_const_ref(*args); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#362 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#368 def on_unary(op, val); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#505 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#511 def on_void_stmt; end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#231 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#237 def visit_event(node); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#245 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#251 def visit_event_arr(node); end # @since 0.5.6 # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#253 + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#259 def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end end @@ -10996,6 +10811,11 @@ end # source://yard//lib/yard/parser/ruby/ruby_parser.rb#133 YARD::Parser::Ruby::RipperParser::AST_TOKENS = T.let(T.unsafe(nil), Array) +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#136 +YARD::Parser::Ruby::RipperParser::COMMENT_SKIP_NODE_TYPES = T.let(T.unsafe(nil), Array) + # @since 0.5.6 # # source://yard//lib/yard/parser/ruby/ruby_parser.rb#78 @@ -11538,6 +11358,141 @@ YARD::ROOT = T.let(T.unsafe(nil), String) # source://yard//lib/yard/autoload.rb#192 module YARD::Rake; end +# The rake task to run {CLI::Yardoc} and generate documentation. +# +# source://yard//lib/yard/rake/yardoc_task.rb#8 +class YARD::Rake::YardocTask < ::Rake::TaskLib + # Creates a new task with name +name+. + # + # @param name [String, Symbol] the name of the rake task + # @return [YardocTask] a new instance of YardocTask + # @yield a block to allow any options to be modified on the task + # @yieldparam _self [YardocTask] the task object to allow any parameters + # to be changed. + # + # source://yard//lib/yard/rake/yardoc_task.rb#50 + def initialize(name = T.unsafe(nil)); end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after; end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after=(_arg0); end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before; end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before=(_arg0); end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files; end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files=(_arg0); end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name; end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name=(_arg0); end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options; end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options=(_arg0); end + + # Options to pass to {CLI::Stats} + # + # @return [Array] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options; end + + # Options to pass to {CLI::Stats} + # + # @return [Array] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options=(_arg0); end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier; end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier=(_arg0); end + + protected + + # Defines the rake task + # + # @return [void] + # + # source://yard//lib/yard/rake/yardoc_task.rb#68 + def define; end +end + # The +Registry+ is the centralized data store for all {CodeObjects} created # during parsing. The storage is a key value store with the object's path # (see {CodeObjects::Base#path}) as the key and the object itself as the value. @@ -11966,7 +11921,7 @@ class YARD::RegistryResolver # # @since 0.9.1 # - # source://yard//lib/yard/registry_resolver.rb#180 + # source://yard//lib/yard/registry_resolver.rb#181 def collect_namespaces(object); end # Performs a lexical lookup from a namespace for a path and a type hint. @@ -11987,20 +11942,20 @@ class YARD::RegistryResolver # occurrences of separator tokens # @since 0.9.1 # - # source://yard//lib/yard/registry_resolver.rb#205 + # source://yard//lib/yard/registry_resolver.rb#206 def split_on_separators_match; end # @return [Regexp] the regexp match of the default separator # @since 0.9.1 # - # source://yard//lib/yard/registry_resolver.rb#193 + # source://yard//lib/yard/registry_resolver.rb#194 def starts_with_default_separator_match; end # @return [Regexp] the regexp that matches strings starting with # a separator # @since 0.9.1 # - # source://yard//lib/yard/registry_resolver.rb#199 + # source://yard//lib/yard/registry_resolver.rb#200 def starts_with_separator_match; end # return [Boolean] if the obj's type matches the provided type. @@ -12343,7 +12298,7 @@ end # Implements a serializer that reads from and writes to the filesystem. # -# source://yard//lib/yard/serializers/file_system_serializer.rb#7 +# source://yard//lib/yard/serializers/file_system_serializer.rb#5 class YARD::Serializers::FileSystemSerializer < ::YARD::Serializers::Base # Creates a new FileSystemSerializer with options # @@ -12431,7 +12386,7 @@ end # serializer = ProcessSerializer.new('less') # serializer.serialize(object, "data!") # -# source://yard//lib/yard/serializers/process_serializer.rb#12 +# source://yard//lib/yard/serializers/process_serializer.rb#9 class YARD::Serializers::ProcessSerializer < ::YARD::Serializers::Base # Creates a new ProcessSerializer for the shell command +cmd+ # @@ -12450,7 +12405,7 @@ end # A serializer that writes data to standard output. # -# source://yard//lib/yard/serializers/stdout_serializer.rb#9 +# source://yard//lib/yard/serializers/stdout_serializer.rb#5 class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base # Creates a serializer to print text to stdout # @@ -12707,6 +12662,16 @@ class YARD::Server::Adapter end end +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#16 +YARD::Server::CR = T.let(T.unsafe(nil), String) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#18 +YARD::Server::CRLF = T.let(T.unsafe(nil), String) + # Commands implement specific kinds of server responses which are routed # to by the {Router} class. To implement a custom command, subclass {Commands::Base}. # @@ -12868,7 +12833,7 @@ class YARD::Server::Commands::Base # def run # self.body = 'ERROR! The System is down!' # self.status = 500 - # self.headers['Conten-Type'] = 'text/plain' + # self.headers['Content-Type'] = 'text/plain' # end # end # @raise [NotImplementedError] @@ -13314,7 +13279,7 @@ end # # source://yard//lib/yard/server/commands/root_request_command.rb#6 class YARD::Server::Commands::RootRequestCommand < ::YARD::Server::Commands::Base - include ::WEBrick::HTTPUtils + include ::YARD::Server::HTTPUtils include ::YARD::Server::Commands::StaticFileHelpers # @since 0.6.0 @@ -13393,7 +13358,7 @@ end # # source://yard//lib/yard/server/commands/static_file_command.rb#6 class YARD::Server::Commands::StaticFileCommand < ::YARD::Server::Commands::LibraryCommand - include ::WEBrick::HTTPUtils + include ::YARD::Server::HTTPUtils include ::YARD::Server::Commands::StaticFileHelpers # @since 0.6.0 @@ -13417,9 +13382,9 @@ YARD::Server::Commands::StaticFileCommand::STATIC_PATHS = T.let(T.unsafe(nil), A # # @since 0.6.0 # -# source://yard//lib/yard/server/commands/static_file_helpers.rb#9 +# source://yard//lib/yard/server/commands/static_file_helpers.rb#8 module YARD::Server::Commands::StaticFileHelpers - include ::WEBrick::HTTPUtils + include ::YARD::Server::HTTPUtils # Serves an empty favicon. # @@ -13428,7 +13393,7 @@ module YARD::Server::Commands::StaticFileHelpers # @return [Boolean] # @since 0.6.0 # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#15 + # source://yard//lib/yard/server/commands/static_file_helpers.rb#14 def favicon?; end # Attempts to route a path to a static template file. @@ -13437,20 +13402,20 @@ module YARD::Server::Commands::StaticFileHelpers # @return [void] # @since 0.6.0 # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#27 + # source://yard//lib/yard/server/commands/static_file_helpers.rb#26 def static_template_file?; end private # @since 0.6.0 # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#43 + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 def find_file(adapter, url); end class << self # @since 0.6.0 # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#43 + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 def find_file(adapter, url); end end end @@ -13590,81 +13555,545 @@ end # source://yard//lib/yard/server/adapter.rb#6 class YARD::Server::FinishRequest < ::RuntimeError; end -# This exception is raised when {LibraryVersion#prepare!} fails, or discovers -# that the library is not "prepared" to be served by +# HTTPUtils provides utility methods for working with the HTTP protocol. +# +# This module is generally used internally by WEBrick # # @since 0.6.0 # -# source://yard//lib/yard/server/library_version.rb#9 -class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end +# source://yard//lib/yard/server/http_utils.rb#25 +module YARD::Server::HTTPUtils + private -# A library version encapsulates a library's documentation at a specific version. -# Although the version is optional, this allows for creating multiple documentation -# points for a specific library, each representing a unique version. The term -# "library" used in other parts of the YARD::Server documentation refers to -# objects of this class unless otherwise noted. -# -# A library points to a location where a {#yardoc_file} is located so that -# its documentation may be loaded and served. Optionally, a {#source_path} is -# given to point to a location where any extra files (and {YARD::CLI::Yardoc .yardopts}) -# should be loaded from. Both of these methods may not be known immediately, -# since the yardoc file may not be built until later. Resolving the yardoc -# file and source path are dependent on the specific library "source type" used. -# Source types (known as "library source") are discussed in detail below. -# -# == Using with Adapters -# A list of libraries need to be passed into adapters upon creation. In -# most cases, you will never do this manually, but if you use a {RackMiddleware}, -# you will need to pass in this list yourself. To build this list of libraries, -# you should create a hash of library names mapped to an *Array* of LibraryVersion -# objects. For example: -# -# {'mylib' => [LibraryVersion.new('mylib', '1.0', ...), -# LibraryVersion.new('mylib', '2.0', ...)]} -# -# Note that you can also use {Adapter#add_library} for convenience. -# -# The "array" part is required, even for just one library version. -# -# == Library Sources -# The {#source} method represents the library source type, ie. where the -# library "comes from". It might come from "disk", or it might come from a -# "gem" (technically the disk, but a separate type nonetheless). In these -# two cases, the yardoc file sits somewhere on your filesystem, though -# it may also be built dynamically if it does not yet exist. This behaviour -# is controlled through the {#prepare!} method, which prepares the yardoc file -# given a specific library source. We will see how this works in detail in -# the following section. -# -# == Implementing a Custom Library Source -# YARD can be extended to support custom library sources in order to -# build or retrieve a yardoc file at runtime from many different locations. -# -# To implement this behaviour, 3 methods can be added to the +LibraryVersion+ -# class, +#load_yardoc_from_SOURCE+, +#yardoc_file_for_SOURCE+, and -# +#source_path_for_SOURCE+. In all cases, "SOURCE" represents the source -# type used in {#source} when creating the library object. The -# +#yardoc_file_for_SOURCE+ and +#source_path_for_SOURCE+ methods are called upon -# creation and should return the location where the source code for the library -# lives. The load method is called from {#prepare!} if there is no yardoc file -# and should set {#yardoc_file}. Below is a full example for -# implementing a custom library source, +:http+, which reads packaged .yardoc -# databases from zipped archives off of an HTTP server. -# -# Note that only +#load_yardoc_from_SOURCE+ is required. The other two -# methods are optional and can be set manually (via {#source_path=} and -# {#yardoc_file=}) on the object at any time. -# -# @example Implementing a Custom Library Source -# # Adds the source type "http" for .yardoc files zipped on HTTP servers -# class LibraryVersion -# def load_yardoc_from_http -# Thread.new do -# # zip/unzip method implementations are not shown -# download_zip_file("http://mysite.com/yardocs/#{self}.zip") -# unzip_file_to("/path/to/yardocs/#{self}") -# end -# + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + + class << self + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + end +end + +# Default mime types +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#47 +YARD::Server::HTTPUtils::DefaultMimeTypes = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#459 +YARD::Server::HTTPUtils::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# Stores multipart form data. FormData objects are created when +# WEBrick::HTTPUtils.parse_form_data is called. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#242 +class YARD::Server::HTTPUtils::FormData < ::String + # Creates a new FormData object. + # + # +args+ is an Array of form data entries. One FormData will be created + # for each entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @return [FormData] a new instance of FormData + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#267 + def initialize(*args); end + + # Adds +str+ to this FormData which may be the body, a header or a + # header entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#300 + def <<(str); end + + # Retrieves the header at the first entry in +key+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#286 + def [](*key); end + + # Adds +data+ at the end of the chain of entries + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#320 + def append_data(data); end + + # Yields each entry in this FormData + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#335 + def each_data; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename=(_arg0); end + + # Returns all the FormData as an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def list; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data=(_arg0); end + + # Returns all the FormData as an Array + # A FormData will behave like an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def to_ary; end + + # This FormData's body + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#363 + def to_s; end + + protected + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#244 +YARD::Server::HTTPUtils::FormData::EmptyHeader = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#243 +YARD::Server::HTTPUtils::FormData::EmptyRawHeader = T.let(T.unsafe(nil), Array) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#458 +YARD::Server::HTTPUtils::NONASCII = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#456 +YARD::Server::HTTPUtils::UNESCAPED = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#457 +YARD::Server::HTTPUtils::UNESCAPED_FORM = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#460 +YARD::Server::HTTPUtils::UNESCAPED_PCHAR = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#17 +YARD::Server::LF = T.let(T.unsafe(nil), String) + +# This exception is raised when {LibraryVersion#prepare!} fails, or discovers +# that the library is not "prepared" to be served by +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/library_version.rb#9 +class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end + +# A library version encapsulates a library's documentation at a specific version. +# Although the version is optional, this allows for creating multiple documentation +# points for a specific library, each representing a unique version. The term +# "library" used in other parts of the YARD::Server documentation refers to +# objects of this class unless otherwise noted. +# +# A library points to a location where a {#yardoc_file} is located so that +# its documentation may be loaded and served. Optionally, a {#source_path} is +# given to point to a location where any extra files (and {YARD::CLI::Yardoc .yardopts}) +# should be loaded from. Both of these methods may not be known immediately, +# since the yardoc file may not be built until later. Resolving the yardoc +# file and source path are dependent on the specific library "source type" used. +# Source types (known as "library source") are discussed in detail below. +# +# == Using with Adapters +# A list of libraries need to be passed into adapters upon creation. In +# most cases, you will never do this manually, but if you use a {RackMiddleware}, +# you will need to pass in this list yourself. To build this list of libraries, +# you should create a hash of library names mapped to an *Array* of LibraryVersion +# objects. For example: +# +# {'mylib' => [LibraryVersion.new('mylib', '1.0', ...), +# LibraryVersion.new('mylib', '2.0', ...)]} +# +# Note that you can also use {Adapter#add_library} for convenience. +# +# The "array" part is required, even for just one library version. +# +# == Library Sources +# The {#source} method represents the library source type, ie. where the +# library "comes from". It might come from "disk", or it might come from a +# "gem" (technically the disk, but a separate type nonetheless). In these +# two cases, the yardoc file sits somewhere on your filesystem, though +# it may also be built dynamically if it does not yet exist. This behaviour +# is controlled through the {#prepare!} method, which prepares the yardoc file +# given a specific library source. We will see how this works in detail in +# the following section. +# +# == Implementing a Custom Library Source +# YARD can be extended to support custom library sources in order to +# build or retrieve a yardoc file at runtime from many different locations. +# +# To implement this behaviour, 3 methods can be added to the +LibraryVersion+ +# class, +#load_yardoc_from_SOURCE+, +#yardoc_file_for_SOURCE+, and +# +#source_path_for_SOURCE+. In all cases, "SOURCE" represents the source +# type used in {#source} when creating the library object. The +# +#yardoc_file_for_SOURCE+ and +#source_path_for_SOURCE+ methods are called upon +# creation and should return the location where the source code for the library +# lives. The load method is called from {#prepare!} if there is no yardoc file +# and should set {#yardoc_file}. Below is a full example for +# implementing a custom library source, +:http+, which reads packaged .yardoc +# databases from zipped archives off of an HTTP server. +# +# Note that only +#load_yardoc_from_SOURCE+ is required. The other two +# methods are optional and can be set manually (via {#source_path=} and +# {#yardoc_file=}) on the object at any time. +# +# @example Implementing a Custom Library Source +# # Adds the source type "http" for .yardoc files zipped on HTTP servers +# class LibraryVersion +# def load_yardoc_from_http +# Thread.new do +# # zip/unzip method implementations are not shown +# download_zip_file("http://mysite.com/yardocs/#{self}.zip") +# unzip_file_to("/path/to/yardocs/#{self}") +# end +# # # tell the server it's not ready yet (but it might be next time) # raise LibraryNotPreparedError # end @@ -14126,50 +14555,6 @@ module YARD::Server::StaticCaching def check_static_cache; end end -# The main adapter to initialize a WEBrick server. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/webrick_adapter.rb#9 -class YARD::Server::WebrickAdapter < ::YARD::Server::Adapter - # Initializes a WEBrick server. If {Adapter#server_options} contains a - # +:daemonize+ key set to true, the server will be daemonized. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/webrick_adapter.rb#10 - def start; end -end - -# The main WEBrick servlet implementation, accepting only GET requests. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/webrick_adapter.rb#20 -class YARD::Server::WebrickServlet < ::WEBrick::HTTPServlet::AbstractServlet - # @return [WebrickServlet] a new instance of WebrickServlet - # @since 0.6.0 - # - # source://yard//lib/yard/server/webrick_adapter.rb#23 - def initialize(server, adapter); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/webrick_adapter.rb#21 - def adapter; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/webrick_adapter.rb#21 - def adapter=(_arg0); end - - # @private - # @since 0.6.0 - # - # source://yard//lib/yard/server/webrick_adapter.rb#29 - def do_GET(request, response); end -end - # Stubs marshal dumps and acts a delegate class for an object by path # # @private @@ -14206,7 +14591,7 @@ YARD::TEMPLATE_ROOT = T.let(T.unsafe(nil), String) # Namespace for Tag components # -# source://yard//lib/yard/autoload.rb#247 +# source://yard//lib/yard/autoload.rb#248 module YARD::Tags; end # Defines an attribute with a given name, using indented block data as the @@ -15683,10 +16068,10 @@ class YARD::Tags::Tag def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end # Provides a plain English summary of the type specification, or nil - # if no types are provided or parseable. + # if no types are provided or parsable. # # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parseable + # @return [nil] if no types are provided or not parsable # # source://yard//lib/yard/tags/tag.rb#65 def explain_types; end @@ -15762,25 +16147,29 @@ class YARD::Tags::TagFormatError < ::RuntimeError; end class YARD::Tags::TypesExplainer class << self # Provides a plain English summary of the type specification, or nil - # if no types are provided or parseable. + # if no types are provided or parsable. # # @param types [Array] a list of types to parse and summarize # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parseable + # @return [nil] if no types are provided or not parsable # # source://yard//lib/yard/tags/types_explainer.rb#9 def explain(*types); end # Provides a plain English summary of the type specification, or nil - # if no types are provided or parseable. + # if no types are provided or parsable. # # @param types [Array] a list of types to parse and summarize - # @raise [SyntaxError] if the types are not parseable + # @raise [SyntaxError] if the types are not parsable # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parseable + # @return [nil] if no types are provided or not parsable # # source://yard//lib/yard/tags/types_explainer.rb#17 def explain!(*types); end + + private + + def new(*_arg0); end end end @@ -15936,7 +16325,7 @@ end # Namespace for templating system # -# source://yard//lib/yard/autoload.rb#270 +# source://yard//lib/yard/autoload.rb#271 module YARD::Templates; end # This module manages all creation, handling and rendering of {Template} @@ -16089,7 +16478,7 @@ end # Namespace for template helpers # -# source://yard//lib/yard/autoload.rb#271 +# source://yard//lib/yard/autoload.rb#272 module YARD::Templates::Helpers; end # The base helper module included in all templates. @@ -16724,9 +17113,89 @@ end # Namespace for markup providers # -# source://yard//lib/yard/autoload.rb#272 +# source://yard//lib/yard/autoload.rb#273 module YARD::Templates::Helpers::Markup; end +# source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#13 +class YARD::Templates::Helpers::Markup::RDocMarkdown < ::YARD::Templates::Helpers::Markup::RDocMarkup + # @return [RDocMarkdown] a new instance of RDocMarkdown + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#14 + def initialize(text); end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#18 + def fix_typewriter(html); end +end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 +class YARD::Templates::Helpers::Markup::RDocMarkup + # @return [RDocMarkup] a new instance of RDocMarkup + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#41 + def initialize(text); end + + # Returns the value of attribute from_path. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 + def from_path; end + + # Sets the attribute from_path + # + # @param value the value to set the attribute from_path to. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 + def from_path=(_arg0); end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#50 + def to_html; end + + private + + # Don't allow -- to turn into — element. The chances of this being + # some --option is far more likely than the typographical meaning. + # + # @todo Refactor into own SimpleMarkup subclass + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#87 + def fix_dash_dash(text); end + + # Fixes RDoc behaviour with ++ only supporting alphanumeric text. + # + # @todo Refactor into own SimpleMarkup subclass + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#66 + def fix_typewriter(text); end +end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 +YARD::Templates::Helpers::Markup::RDocMarkup::MARKUP = RDoc::Markup + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#13 +class YARD::Templates::Helpers::Markup::RDocMarkupToHtml < ::RDoc::Markup::ToHtml + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#16 + def initialize; end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#100 + def accept_paragraph(*args); end + + # Returns the value of attribute from_path. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + def from_path; end + + # Sets the attribute from_path + # + # @param value the value to set the attribute from_path to. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + def from_path=(_arg0); end + + # Disable auto-link of URLs + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#96 + def handle_special_HYPERLINK(special); end +end + # Helper methods for loading and managing markup types. # # source://yard//lib/yard/templates/helpers/markup_helper.rb#7 @@ -17396,7 +17865,7 @@ end # # @see CLI::YardocOptions # -# source://yard//lib/yard/templates/template_options.rb#11 +# source://yard//lib/yard/templates/template_options.rb#10 class YARD::Templates::TemplateOptions < ::YARD::Options # @return [OpenStruct] an open struct containing any global state across all # generated objects in a template. diff --git a/sorbet/rbi/gems/yarp@0.13.0.rbi b/sorbet/rbi/gems/yarp@0.13.0.rbi new file mode 100644 index 0000000..f67066d --- /dev/null +++ b/sorbet/rbi/gems/yarp@0.13.0.rbi @@ -0,0 +1,21646 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `yarp` gem. +# Please instead update this file by running `bin/tapioca gem yarp`. + +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/lib/prism/visitor.rb.erb +# if you are looking to modify the template +# +# source://yarp//lib/prism.rb#3 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + def dump_file(_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + def lex(*_arg0); end + + # Returns an array of tokens that closely resembles that of the Ripper lexer. + # The only difference is that since we don't keep track of lexer state in the + # same way, it's going to always return the NONE state. + # + # source://yarp//lib/prism.rb#33 + def lex_compat(source, filepath = T.unsafe(nil)); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(_arg0); end + + # This lexes with the Ripper lex. It drops any space events but otherwise + # returns the same tokens. Raises SyntaxError if the syntax in source is + # invalid. + # + # source://yarp//lib/prism.rb#40 + def lex_ripper(source); end + + # Load the serialized AST using the source as a reference into a tree. + # + # source://yarp//lib/prism.rb#45 + def load(source, serialized); end + + # Mirror the Prism.parse API by using the serialization API. + def parse(*_arg0); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap when + # it is available. + def parse_file(_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + def parse_lex_file(_arg0); end + end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#45 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://yarp//lib/prism/node.rb#56 + def initialize(new_name, old_name, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#64 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#69 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#79 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#74 + def compact_child_nodes; end + + # def copy: (**params) -> AliasGlobalVariableNode + # + # source://yarp//lib/prism/node.rb#84 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#69 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#97 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#106 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#102 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#53 + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://yarp//lib/prism/node.rb#47 + def new_name; end + + # attr_reader old_name: Node + # + # source://yarp//lib/prism/node.rb#50 + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#130 + def type; end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#139 +class Prism::AliasMethodNode < ::Prism::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://yarp//lib/prism/node.rb#150 + def initialize(new_name, old_name, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#158 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#163 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#173 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#168 + def compact_child_nodes; end + + # def copy: (**params) -> AliasMethodNode + # + # source://yarp//lib/prism/node.rb#178 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#163 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#191 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#200 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#196 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#147 + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://yarp//lib/prism/node.rb#141 + def new_name; end + + # attr_reader old_name: Node + # + # source://yarp//lib/prism/node.rb#144 + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#224 + def type; end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#233 +class Prism::AlternationPatternNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://yarp//lib/prism/node.rb#244 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#252 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#257 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#267 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#262 + def compact_child_nodes; end + + # def copy: (**params) -> AlternationPatternNode + # + # source://yarp//lib/prism/node.rb#272 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#257 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#285 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#294 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#235 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#290 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#241 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#238 + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#318 + def type; end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#327 +class Prism::AndNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [AndNode] a new instance of AndNode + # + # source://yarp//lib/prism/node.rb#338 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#346 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#351 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#361 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#356 + def compact_child_nodes; end + + # def copy: (**params) -> AndNode + # + # source://yarp//lib/prism/node.rb#366 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#351 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#379 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#388 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#329 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#384 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#335 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#332 + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#412 + def type; end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#421 +class Prism::ArgumentsNode < ::Prism::Node + # def initialize: (arguments: Array[Node], location: Location) -> void + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://yarp//lib/prism/node.rb#426 + def initialize(arguments, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#432 + def accept(visitor); end + + # attr_reader arguments: Array[Node] + # + # source://yarp//lib/prism/node.rb#423 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#437 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#447 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#442 + def compact_child_nodes; end + + # def copy: (**params) -> ArgumentsNode + # + # source://yarp//lib/prism/node.rb#452 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#437 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#463 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#467 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#487 + def type; end +end + +# Represents an array literal. This can be a regular array using brackets or +# a special array using % like %w or %i. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#497 +class Prism::ArrayNode < ::Prism::Node + # def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://yarp//lib/prism/node.rb#508 + def initialize(elements, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#516 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#521 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#559 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#505 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#531 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#526 + def compact_child_nodes; end + + # def copy: (**params) -> ArrayNode + # + # source://yarp//lib/prism/node.rb#536 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#521 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#549 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/prism/node.rb#499 + def elements; end + + # source://yarp//lib/prism/node.rb#563 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#554 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#502 + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#585 + def type; end +end + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *1 +# ^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#606 +class Prism::ArrayPatternNode < ::Prism::Node + # def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://yarp//lib/prism/node.rb#626 + def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#637 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#642 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#688 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#623 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#657 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#647 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://yarp//lib/prism/node.rb#608 + def constant; end + + # def copy: (**params) -> ArrayPatternNode + # + # source://yarp//lib/prism/node.rb#662 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#642 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#678 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#692 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#683 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#620 + def opening_loc; end + + # attr_reader posts: Array[Node] + # + # source://yarp//lib/prism/node.rb#617 + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/prism/node.rb#611 + def requireds; end + + # attr_reader rest: Node? + # + # source://yarp//lib/prism/node.rb#614 + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#727 + def type; end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#736 +class Prism::AssocNode < ::Prism::Node + # def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void + # + # @return [AssocNode] a new instance of AssocNode + # + # source://yarp//lib/prism/node.rb#747 + def initialize(key, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#755 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#760 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#773 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#765 + def compact_child_nodes; end + + # def copy: (**params) -> AssocNode + # + # source://yarp//lib/prism/node.rb#778 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#760 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#791 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#800 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader key: Node + # + # source://yarp//lib/prism/node.rb#738 + def key; end + + # def operator: () -> String? + # + # source://yarp//lib/prism/node.rb#796 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#744 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#828 + def type; end + + # attr_reader value: Node? + # + # source://yarp//lib/prism/node.rb#741 + def value; end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#837 +class Prism::AssocSplatNode < ::Prism::Node + # def initialize: (value: Node?, operator_loc: Location, location: Location) -> void + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://yarp//lib/prism/node.rb#845 + def initialize(value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#852 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#857 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#869 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#862 + def compact_child_nodes; end + + # def copy: (**params) -> AssocSplatNode + # + # source://yarp//lib/prism/node.rb#874 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#857 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#886 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#895 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#891 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#842 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#921 + def type; end + + # attr_reader value: Node? + # + # source://yarp//lib/prism/node.rb#839 + def value; end +end + +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://yarp//lib/prism/node.rb#930 +class Prism::BackReferenceReadNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://yarp//lib/prism/node.rb#932 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#937 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#942 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#952 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#947 + def compact_child_nodes; end + + # def copy: (**params) -> BackReferenceReadNode + # + # source://yarp//lib/prism/node.rb#957 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#942 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#967 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#971 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#990 + def type; end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# source://yarp//lib/prism/visitor.rb#13 +class Prism::BasicVisitor + # source://yarp//lib/prism/visitor.rb#14 + def visit(node); end + + # source://yarp//lib/prism/visitor.rb#18 + def visit_all(nodes); end + + # source://yarp//lib/prism/visitor.rb#22 + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#1001 +class Prism::BeginNode < ::Prism::Node + # def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [BeginNode] a new instance of BeginNode + # + # source://yarp//lib/prism/node.rb#1021 + def initialize(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1032 + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#1082 + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#1003 + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1041 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1056 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1046 + def compact_child_nodes; end + + # def copy: (**params) -> BeginNode + # + # source://yarp//lib/prism/node.rb#1061 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1041 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1077 + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://yarp//lib/prism/node.rb#1012 + def else_clause; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#1087 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#1018 + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://yarp//lib/prism/node.rb#1015 + def ensure_clause; end + + # source://yarp//lib/prism/node.rb#1091 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader rescue_clause: RescueNode? + # + # source://yarp//lib/prism/node.rb#1009 + def rescue_clause; end + + # source://yarp//lib/prism/node.rb#1036 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#1006 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#1136 + def type; end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1145 +class Prism::BlockArgumentNode < ::Prism::Node + # def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://yarp//lib/prism/node.rb#1153 + def initialize(expression, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1160 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1165 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1177 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1170 + def compact_child_nodes; end + + # def copy: (**params) -> BlockArgumentNode + # + # source://yarp//lib/prism/node.rb#1182 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1165 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1194 + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://yarp//lib/prism/node.rb#1147 + def expression; end + + # source://yarp//lib/prism/node.rb#1203 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#1199 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#1150 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#1229 + def type; end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://yarp//lib/prism/node.rb#1238 +class Prism::BlockLocalVariableNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://yarp//lib/prism/node.rb#1243 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1249 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1254 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1264 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1259 + def compact_child_nodes; end + + # def copy: (**params) -> BlockLocalVariableNode + # + # source://yarp//lib/prism/node.rb#1269 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1254 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1280 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1284 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#1240 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#1304 + def type; end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1313 +class Prism::BlockNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [BlockNode] a new instance of BlockNode + # + # source://yarp//lib/prism/node.rb#1330 + def initialize(locals, parameters, body, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1340 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#1321 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1345 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#1388 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#1327 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1358 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1350 + def compact_child_nodes; end + + # def copy: (**params) -> BlockNode + # + # source://yarp//lib/prism/node.rb#1363 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1345 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1378 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1392 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#1315 + def locals; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#1383 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#1324 + def opening_loc; end + + # attr_reader parameters: BlockParametersNode? + # + # source://yarp//lib/prism/node.rb#1318 + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#1426 + def type; end +end + +# Represents a block parameter to a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://yarp//lib/prism/node.rb#1436 +class Prism::BlockParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://yarp//lib/prism/node.rb#1447 + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1455 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1460 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1470 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1465 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParameterNode + # + # source://yarp//lib/prism/node.rb#1475 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1460 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1488 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1497 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://yarp//lib/prism/node.rb#1438 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/prism/node.rb#1441 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#1493 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#1444 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#1519 + def type; end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#1532 +class Prism::BlockParametersNode < ::Prism::Node + # def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://yarp//lib/prism/node.rb#1546 + def initialize(parameters, locals, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1555 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1560 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#1602 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#1543 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1573 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1565 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParametersNode + # + # source://yarp//lib/prism/node.rb#1578 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1560 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1592 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1606 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Node] + # + # source://yarp//lib/prism/node.rb#1537 + def locals; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#1597 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#1540 + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://yarp//lib/prism/node.rb#1534 + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#1634 + def type; end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1643 +class Prism::BreakNode < ::Prism::Node + # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void + # + # @return [BreakNode] a new instance of BreakNode + # + # source://yarp//lib/prism/node.rb#1651 + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1658 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#1645 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1663 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1675 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1668 + def compact_child_nodes; end + + # def copy: (**params) -> BreakNode + # + # source://yarp//lib/prism/node.rb#1680 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1663 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1692 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1701 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#1697 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#1648 + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#1727 + def type; end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1736 +class Prism::CallAndWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://yarp//lib/prism/node.rb#1771 + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1787 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#1750 + def arguments; end + + # def call_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#1837 + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#1741 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1792 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#1852 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#1753 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1806 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1797 + def compact_child_nodes; end + + # def copy: (**params) -> CallAndWriteNode + # + # source://yarp//lib/prism/node.rb#1811 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1792 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#1832 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#1871 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://yarp//lib/prism/node.rb#1842 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/prism/node.rb#1744 + def message_loc; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#1847 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#1747 + def opening_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#1867 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#1765 + def operator_loc; end + + # attr_reader read_name: String + # + # source://yarp//lib/prism/node.rb#1759 + def read_name; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#1738 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#1857 + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#1913 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#1768 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#1862 + def variable_call?; end + + # attr_reader write_name: String + # + # source://yarp//lib/prism/node.rb#1762 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#1756 + def flags; end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#1937 +class Prism::CallNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: String, location: Location) -> void + # + # @return [CallNode] a new instance of CallNode + # + # source://yarp//lib/prism/node.rb#1966 + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#1980 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#1951 + def arguments; end + + # attr_reader block: Node? + # + # source://yarp//lib/prism/node.rb#1957 + def block; end + + # def call_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#2028 + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#1942 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1985 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#2043 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#1954 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#1999 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#1990 + def compact_child_nodes; end + + # def copy: (**params) -> CallNode + # + # source://yarp//lib/prism/node.rb#2004 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#1985 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2023 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2057 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://yarp//lib/prism/node.rb#2033 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/prism/node.rb#1945 + def message_loc; end + + # attr_reader name: String + # + # source://yarp//lib/prism/node.rb#1963 + def name; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#2038 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#1948 + def opening_loc; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#1939 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2048 + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#2101 + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2053 + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#1960 + def flags; end +end + +# source://yarp//lib/prism/node.rb#14478 +module Prism::CallNodeFlags; end + +# &. operator +# +# source://yarp//lib/prism/node.rb#14480 +Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) + +# a call that could have been a local variable +# +# source://yarp//lib/prism/node.rb#14483 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2110 +class Prism::CallOperatorWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#2148 + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2165 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#2124 + def arguments; end + + # def call_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#2216 + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#2115 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2170 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#2231 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#2127 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2184 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2175 + def compact_child_nodes; end + + # def copy: (**params) -> CallOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#2189 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2170 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2211 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2245 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://yarp//lib/prism/node.rb#2221 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/prism/node.rb#2118 + def message_loc; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#2226 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#2121 + def opening_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#2139 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2142 + def operator_loc; end + + # attr_reader read_name: String + # + # source://yarp//lib/prism/node.rb#2133 + def read_name; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#2112 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2236 + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#2288 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2145 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2241 + def variable_call?; end + + # attr_reader write_name: String + # + # source://yarp//lib/prism/node.rb#2136 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#2130 + def flags; end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2297 +class Prism::CallOrWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://yarp//lib/prism/node.rb#2332 + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2348 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#2311 + def arguments; end + + # def call_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#2398 + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#2302 + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2353 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#2413 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#2314 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2367 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2358 + def compact_child_nodes; end + + # def copy: (**params) -> CallOrWriteNode + # + # source://yarp//lib/prism/node.rb#2372 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2353 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2393 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2432 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://yarp//lib/prism/node.rb#2403 + def message; end + + # attr_reader message_loc: Location? + # + # source://yarp//lib/prism/node.rb#2305 + def message_loc; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#2408 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#2308 + def opening_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#2428 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2326 + def operator_loc; end + + # attr_reader read_name: String + # + # source://yarp//lib/prism/node.rb#2320 + def read_name; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#2299 + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2418 + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#2474 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2329 + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#2423 + def variable_call?; end + + # attr_reader write_name: String + # + # source://yarp//lib/prism/node.rb#2323 + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#2317 + def flags; end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2483 +class Prism::CapturePatternNode < ::Prism::Node + # def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://yarp//lib/prism/node.rb#2494 + def initialize(value, target, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2502 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2507 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2517 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2512 + def compact_child_nodes; end + + # def copy: (**params) -> CapturePatternNode + # + # source://yarp//lib/prism/node.rb#2522 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2507 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2535 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2544 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#2540 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2491 + def operator_loc; end + + # attr_reader target: Node + # + # source://yarp//lib/prism/node.rb#2488 + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#2568 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2485 + def value; end +end + +# Represents the use of a case statement. +# +# case true +# ^^^^^^^^^ +# when false +# end +# +# source://yarp//lib/prism/node.rb#2579 +class Prism::CaseNode < ::Prism::Node + # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void + # + # @return [CaseNode] a new instance of CaseNode + # + # source://yarp//lib/prism/node.rb#2596 + def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2606 + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#2650 + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#2590 + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2611 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2625 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2616 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://yarp//lib/prism/node.rb#2584 + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://yarp//lib/prism/node.rb#2587 + def consequent; end + + # def copy: (**params) -> CaseNode + # + # source://yarp//lib/prism/node.rb#2630 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2611 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2645 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#2655 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#2593 + def end_keyword_loc; end + + # source://yarp//lib/prism/node.rb#2659 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node? + # + # source://yarp//lib/prism/node.rb#2581 + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#2693 + def type; end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2702 +class Prism::ClassNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void + # + # @return [ClassNode] a new instance of ClassNode + # + # source://yarp//lib/prism/node.rb#2728 + def initialize(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2741 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#2719 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2746 + def child_nodes; end + + # def class_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#2788 + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#2707 + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2760 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2751 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://yarp//lib/prism/node.rb#2710 + def constant_path; end + + # def copy: (**params) -> ClassNode + # + # source://yarp//lib/prism/node.rb#2765 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2746 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2783 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#2798 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#2722 + def end_keyword_loc; end + + # def inheritance_operator: () -> String? + # + # source://yarp//lib/prism/node.rb#2793 + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#2713 + def inheritance_operator_loc; end + + # source://yarp//lib/prism/node.rb#2802 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#2704 + def locals; end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#2725 + def name; end + + # attr_reader superclass: Node? + # + # source://yarp//lib/prism/node.rb#2716 + def superclass; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#2840 + def type; end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2849 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#2863 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2872 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2877 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2887 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2882 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#2892 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2877 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#2906 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#2915 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#2851 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#2854 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#2911 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2857 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#2939 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2860 + def value; end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#2948 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#2965 + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#2975 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2980 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#2990 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#2985 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#2995 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#2980 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3010 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3014 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#2950 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#2953 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#2962 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#2956 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3039 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#2959 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3048 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#3062 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3071 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3076 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3086 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3081 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#3091 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3076 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3105 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3114 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3050 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3053 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#3110 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3056 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3138 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3059 + def value; end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#3147 +class Prism::ClassVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://yarp//lib/prism/node.rb#3152 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3158 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3163 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3173 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3168 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableReadNode + # + # source://yarp//lib/prism/node.rb#3178 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3163 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3189 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3193 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3149 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3213 + def type; end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://yarp//lib/prism/node.rb#3222 +class Prism::ClassVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://yarp//lib/prism/node.rb#3227 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3233 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3238 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3248 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3243 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableTargetNode + # + # source://yarp//lib/prism/node.rb#3253 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3238 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3264 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3268 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3224 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3288 + def type; end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3297 +class Prism::ClassVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://yarp//lib/prism/node.rb#3311 + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3320 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3325 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3335 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3330 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableWriteNode + # + # source://yarp//lib/prism/node.rb#3340 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3325 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3354 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3363 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3299 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3302 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/prism/node.rb#3359 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#3308 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3387 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3305 + def value; end +end + +# This represents a comment that was encountered during parsing. +# +# source://yarp//lib/prism/parse_result.rb#145 +class Prism::Comment + # @return [Comment] a new instance of Comment + # + # source://yarp//lib/prism/parse_result.rb#150 + def initialize(type, location); end + + # source://yarp//lib/prism/parse_result.rb#155 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/parse_result.rb#164 + def inspect; end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result.rb#148 + def location; end + + # Returns true if the comment happens on the same line as other code and false if the comment is by itself + # + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result.rb#160 + def trailing?; end + + # Returns the value of attribute type. + # + # source://yarp//lib/prism/parse_result.rb#148 + def type; end +end + +# source://yarp//lib/prism/parse_result.rb#146 +Prism::Comment::TYPES = T.let(T.unsafe(nil), Array) + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# source://yarp//lib/prism/compiler.rb#26 +class Prism::Compiler + # Visit an individual node. + # + # source://yarp//lib/prism/compiler.rb#28 + def visit(node); end + + # Visit the child nodes of the given node. + # Compile a AliasGlobalVariableNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_alias_global_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a AliasMethodNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://yarp//lib/prism/compiler.rb#33 + def visit_all(nodes); end + + # Visit the child nodes of the given node. + # Compile a AlternationPatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_alternation_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AndNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_and_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArgumentsNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_array_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayPatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_array_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_assoc_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocSplatNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_assoc_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a BackReferenceReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_back_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a BeginNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_begin_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockArgumentNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_argument_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockLocalVariableNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_local_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParametersNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_block_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a BreakNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_break_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_call_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_call_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_call_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_call_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CapturePatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_capture_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_child_nodes(node); end + + # Visit the child nodes of the given node. + # Compile a ClassNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_class_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_path_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_constant_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_def_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefinedNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_defined_node(node); end + + # Visit the child nodes of the given node. + # Compile a ElseNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_else_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedStatementsNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_embedded_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedVariableNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_embedded_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a EnsureNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_ensure_node(node); end + + # Visit the child nodes of the given node. + # Compile a FalseNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_false_node(node); end + + # Visit the child nodes of the given node. + # Compile a FindPatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_find_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a FlipFlopNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_flip_flop_node(node); end + + # Visit the child nodes of the given node. + # Compile a FloatNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_float_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_for_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingArgumentsNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_forwarding_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_forwarding_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingSuperNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_forwarding_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_global_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashPatternNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_hash_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a IfNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_if_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImaginaryNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_imaginary_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_implicit_node(node); end + + # Visit the child nodes of the given node. + # Compile a InNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_in_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_instance_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IntegerNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_integer_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedMatchLastLineNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedRegularExpressionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedStringNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedSymbolNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedXStringNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_interpolated_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordHashNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_keyword_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordRestParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_keyword_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a LambdaNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_lambda_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableAndWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOrWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_local_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchLastLineNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchPredicateNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_match_predicate_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchRequiredNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_match_required_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_match_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MissingNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_missing_node(node); end + + # Visit the child nodes of the given node. + # Compile a ModuleNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_module_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiTargetNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_multi_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiWriteNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_multi_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a NextNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_next_node(node); end + + # Visit the child nodes of the given node. + # Compile a NilNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_nil_node(node); end + + # Visit the child nodes of the given node. + # Compile a NoKeywordsParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_no_keywords_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedReferenceReadNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_numbered_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_optional_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OrNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_or_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParametersNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParenthesesNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_parentheses_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedExpressionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_pinned_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedVariableNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_pinned_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a PostExecutionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_post_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a PreExecutionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_pre_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a ProgramNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_program_node(node); end + + # Visit the child nodes of the given node. + # Compile a RangeNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_range_node(node); end + + # Visit the child nodes of the given node. + # Compile a RationalNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_rational_node(node); end + + # Visit the child nodes of the given node. + # Compile a RedoNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_redo_node(node); end + + # Visit the child nodes of the given node. + # Compile a RegularExpressionNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredDestructuredParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_required_destructured_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_required_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueModifierNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_rescue_modifier_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_rescue_node(node); end + + # Visit the child nodes of the given node. + # Compile a RestParameterNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RetryNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_retry_node(node); end + + # Visit the child nodes of the given node. + # Compile a ReturnNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_return_node(node); end + + # Visit the child nodes of the given node. + # Compile a SelfNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_self_node(node); end + + # Visit the child nodes of the given node. + # Compile a SingletonClassNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_singleton_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceEncodingNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_source_encoding_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceFileNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_source_file_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceLineNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_source_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a SplatNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StatementsNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringConcatNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_string_concat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a SuperNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a SymbolNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a TrueNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_true_node(node); end + + # Visit the child nodes of the given node. + # Compile a UndefNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_undef_node(node); end + + # Visit the child nodes of the given node. + # Compile a UnlessNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_unless_node(node); end + + # Visit the child nodes of the given node. + # Compile a UntilNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_until_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhenNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_when_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhileNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_while_node(node); end + + # Visit the child nodes of the given node. + # Compile a XStringNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a YieldNode node + # + # source://yarp//lib/prism/compiler.rb#38 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3396 +class Prism::ConstantAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://yarp//lib/prism/node.rb#3410 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3419 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3424 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3434 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3429 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantAndWriteNode + # + # source://yarp//lib/prism/node.rb#3439 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3424 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3453 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3462 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3398 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3401 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#3458 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3404 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3486 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3407 + def value; end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3495 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#3512 + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3522 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3527 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3537 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3532 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#3542 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3527 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3557 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3561 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3497 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3500 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#3509 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3503 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3586 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3506 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3595 +class Prism::ConstantOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://yarp//lib/prism/node.rb#3609 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3618 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3623 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3633 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3628 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOrWriteNode + # + # source://yarp//lib/prism/node.rb#3638 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3623 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3652 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3661 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#3597 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#3600 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#3657 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3603 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3685 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3606 + def value; end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3694 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://yarp//lib/prism/node.rb#3705 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3713 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3718 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3728 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3723 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathAndWriteNode + # + # source://yarp//lib/prism/node.rb#3733 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3718 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3746 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3755 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#3751 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3699 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3696 + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3779 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3702 + def value; end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3788 +class Prism::ConstantPathNode < ::Prism::Node + # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3799 + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3807 + def accept(visitor); end + + # attr_reader child: Node + # + # source://yarp//lib/prism/node.rb#3793 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3812 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3825 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3817 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3830 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3812 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3843 + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://yarp//lib/prism/node.rb#3848 + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://yarp//lib/prism/node.rb#3796 + def delimiter_loc; end + + # source://yarp//lib/prism/node.rb#3852 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://yarp//lib/prism/node.rb#3790 + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3880 + def type; end +end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3889 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#3903 + def initialize(target, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#3912 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3917 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#3927 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#3922 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#3932 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#3917 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#3946 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#3950 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#3900 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3894 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3891 + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#3975 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3897 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#3984 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://yarp//lib/prism/node.rb#3995 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4003 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4008 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4018 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4013 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOrWriteNode + # + # source://yarp//lib/prism/node.rb#4023 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4008 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4036 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4045 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#4041 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#3989 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://yarp//lib/prism/node.rb#3986 + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4069 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#3992 + def value; end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4078 +class Prism::ConstantPathTargetNode < ::Prism::Node + # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://yarp//lib/prism/node.rb#4089 + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4097 + def accept(visitor); end + + # attr_reader child: Node + # + # source://yarp//lib/prism/node.rb#4083 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4102 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4115 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4107 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathTargetNode + # + # source://yarp//lib/prism/node.rb#4120 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4102 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4133 + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://yarp//lib/prism/node.rb#4138 + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://yarp//lib/prism/node.rb#4086 + def delimiter_loc; end + + # source://yarp//lib/prism/node.rb#4142 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://yarp//lib/prism/node.rb#4080 + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4170 + def type; end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4185 +class Prism::ConstantPathWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://yarp//lib/prism/node.rb#4196 + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4204 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4209 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4219 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4214 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathWriteNode + # + # source://yarp//lib/prism/node.rb#4224 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4209 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4237 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4246 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#4242 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#4190 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://yarp//lib/prism/node.rb#4187 + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4270 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#4193 + def value; end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://yarp//lib/prism/node.rb#4279 +class Prism::ConstantReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://yarp//lib/prism/node.rb#4284 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4290 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4295 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4305 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4300 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantReadNode + # + # source://yarp//lib/prism/node.rb#4310 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4295 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4321 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4325 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#4281 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4345 + def type; end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://yarp//lib/prism/node.rb#4354 +class Prism::ConstantTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://yarp//lib/prism/node.rb#4359 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4365 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4370 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4380 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4375 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantTargetNode + # + # source://yarp//lib/prism/node.rb#4385 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4370 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4396 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4400 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#4356 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4420 + def type; end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4429 +class Prism::ConstantWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://yarp//lib/prism/node.rb#4443 + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4452 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4457 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4467 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4462 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantWriteNode + # + # source://yarp//lib/prism/node.rb#4472 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4457 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4486 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4495 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#4431 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#4434 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#4491 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#4440 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4519 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#4437 + def value; end +end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.new("[1]") +# +# Prism::ArrayNode.new( +# [ +# Prism::IntegerNode.new( +# Prism::IntegerBaseFlags::DECIMAL, +# Prism::Location.new(source, 1, 1), +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1) +# ) +# +# you could instead write: +# +# source = Prism::Source.new("[1]") +# +# ArrayNode( +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1))), +# Location(source, 0, 1), +# Location(source, 2, 1) +# ) +# +# This is mostly helpful in the context of writing tests, but can also be used +# to generate trees programmatically. +# +# source://yarp//lib/prism/dsl.rb#37 +module Prism::DSL + private + + # Create a new AliasGlobalVariableNode node + # + # source://yarp//lib/prism/dsl.rb#46 + def AliasGlobalVariableNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AliasMethodNode node + # + # source://yarp//lib/prism/dsl.rb#51 + def AliasMethodNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AlternationPatternNode node + # + # source://yarp//lib/prism/dsl.rb#56 + def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new AndNode node + # + # source://yarp//lib/prism/dsl.rb#61 + def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ArgumentsNode node + # + # source://yarp//lib/prism/dsl.rb#66 + def ArgumentsNode(arguments, location = T.unsafe(nil)); end + + # Create a new ArrayNode node + # + # source://yarp//lib/prism/dsl.rb#71 + def ArrayNode(elements, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ArrayPatternNode node + # + # source://yarp//lib/prism/dsl.rb#76 + def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new AssocNode node + # + # source://yarp//lib/prism/dsl.rb#81 + def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new AssocSplatNode node + # + # source://yarp//lib/prism/dsl.rb#86 + def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node + # + # source://yarp//lib/prism/dsl.rb#91 + def BackReferenceReadNode(location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # source://yarp//lib/prism/dsl.rb#96 + def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new BlockArgumentNode node + # + # source://yarp//lib/prism/dsl.rb#101 + def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node + # + # source://yarp//lib/prism/dsl.rb#106 + def BlockLocalVariableNode(name, location = T.unsafe(nil)); end + + # Create a new BlockNode node + # + # source://yarp//lib/prism/dsl.rb#111 + def BlockNode(locals, parameters, body, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BlockParameterNode node + # + # source://yarp//lib/prism/dsl.rb#116 + def BlockParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockParametersNode node + # + # source://yarp//lib/prism/dsl.rb#121 + def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BreakNode node + # + # source://yarp//lib/prism/dsl.rb#126 + def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new CallAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#131 + def CallAndWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallNode node + # + # source://yarp//lib/prism/dsl.rb#136 + def CallNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location = T.unsafe(nil)); end + + # Create a new CallOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#141 + def CallOperatorWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#146 + def CallOrWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CapturePatternNode node + # + # source://yarp//lib/prism/dsl.rb#151 + def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end + + # Create a new CaseNode node + # + # source://yarp//lib/prism/dsl.rb#156 + def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ClassNode node + # + # source://yarp//lib/prism/dsl.rb#161 + def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location = T.unsafe(nil)); end + + # Create a new ClassVariableAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#166 + def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#171 + def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#176 + def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node + # + # source://yarp//lib/prism/dsl.rb#181 + def ClassVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node + # + # source://yarp//lib/prism/dsl.rb#186 + def ClassVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node + # + # source://yarp//lib/prism/dsl.rb#191 + def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#196 + def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#201 + def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#206 + def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#211 + def ConstantPathAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathNode node + # + # source://yarp//lib/prism/dsl.rb#216 + def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#221 + def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#226 + def ConstantPathOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node + # + # source://yarp//lib/prism/dsl.rb#231 + def ConstantPathTargetNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node + # + # source://yarp//lib/prism/dsl.rb#236 + def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantReadNode node + # + # source://yarp//lib/prism/dsl.rb#241 + def ConstantReadNode(name, location = T.unsafe(nil)); end + + # Create a new ConstantTargetNode node + # + # source://yarp//lib/prism/dsl.rb#246 + def ConstantTargetNode(name, location = T.unsafe(nil)); end + + # Create a new ConstantWriteNode node + # + # source://yarp//lib/prism/dsl.rb#251 + def ConstantWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new DefNode node + # + # source://yarp//lib/prism/dsl.rb#256 + def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new DefinedNode node + # + # source://yarp//lib/prism/dsl.rb#261 + def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new ElseNode node + # + # source://yarp//lib/prism/dsl.rb#266 + def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node + # + # source://yarp//lib/prism/dsl.rb#271 + def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node + # + # source://yarp//lib/prism/dsl.rb#276 + def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end + + # Create a new EnsureNode node + # + # source://yarp//lib/prism/dsl.rb#281 + def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new FalseNode node + # + # source://yarp//lib/prism/dsl.rb#286 + def FalseNode(location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # source://yarp//lib/prism/dsl.rb#291 + def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new FlipFlopNode node + # + # source://yarp//lib/prism/dsl.rb#296 + def FlipFlopNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new FloatNode node + # + # source://yarp//lib/prism/dsl.rb#301 + def FloatNode(location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # source://yarp//lib/prism/dsl.rb#306 + def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ForwardingArgumentsNode node + # + # source://yarp//lib/prism/dsl.rb#311 + def ForwardingArgumentsNode(location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # source://yarp//lib/prism/dsl.rb#316 + def ForwardingParameterNode(location = T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node + # + # source://yarp//lib/prism/dsl.rb#321 + def ForwardingSuperNode(block, location = T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#326 + def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#331 + def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#336 + def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node + # + # source://yarp//lib/prism/dsl.rb#341 + def GlobalVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node + # + # source://yarp//lib/prism/dsl.rb#346 + def GlobalVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node + # + # source://yarp//lib/prism/dsl.rb#351 + def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new HashNode node + # + # source://yarp//lib/prism/dsl.rb#356 + def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end + + # Create a new HashPatternNode node + # + # source://yarp//lib/prism/dsl.rb#361 + def HashPatternNode(constant, assocs, kwrest, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new IfNode node + # + # source://yarp//lib/prism/dsl.rb#366 + def IfNode(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ImaginaryNode node + # + # source://yarp//lib/prism/dsl.rb#371 + def ImaginaryNode(numeric, location = T.unsafe(nil)); end + + # Create a new ImplicitNode node + # + # source://yarp//lib/prism/dsl.rb#376 + def ImplicitNode(value, location = T.unsafe(nil)); end + + # Create a new InNode node + # + # source://yarp//lib/prism/dsl.rb#381 + def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#386 + def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#391 + def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#396 + def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node + # + # source://yarp//lib/prism/dsl.rb#401 + def InstanceVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node + # + # source://yarp//lib/prism/dsl.rb#406 + def InstanceVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node + # + # source://yarp//lib/prism/dsl.rb#411 + def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new IntegerNode node + # + # source://yarp//lib/prism/dsl.rb#416 + def IntegerNode(flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node + # + # source://yarp//lib/prism/dsl.rb#421 + def InterpolatedMatchLastLineNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node + # + # source://yarp//lib/prism/dsl.rb#426 + def InterpolatedRegularExpressionNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node + # + # source://yarp//lib/prism/dsl.rb#431 + def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedSymbolNode node + # + # source://yarp//lib/prism/dsl.rb#436 + def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node + # + # source://yarp//lib/prism/dsl.rb#441 + def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new KeywordHashNode node + # + # source://yarp//lib/prism/dsl.rb#446 + def KeywordHashNode(elements, location = T.unsafe(nil)); end + + # Create a new KeywordParameterNode node + # + # source://yarp//lib/prism/dsl.rb#451 + def KeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end + + # Create a new KeywordRestParameterNode node + # + # source://yarp//lib/prism/dsl.rb#456 + def KeywordRestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new LambdaNode node + # + # source://yarp//lib/prism/dsl.rb#461 + def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, location = T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node + # + # source://yarp//lib/prism/dsl.rb#466 + def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/dsl.rb#471 + def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node + # + # source://yarp//lib/prism/dsl.rb#476 + def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node + # + # source://yarp//lib/prism/dsl.rb#481 + def LocalVariableReadNode(name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node + # + # source://yarp//lib/prism/dsl.rb#486 + def LocalVariableTargetNode(name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node + # + # source://yarp//lib/prism/dsl.rb#491 + def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new Location object + # + # source://yarp//lib/prism/dsl.rb#41 + def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + + # Create a new MatchLastLineNode node + # + # source://yarp//lib/prism/dsl.rb#496 + def MatchLastLineNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end + + # Create a new MatchPredicateNode node + # + # source://yarp//lib/prism/dsl.rb#501 + def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchRequiredNode node + # + # source://yarp//lib/prism/dsl.rb#506 + def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchWriteNode node + # + # source://yarp//lib/prism/dsl.rb#511 + def MatchWriteNode(call, locals, location = T.unsafe(nil)); end + + # Create a new MissingNode node + # + # source://yarp//lib/prism/dsl.rb#516 + def MissingNode(location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # source://yarp//lib/prism/dsl.rb#521 + def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = T.unsafe(nil)); end + + # Create a new MultiTargetNode node + # + # source://yarp//lib/prism/dsl.rb#526 + def MultiTargetNode(targets, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new MultiWriteNode node + # + # source://yarp//lib/prism/dsl.rb#531 + def MultiWriteNode(targets, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new NextNode node + # + # source://yarp//lib/prism/dsl.rb#536 + def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NilNode node + # + # source://yarp//lib/prism/dsl.rb#541 + def NilNode(location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # source://yarp//lib/prism/dsl.rb#546 + def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # source://yarp//lib/prism/dsl.rb#551 + def NumberedReferenceReadNode(number, location = T.unsafe(nil)); end + + # Create a new OptionalParameterNode node + # + # source://yarp//lib/prism/dsl.rb#556 + def OptionalParameterNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new OrNode node + # + # source://yarp//lib/prism/dsl.rb#561 + def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ParametersNode node + # + # source://yarp//lib/prism/dsl.rb#566 + def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = T.unsafe(nil)); end + + # Create a new ParenthesesNode node + # + # source://yarp//lib/prism/dsl.rb#571 + def ParenthesesNode(body, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node + # + # source://yarp//lib/prism/dsl.rb#576 + def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new PinnedVariableNode node + # + # source://yarp//lib/prism/dsl.rb#581 + def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end + + # Create a new PostExecutionNode node + # + # source://yarp//lib/prism/dsl.rb#586 + def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PreExecutionNode node + # + # source://yarp//lib/prism/dsl.rb#591 + def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ProgramNode node + # + # source://yarp//lib/prism/dsl.rb#596 + def ProgramNode(locals, statements, location = T.unsafe(nil)); end + + # Create a new RangeNode node + # + # source://yarp//lib/prism/dsl.rb#601 + def RangeNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new RationalNode node + # + # source://yarp//lib/prism/dsl.rb#606 + def RationalNode(numeric, location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # source://yarp//lib/prism/dsl.rb#611 + def RedoNode(location = T.unsafe(nil)); end + + # Create a new RegularExpressionNode node + # + # source://yarp//lib/prism/dsl.rb#616 + def RegularExpressionNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end + + # Create a new RequiredDestructuredParameterNode node + # + # source://yarp//lib/prism/dsl.rb#621 + def RequiredDestructuredParameterNode(parameters, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new RequiredParameterNode node + # + # source://yarp//lib/prism/dsl.rb#626 + def RequiredParameterNode(name, location = T.unsafe(nil)); end + + # Create a new RescueModifierNode node + # + # source://yarp//lib/prism/dsl.rb#631 + def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end + + # Create a new RescueNode node + # + # source://yarp//lib/prism/dsl.rb#636 + def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = T.unsafe(nil)); end + + # Create a new RestParameterNode node + # + # source://yarp//lib/prism/dsl.rb#641 + def RestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new RetryNode node + # + # source://yarp//lib/prism/dsl.rb#646 + def RetryNode(location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # source://yarp//lib/prism/dsl.rb#651 + def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end + + # Create a new SelfNode node + # + # source://yarp//lib/prism/dsl.rb#656 + def SelfNode(location = T.unsafe(nil)); end + + # Create a new SingletonClassNode node + # + # source://yarp//lib/prism/dsl.rb#661 + def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new SourceEncodingNode node + # + # source://yarp//lib/prism/dsl.rb#666 + def SourceEncodingNode(location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # source://yarp//lib/prism/dsl.rb#671 + def SourceFileNode(filepath, location = T.unsafe(nil)); end + + # Create a new SourceLineNode node + # + # source://yarp//lib/prism/dsl.rb#676 + def SourceLineNode(location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # source://yarp//lib/prism/dsl.rb#681 + def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end + + # Create a new StatementsNode node + # + # source://yarp//lib/prism/dsl.rb#686 + def StatementsNode(body, location = T.unsafe(nil)); end + + # Create a new StringConcatNode node + # + # source://yarp//lib/prism/dsl.rb#691 + def StringConcatNode(left, right, location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # source://yarp//lib/prism/dsl.rb#696 + def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new SuperNode node + # + # source://yarp//lib/prism/dsl.rb#701 + def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = T.unsafe(nil)); end + + # Create a new SymbolNode node + # + # source://yarp//lib/prism/dsl.rb#706 + def SymbolNode(opening_loc, value_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new TrueNode node + # + # source://yarp//lib/prism/dsl.rb#711 + def TrueNode(location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # source://yarp//lib/prism/dsl.rb#716 + def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end + + # Create a new UnlessNode node + # + # source://yarp//lib/prism/dsl.rb#721 + def UnlessNode(keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new UntilNode node + # + # source://yarp//lib/prism/dsl.rb#726 + def UntilNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new WhenNode node + # + # source://yarp//lib/prism/dsl.rb#731 + def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end + + # Create a new WhileNode node + # + # source://yarp//lib/prism/dsl.rb#736 + def WhileNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new XStringNode node + # + # source://yarp//lib/prism/dsl.rb#741 + def XStringNode(opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new YieldNode node + # + # source://yarp//lib/prism/dsl.rb#746 + def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, location = T.unsafe(nil)); end +end + +# This module is used for testing and debugging and is not meant to be used by +# consumers of this library. +# +# source://yarp//lib/prism/debug.rb#6 +module Prism::Debug + class << self + # For the given source, compiles with CRuby and returns a list of all of the + # sets of local variables that were encountered. + # + # source://yarp//lib/prism/debug.rb#47 + def cruby_locals(source); end + + def memsize(_arg0); end + def named_captures(_arg0); end + + # source://yarp//lib/prism/debug.rb#149 + def newlines(source); end + + # source://yarp//lib/prism/debug.rb#153 + def parse_serialize_file(filepath); end + + def parse_serialize_file_metadata(_arg0, _arg1); end + + # For the given source, parses with prism and returns a list of all of the + # sets of local variables that were encountered. + # + # source://yarp//lib/prism/debug.rb#82 + def prism_locals(source); end + + def profile_file(_arg0); end + def unescape_all(_arg0); end + def unescape_minimal(_arg0); end + def unescape_none(_arg0); end + def unescape_whitespace(_arg0); end + end +end + +# source://yarp//lib/prism/debug.rb#7 +class Prism::Debug::ISeq + # @return [ISeq] a new instance of ISeq + # + # source://yarp//lib/prism/debug.rb#10 + def initialize(parts); end + + # source://yarp//lib/prism/debug.rb#26 + def each_child; end + + # source://yarp//lib/prism/debug.rb#22 + def instructions; end + + # source://yarp//lib/prism/debug.rb#18 + def local_table; end + + # Returns the value of attribute parts. + # + # source://yarp//lib/prism/debug.rb#8 + def parts; end + + # source://yarp//lib/prism/debug.rb#14 + def type; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4529 +class Prism::DefNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [DefNode] a new instance of DefNode + # + # source://yarp//lib/prism/node.rb#4567 + def initialize(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4584 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#4543 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4589 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4603 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4594 + def compact_child_nodes; end + + # def copy: (**params) -> DefNode + # + # source://yarp//lib/prism/node.rb#4608 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4589 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4630 + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#4635 + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#4549 + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#4660 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#4564 + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://yarp//lib/prism/node.rb#4655 + def equal; end + + # attr_reader equal_loc: Location? + # + # source://yarp//lib/prism/node.rb#4561 + def equal_loc; end + + # source://yarp//lib/prism/node.rb#4664 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#4546 + def locals; end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#4645 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#4555 + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#4531 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#4534 + def name_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/prism/node.rb#4640 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#4552 + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://yarp//lib/prism/node.rb#4540 + def parameters; end + + # attr_reader receiver: Node? + # + # source://yarp//lib/prism/node.rb#4537 + def receiver; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#4650 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#4558 + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4710 + def type; end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4719 +class Prism::DefinedNode < ::Prism::Node + # def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://yarp//lib/prism/node.rb#4733 + def initialize(lparen_loc, value, rparen_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4742 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4747 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4757 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4752 + def compact_child_nodes; end + + # def copy: (**params) -> DefinedNode + # + # source://yarp//lib/prism/node.rb#4762 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4747 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4776 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#4795 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#4791 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#4730 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#4781 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#4721 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#4786 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#4727 + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4819 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#4724 + def value; end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# source://yarp//lib/prism/desugar_compiler.rb#6 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#12 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://yarp//lib/prism/desugar_compiler.rb#30 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#21 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#39 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://yarp//lib/prism/desugar_compiler.rb#57 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#48 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#66 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://yarp//lib/prism/desugar_compiler.rb#84 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#75 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://yarp//lib/prism/desugar_compiler.rb#93 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://yarp//lib/prism/desugar_compiler.rb#111 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://yarp//lib/prism/desugar_compiler.rb#102 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#120 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://yarp//lib/prism/desugar_compiler.rb#138 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://yarp//lib/prism/desugar_compiler.rb#129 + def visit_local_variable_or_write_node(node); end + + private + + # Desugar `x &&= y` to `x && x = y` + # + # source://yarp//lib/prism/desugar_compiler.rb#145 + def desugar_and_write_node(node, read_class, write_class, *arguments); end + + # Desugar `x += y` to `x = x + y` + # + # source://yarp//lib/prism/desugar_compiler.rb#155 + def desugar_operator_write_node(node, read_class, write_class, *arguments); end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://yarp//lib/prism/desugar_compiler.rb#187 + def desugar_or_write_defined_node(node, read_class, write_class, *arguments); end + + # Desugar `x ||= y` to `x || x = y` + # + # source://yarp//lib/prism/desugar_compiler.rb#177 + def desugar_or_write_node(node, read_class, write_class, *arguments); end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# dispatcher = Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# source://yarp//lib/prism/dispatcher.rb#40 +class Prism::Dispatcher < ::Prism::Visitor + # @return [Dispatcher] a new instance of Dispatcher + # + # source://yarp//lib/prism/dispatcher.rb#44 + def initialize; end + + # Walks `root` dispatching events to all registered listeners + # + # def dispatch: (Node) -> void + # + # source://yarp//lib/prism/visitor.rb#14 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners + # + # def dispatch_once: (Node) -> void + # + # source://yarp//lib/prism/dispatcher.rb#63 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # source://yarp//lib/prism/dispatcher.rb#42 + def listeners; end + + # Register a listener for one or more events + # + # def register: (Listener, *Symbol) -> void + # + # source://yarp//lib/prism/dispatcher.rb#51 + def register(listener, *events); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#69 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#77 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#85 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#93 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#101 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#109 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#117 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#125 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#133 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#141 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#149 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#157 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#165 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#173 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#181 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#189 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#197 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#205 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#213 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#221 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#229 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#237 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#245 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#253 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#261 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#269 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#277 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#285 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#293 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#301 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#309 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#317 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#325 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#333 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#341 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#349 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#357 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#365 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#373 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#381 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#389 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#397 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#405 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#413 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#421 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#429 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#437 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#445 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#453 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#461 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#469 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#477 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#485 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#493 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#501 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#509 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#517 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#525 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#533 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#541 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#549 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#557 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#565 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#573 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#581 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#589 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#597 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#605 + def visit_in_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#613 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#621 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#629 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#637 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#645 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#653 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#661 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#669 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#677 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#685 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#693 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#701 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#709 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#717 + def visit_keyword_parameter_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#725 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#733 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#741 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#749 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#757 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#765 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#773 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#781 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#789 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#797 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#805 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#813 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#821 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#829 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#837 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#845 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#853 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#861 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#869 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#877 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#885 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#893 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#901 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#909 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#917 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#925 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#933 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#941 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#949 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#957 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#965 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#973 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#981 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredDestructuredParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#989 + def visit_required_destructured_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#997 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1005 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1013 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1021 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1029 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1037 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1045 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1053 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1061 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1069 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1077 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1085 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1093 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringConcatNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1101 + def visit_string_concat_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1109 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1117 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1125 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1133 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1141 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1149 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1157 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1165 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1173 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1181 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes and continue + # walking the tree. + # + # source://yarp//lib/prism/dispatcher.rb#1189 + def visit_yield_node(node); end +end + +# source://yarp//lib/prism/dispatcher.rb#1195 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://yarp//lib/prism/dispatcher.rb#1198 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://yarp//lib/prism/dispatcher.rb#1196 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1203 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1209 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1215 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1221 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1227 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1233 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1239 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1245 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1251 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1257 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1263 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1269 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1275 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1281 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1287 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1293 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1299 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1305 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1311 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1317 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1323 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1329 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1335 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1341 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1347 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1353 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1359 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1365 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1371 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1377 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1383 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1389 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1395 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1401 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1407 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1413 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1419 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1425 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1431 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1437 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1443 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1449 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1455 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1461 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1467 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1473 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1479 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1485 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1491 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1497 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1503 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1509 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1515 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1521 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1527 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1533 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1539 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1545 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1551 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1557 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1563 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1569 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1575 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1581 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1587 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1593 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1599 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1605 + def visit_in_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1611 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1617 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1623 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1629 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1635 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1641 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1647 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1653 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1659 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1665 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1671 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1677 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1683 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1689 + def visit_keyword_parameter_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1695 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1701 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1707 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1713 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1719 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1725 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1731 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1737 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1743 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1749 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1755 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1761 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1767 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1773 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1779 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1785 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1791 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1797 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1803 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1809 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1815 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1821 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1827 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1833 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1839 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1845 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1851 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1857 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1863 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1869 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1875 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1881 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1887 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredDestructuredParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1893 + def visit_required_destructured_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1899 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1905 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1911 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1917 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1923 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1929 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1935 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1941 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1947 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1953 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1959 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1965 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1971 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringConcatNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1977 + def visit_string_concat_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1983 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1989 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#1995 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2001 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2007 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2013 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2019 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2025 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2031 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2037 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://yarp//lib/prism/dispatcher.rb#2043 + def visit_yield_node(node); end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#4828 +class Prism::ElseNode < ::Prism::Node + # def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [ElseNode] a new instance of ElseNode + # + # source://yarp//lib/prism/node.rb#4839 + def initialize(else_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4847 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4852 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4864 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4857 + def compact_child_nodes; end + + # def copy: (**params) -> ElseNode + # + # source://yarp//lib/prism/node.rb#4869 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4852 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4882 + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#4887 + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#4830 + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#4892 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#4836 + def end_keyword_loc; end + + # source://yarp//lib/prism/node.rb#4896 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#4833 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#4923 + def type; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#4932 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://yarp//lib/prism/node.rb#4943 + def initialize(opening_loc, statements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#4951 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4956 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#4996 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#4940 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#4968 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#4961 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedStatementsNode + # + # source://yarp//lib/prism/node.rb#4973 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#4956 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#4986 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5000 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#4991 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#4934 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#4937 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5027 + def type; end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#5036 +class Prism::EmbeddedVariableNode < ::Prism::Node + # def initialize: (operator_loc: Location, variable: Node, location: Location) -> void + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://yarp//lib/prism/node.rb#5044 + def initialize(operator_loc, variable, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5051 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5056 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5066 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5061 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedVariableNode + # + # source://yarp//lib/prism/node.rb#5071 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5056 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5083 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5092 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#5088 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#5038 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5114 + def type; end + + # attr_reader variable: Node + # + # source://yarp//lib/prism/node.rb#5041 + def variable; end +end + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://yarp//lib/prism/node.rb#5127 +class Prism::EnsureNode < ::Prism::Node + # def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://yarp//lib/prism/node.rb#5138 + def initialize(ensure_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5146 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5151 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5163 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5156 + def compact_child_nodes; end + + # def copy: (**params) -> EnsureNode + # + # source://yarp//lib/prism/node.rb#5168 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5151 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5181 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5191 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5135 + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5186 + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5129 + def ensure_keyword_loc; end + + # source://yarp//lib/prism/node.rb#5195 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#5132 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5222 + def type; end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#5231 +class Prism::FalseNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [FalseNode] a new instance of FalseNode + # + # source://yarp//lib/prism/node.rb#5233 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5238 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5243 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5253 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5248 + def compact_child_nodes; end + + # def copy: (**params) -> FalseNode + # + # source://yarp//lib/prism/node.rb#5258 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5243 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5268 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5272 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5291 + def type; end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#5306 +class Prism::FindPatternNode < ::Prism::Node + # def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://yarp//lib/prism/node.rb#5326 + def initialize(constant, left, requireds, right, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5337 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5342 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#5388 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#5323 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5357 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5347 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://yarp//lib/prism/node.rb#5308 + def constant; end + + # def copy: (**params) -> FindPatternNode + # + # source://yarp//lib/prism/node.rb#5362 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5342 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5378 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5392 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#5311 + def left; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#5383 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#5320 + def opening_loc; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/prism/node.rb#5314 + def requireds; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#5317 + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5424 + def type; end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#5433 +class Prism::FlipFlopNode < ::Prism::Node + # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://yarp//lib/prism/node.rb#5447 + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5456 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5461 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5474 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5466 + def compact_child_nodes; end + + # def copy: (**params) -> FlipFlopNode + # + # source://yarp//lib/prism/node.rb#5479 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5461 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5493 + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#5503 + def exclude_end?; end + + # source://yarp//lib/prism/node.rb#5507 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://yarp//lib/prism/node.rb#5435 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#5498 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#5441 + def operator_loc; end + + # attr_reader right: Node? + # + # source://yarp//lib/prism/node.rb#5438 + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5541 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#5444 + def flags; end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://yarp//lib/prism/node.rb#5550 +class Prism::FloatNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # source://yarp//lib/prism/node.rb#5552 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5557 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5562 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5572 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5567 + def compact_child_nodes; end + + # def copy: (**params) -> FloatNode + # + # source://yarp//lib/prism/node.rb#5577 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5562 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5587 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5591 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5610 + def type; end + + # Returns the value of the node as a Ruby Float. + # + # source://yarp//lib/prism/node_ext.rb#8 + def value; end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#5619 +class Prism::ForNode < ::Prism::Node + # def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void + # + # @return [ForNode] a new instance of ForNode + # + # source://yarp//lib/prism/node.rb#5642 + def initialize(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5654 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5659 + def child_nodes; end + + # attr_reader collection: Node + # + # source://yarp//lib/prism/node.rb#5624 + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5673 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5664 + def compact_child_nodes; end + + # def copy: (**params) -> ForNode + # + # source://yarp//lib/prism/node.rb#5678 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5659 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5695 + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#5710 + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#5636 + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5715 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5639 + def end_keyword_loc; end + + # def for_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5700 + def for_keyword; end + + # attr_reader for_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5630 + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#5705 + def in_keyword; end + + # attr_reader in_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#5633 + def in_keyword_loc; end + + # attr_reader index: Node + # + # source://yarp//lib/prism/node.rb#5621 + def index; end + + # source://yarp//lib/prism/node.rb#5719 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#5627 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5752 + def type; end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#5763 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://yarp//lib/prism/node.rb#5765 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5770 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5775 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5785 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5780 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingArgumentsNode + # + # source://yarp//lib/prism/node.rb#5790 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5775 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5800 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5804 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5823 + def type; end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://yarp//lib/prism/node.rb#5833 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://yarp//lib/prism/node.rb#5835 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5840 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5845 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5855 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5850 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingParameterNode + # + # source://yarp//lib/prism/node.rb#5860 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5845 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5870 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5874 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5893 + def type; end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#5902 +class Prism::ForwardingSuperNode < ::Prism::Node + # def initialize: (block: BlockNode?, location: Location) -> void + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://yarp//lib/prism/node.rb#5907 + def initialize(block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#5913 + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://yarp//lib/prism/node.rb#5904 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5918 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#5930 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#5923 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingSuperNode + # + # source://yarp//lib/prism/node.rb#5935 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#5918 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#5946 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#5950 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#5975 + def type; end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#5984 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#5998 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6007 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6012 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6022 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6017 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#6027 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6012 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6041 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6050 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#5986 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#5989 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#6046 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#5992 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6074 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#5995 + def value; end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6083 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#6100 + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6110 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6115 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6125 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6120 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#6130 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6115 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6145 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6149 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6085 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#6088 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#6097 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#6091 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6174 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#6094 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6183 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#6197 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6206 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6211 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6221 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6216 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#6226 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6211 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6240 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6249 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6185 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#6188 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#6245 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#6191 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6273 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#6194 + def value; end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://yarp//lib/prism/node.rb#6282 +class Prism::GlobalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://yarp//lib/prism/node.rb#6287 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6293 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6298 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6308 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6303 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableReadNode + # + # source://yarp//lib/prism/node.rb#6313 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6298 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6324 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6328 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6284 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6348 + def type; end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://yarp//lib/prism/node.rb#6357 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://yarp//lib/prism/node.rb#6362 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6368 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6373 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6383 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6378 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableTargetNode + # + # source://yarp//lib/prism/node.rb#6388 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6373 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6399 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6403 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6359 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6423 + def type; end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6432 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://yarp//lib/prism/node.rb#6446 + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6455 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6460 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6470 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6465 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableWriteNode + # + # source://yarp//lib/prism/node.rb#6475 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6460 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6489 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6498 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#6434 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#6437 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#6494 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#6443 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6522 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#6440 + def value; end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6531 +class Prism::HashNode < ::Prism::Node + # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void + # + # @return [HashNode] a new instance of HashNode + # + # source://yarp//lib/prism/node.rb#6542 + def initialize(opening_loc, elements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6550 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6555 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#6593 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#6539 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6565 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6560 + def compact_child_nodes; end + + # def copy: (**params) -> HashNode + # + # source://yarp//lib/prism/node.rb#6570 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6555 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6583 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/prism/node.rb#6536 + def elements; end + + # source://yarp//lib/prism/node.rb#6597 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#6588 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#6533 + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6619 + def type; end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6631 +class Prism::HashPatternNode < ::Prism::Node + # def initialize: (constant: Node?, assocs: Array[Node], kwrest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://yarp//lib/prism/node.rb#6648 + def initialize(constant, assocs, kwrest, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6658 + def accept(visitor); end + + # attr_reader assocs: Array[Node] + # + # source://yarp//lib/prism/node.rb#6636 + def assocs; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6663 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#6707 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#6645 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6677 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6668 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://yarp//lib/prism/node.rb#6633 + def constant; end + + # def copy: (**params) -> HashPatternNode + # + # source://yarp//lib/prism/node.rb#6682 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6663 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6697 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6711 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader kwrest: Node? + # + # source://yarp//lib/prism/node.rb#6639 + def kwrest; end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#6702 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#6642 + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6745 + def type; end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#6757 +class Prism::IfNode < ::Prism::Node + # def initialize: (if_keyword_loc: Location?, predicate: Node, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [IfNode] a new instance of IfNode + # + # source://yarp//lib/prism/node.rb#6774 + def initialize(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6784 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6793 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6807 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6798 + def compact_child_nodes; end + + # attr_reader consequent: Node? + # + # source://yarp//lib/prism/node.rb#6768 + def consequent; end + + # def copy: (**params) -> IfNode + # + # source://yarp//lib/prism/node.rb#6812 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6793 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6827 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#6837 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#6771 + def end_keyword_loc; end + + # def if_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#6832 + def if_keyword; end + + # attr_reader if_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#6759 + def if_keyword_loc; end + + # source://yarp//lib/prism/node.rb#6841 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node + # + # source://yarp//lib/prism/node.rb#6762 + def predicate; end + + # source://yarp//lib/prism/node.rb#6788 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#6765 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6876 + def type; end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://yarp//lib/prism/node.rb#6885 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://yarp//lib/prism/node.rb#6890 + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6896 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6901 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6911 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6906 + def compact_child_nodes; end + + # def copy: (**params) -> ImaginaryNode + # + # source://yarp//lib/prism/node.rb#6916 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6901 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#6927 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#6931 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://yarp//lib/prism/node.rb#6887 + def numeric; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#6952 + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://yarp//lib/prism/node_ext.rb#15 + def value; end +end + +# Represents a node that is implicitly being added to the tree but doesn't +# correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# source://yarp//lib/prism/node.rb#6965 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (value: Node, location: Location) -> void + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://yarp//lib/prism/node.rb#6970 + def initialize(value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#6976 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6981 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#6991 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#6986 + def compact_child_nodes; end + + # def copy: (**params) -> ImplicitNode + # + # source://yarp//lib/prism/node.rb#6996 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#6981 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7007 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7011 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7032 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#6967 + def value; end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7041 +class Prism::InNode < ::Prism::Node + # def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void + # + # @return [InNode] a new instance of InNode + # + # source://yarp//lib/prism/node.rb#7055 + def initialize(pattern, statements, in_loc, then_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7064 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7069 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7082 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7074 + def compact_child_nodes; end + + # def copy: (**params) -> InNode + # + # source://yarp//lib/prism/node.rb#7087 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7069 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7101 + def deconstruct_keys(keys); end + + # def in: () -> String + # + # source://yarp//lib/prism/node.rb#7106 + def in; end + + # attr_reader in_loc: Location + # + # source://yarp//lib/prism/node.rb#7049 + def in_loc; end + + # source://yarp//lib/prism/node.rb#7115 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader pattern: Node + # + # source://yarp//lib/prism/node.rb#7043 + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#7046 + def statements; end + + # def then: () -> String? + # + # source://yarp//lib/prism/node.rb#7111 + def then; end + + # attr_reader then_loc: Location? + # + # source://yarp//lib/prism/node.rb#7052 + def then_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7144 + def type; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7153 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#7167 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7176 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7181 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7191 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7186 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#7196 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7181 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7210 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7219 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7155 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#7158 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#7215 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#7161 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7243 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#7164 + def value; end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7252 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#7269 + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7279 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7284 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7294 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7289 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#7299 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7284 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7314 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7318 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7254 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#7257 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#7266 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#7260 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7343 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#7263 + def value; end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7352 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#7366 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7375 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7380 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7390 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7385 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#7395 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7380 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7409 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7418 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7354 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#7357 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#7414 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#7360 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7442 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#7363 + def value; end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://yarp//lib/prism/node.rb#7451 +class Prism::InstanceVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://yarp//lib/prism/node.rb#7456 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7462 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7467 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7477 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7472 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableReadNode + # + # source://yarp//lib/prism/node.rb#7482 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7467 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7493 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7497 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7453 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7517 + def type; end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://yarp//lib/prism/node.rb#7526 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://yarp//lib/prism/node.rb#7531 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7537 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7542 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7552 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7547 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableTargetNode + # + # source://yarp//lib/prism/node.rb#7557 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7542 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7568 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7572 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7528 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7592 + def type; end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7601 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://yarp//lib/prism/node.rb#7615 + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7624 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7629 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7639 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7634 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableWriteNode + # + # source://yarp//lib/prism/node.rb#7644 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7629 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7658 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#7667 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#7603 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#7606 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#7663 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#7612 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7691 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#7609 + def value; end +end + +# source://yarp//lib/prism/node.rb#14486 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://yarp//lib/prism/node.rb#14488 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://yarp//lib/prism/node.rb#14494 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://yarp//lib/prism/node.rb#14497 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://yarp//lib/prism/node.rb#14491 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://yarp//lib/prism/node.rb#7700 +class Prism::IntegerNode < ::Prism::Node + # def initialize: (flags: Integer, location: Location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://yarp//lib/prism/node.rb#7705 + def initialize(flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7711 + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7747 + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7716 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7726 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7721 + def compact_child_nodes; end + + # def copy: (**params) -> IntegerNode + # + # source://yarp//lib/prism/node.rb#7731 + def copy(**params); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7757 + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7716 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7742 + def deconstruct_keys(keys); end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7762 + def hexadecimal?; end + + # source://yarp//lib/prism/node.rb#7766 + def inspect(inspector = T.unsafe(nil)); end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7752 + def octal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7787 + def type; end + + # Returns the value of the node as a Ruby Integer. + # + # source://yarp//lib/prism/node_ext.rb#22 + def value; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#7702 + def flags; end +end + +# Represents a regular expression literal that contains interpolation that +# is being used in the predicate of a conditional to implicitly match +# against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7798 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://yarp//lib/prism/node.rb#7812 + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7821 + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7895 + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7831 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#7870 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#7806 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7841 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7836 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedMatchLastLineNode + # + # source://yarp//lib/prism/node.rb#7846 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7831 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#7860 + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7890 + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7880 + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7875 + def ignore_case?; end + + # source://yarp//lib/prism/node.rb#7914 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7885 + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7910 + def once?; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#7865 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#7800 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#7803 + def parts; end + + # source://yarp//lib/prism/node.rb#7825 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#7938 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7905 + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#7900 + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#7809 + def flags; end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#7947 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://yarp//lib/prism/node.rb#7961 + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#7970 + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8044 + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7980 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#8019 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#7955 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#7990 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#7985 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedRegularExpressionNode + # + # source://yarp//lib/prism/node.rb#7995 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#7980 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8009 + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8039 + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8029 + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8024 + def ignore_case?; end + + # source://yarp//lib/prism/node.rb#8063 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8034 + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8059 + def once?; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#8014 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#7949 + def opening_loc; end + + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://yarp//lib/prism/node_ext.rb#30 + def options; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#7952 + def parts; end + + # source://yarp//lib/prism/node.rb#7974 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8087 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8054 + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#8049 + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#7958 + def flags; end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8096 +class Prism::InterpolatedStringNode < ::Prism::Node + # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://yarp//lib/prism/node.rb#8107 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8115 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8125 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#8163 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#8104 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8135 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8130 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedStringNode + # + # source://yarp//lib/prism/node.rb#8140 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8125 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8153 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8167 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#8158 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#8098 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#8101 + def parts; end + + # source://yarp//lib/prism/node.rb#8119 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8189 + def type; end +end + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8198 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://yarp//lib/prism/node.rb#8209 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8217 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8227 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#8265 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#8206 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8237 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8232 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedSymbolNode + # + # source://yarp//lib/prism/node.rb#8242 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8227 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8255 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8269 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#8260 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#8200 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#8203 + def parts; end + + # source://yarp//lib/prism/node.rb#8221 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8291 + def type; end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8300 +class Prism::InterpolatedXStringNode < ::Prism::Node + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://yarp//lib/prism/node.rb#8311 + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8319 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8329 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#8367 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#8308 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8339 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8334 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedXStringNode + # + # source://yarp//lib/prism/node.rb#8344 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8329 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8357 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8371 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#8362 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#8302 + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://yarp//lib/prism/node.rb#8305 + def parts; end + + # source://yarp//lib/prism/node.rb#8323 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8393 + def type; end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://yarp//lib/prism/node.rb#8402 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (elements: Array[Node], location: Location) -> void + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://yarp//lib/prism/node.rb#8407 + def initialize(elements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8413 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8418 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8428 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8423 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordHashNode + # + # source://yarp//lib/prism/node.rb#8433 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8418 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8444 + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://yarp//lib/prism/node.rb#8404 + def elements; end + + # source://yarp//lib/prism/node.rb#8448 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8468 + def type; end +end + +# Represents a keyword parameter to a method, block, or lambda definition. +# +# def a(b:) +# ^^ +# end +# +# def a(b: 1) +# ^^^^ +# end +# +# source://yarp//lib/prism/node.rb#8482 +class Prism::KeywordParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node?, location: Location) -> void + # + # @return [KeywordParameterNode] a new instance of KeywordParameterNode + # + # source://yarp//lib/prism/node.rb#8493 + def initialize(name, name_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8501 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8506 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8518 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8511 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordParameterNode + # + # source://yarp//lib/prism/node.rb#8523 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8506 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8536 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8540 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#8484 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#8487 + def name_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8567 + def type; end + + # attr_reader value: Node? + # + # source://yarp//lib/prism/node.rb#8490 + def value; end +end + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://yarp//lib/prism/node.rb#8577 +class Prism::KeywordRestParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://yarp//lib/prism/node.rb#8588 + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8596 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8601 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8611 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8606 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordRestParameterNode + # + # source://yarp//lib/prism/node.rb#8616 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8601 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8629 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8638 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://yarp//lib/prism/node.rb#8579 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/prism/node.rb#8582 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#8634 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#8585 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8660 + def type; end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8669 +class Prism::LambdaNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://yarp//lib/prism/node.rb#8689 + def initialize(locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8700 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#8686 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8705 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#8754 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#8680 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8718 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8710 + def compact_child_nodes; end + + # def copy: (**params) -> LambdaNode + # + # source://yarp//lib/prism/node.rb#8723 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8705 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8739 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#8758 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#8671 + def locals; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#8749 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#8677 + def opening_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#8744 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#8674 + def operator_loc; end + + # attr_reader parameters: BlockParametersNode? + # + # source://yarp//lib/prism/node.rb#8683 + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8793 + def type; end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# source://yarp//lib/prism/lex_compat.rb#11 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://yarp//lib/prism/lex_compat.rb#555 + def initialize(source, filepath = T.unsafe(nil)); end + + # Returns the value of attribute filepath. + # + # source://yarp//lib/prism/lex_compat.rb#553 + def filepath; end + + # source://yarp//lib/prism/lex_compat.rb#560 + def result; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/lex_compat.rb#553 + def source; end +end + +# Ripper doesn't include the rest of the token in the event, so we need to +# trim it down to just the content on the first line when comparing. +# +# source://yarp//lib/prism/lex_compat.rb#206 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#207 + def ==(other); end +end + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# source://yarp//lib/prism/lex_compat.rb#267 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://yarp//lib/prism/lex_compat.rb#541 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# source://yarp//lib/prism/lex_compat.rb#291 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://yarp//lib/prism/lex_compat.rb#294 + def initialize(split); end + + # source://yarp//lib/prism/lex_compat.rb#299 + def <<(token); end + + # Returns the value of attribute split. + # + # source://yarp//lib/prism/lex_compat.rb#292 + def split; end + + # source://yarp//lib/prism/lex_compat.rb#303 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/prism/lex_compat.rb#292 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# source://yarp//lib/prism/lex_compat.rb#350 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://yarp//lib/prism/lex_compat.rb#355 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://yarp//lib/prism/lex_compat.rb#365 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://yarp//lib/prism/lex_compat.rb#353 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://yarp//lib/prism/lex_compat.rb#353 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://yarp//lib/prism/lex_compat.rb#353 + def embexpr_balance; end + + # source://yarp//lib/prism/lex_compat.rb#397 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/prism/lex_compat.rb#353 + def tokens; end +end + +# source://yarp//lib/prism/lex_compat.rb#351 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# source://yarp//lib/prism/lex_compat.rb#272 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://yarp//lib/prism/lex_compat.rb#275 + def initialize; end + + # source://yarp//lib/prism/lex_compat.rb#279 + def <<(token); end + + # source://yarp//lib/prism/lex_compat.rb#283 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://yarp//lib/prism/lex_compat.rb#273 + def tokens; end +end + +# Ident tokens for the most part are exactly the same, except sometimes we +# know an ident is a local when ripper doesn't (when they are introduced +# through named captures in regular expressions). In that case we don't +# compare the state. +# +# source://yarp//lib/prism/lex_compat.rb#224 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#225 + def ==(other); end +end + +# Tokens where state should be ignored +# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://yarp//lib/prism/lex_compat.rb#214 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#215 + def ==(other); end +end + +# Ignored newlines can occasionally have a LABEL state attached to them, so +# we compare the state differently here. +# +# source://yarp//lib/prism/lex_compat.rb#235 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#236 + def ==(other); end +end + +# If we have an identifier that follows a method name like: +# +# def foo bar +# +# then Ripper will mark bar as END|LABEL if there is a local in a parent +# scope named bar because it hasn't pushed the local table yet. We do this +# more accurately, so we need to allow comparing against both END and +# END|LABEL. +# +# source://yarp//lib/prism/lex_compat.rb#255 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://yarp//lib/prism/lex_compat.rb#256 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# source://yarp//lib/prism/lex_compat.rb#15 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://yarp//lib/prism/lex_compat.rb#186 +class Prism::LexCompat::Token < ::SimpleDelegator + # source://yarp//lib/prism/lex_compat.rb#191 + def event; end + + # source://yarp//lib/prism/lex_compat.rb#187 + def location; end + + # source://yarp//lib/prism/lex_compat.rb#199 + def state; end + + # source://yarp//lib/prism/lex_compat.rb#195 + def value; end +end + +# This is a class that wraps the Ripper lexer to produce almost exactly the +# same tokens. +# +# source://yarp//lib/prism/lex_compat.rb#800 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://yarp//lib/prism/lex_compat.rb#803 + def initialize(source); end + + # source://yarp//lib/prism/lex_compat.rb#807 + def result; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/lex_compat.rb#801 + def source; end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8802 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#8819 + def initialize(name_loc, operator_loc, value, name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8829 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8834 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8844 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8839 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableAndWriteNode + # + # source://yarp//lib/prism/node.rb#8849 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8834 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8864 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#8816 + def depth; end + + # source://yarp//lib/prism/node.rb#8873 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#8813 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#8804 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#8869 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#8807 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#8898 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#8810 + def value; end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#8907 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#8927 + def initialize(name_loc, operator_loc, value, name, operator, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#8938 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8943 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#8953 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#8948 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOperatorWriteNode + # + # source://yarp//lib/prism/node.rb#8958 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#8943 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#8974 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#8924 + def depth; end + + # source://yarp//lib/prism/node.rb#8978 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#8918 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#8909 + def name_loc; end + + # attr_reader operator: Symbol + # + # source://yarp//lib/prism/node.rb#8921 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#8912 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9004 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#8915 + def value; end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9013 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#9030 + def initialize(name_loc, operator_loc, value, name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9040 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9045 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9055 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9050 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOrWriteNode + # + # source://yarp//lib/prism/node.rb#9060 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9045 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9075 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#9027 + def depth; end + + # source://yarp//lib/prism/node.rb#9084 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9024 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#9015 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#9080 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#9018 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9109 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#9021 + def value; end +end + +# Represents reading a local variable. Note that this requires that a local +# variable of the same name has already been written to in the same scope, +# otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# source://yarp//lib/prism/node.rb#9120 +class Prism::LocalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://yarp//lib/prism/node.rb#9128 + def initialize(name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9135 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9140 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9150 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9145 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableReadNode + # + # source://yarp//lib/prism/node.rb#9155 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9140 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9167 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#9125 + def depth; end + + # source://yarp//lib/prism/node.rb#9171 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9122 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9192 + def type; end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# source://yarp//lib/prism/node.rb#9201 +class Prism::LocalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://yarp//lib/prism/node.rb#9209 + def initialize(name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9216 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9221 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9231 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9226 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableTargetNode + # + # source://yarp//lib/prism/node.rb#9236 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9221 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9248 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#9206 + def depth; end + + # source://yarp//lib/prism/node.rb#9252 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9203 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9273 + def type; end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9282 +class Prism::LocalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://yarp//lib/prism/node.rb#9299 + def initialize(name, depth, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9309 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9314 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9324 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9319 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableWriteNode + # + # source://yarp//lib/prism/node.rb#9329 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9314 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9344 + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://yarp//lib/prism/node.rb#9287 + def depth; end + + # source://yarp//lib/prism/node.rb#9353 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9284 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#9290 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#9349 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#9296 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9378 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#9293 + def value; end +end + +# This represents a location in the source. +# +# source://yarp//lib/prism/parse_result.rb#41 +class Prism::Location + # @return [Location] a new instance of Location + # + # source://yarp//lib/prism/parse_result.rb#56 + def initialize(source, start_offset, length); end + + # source://yarp//lib/prism/parse_result.rb#123 + def ==(other); end + + # The list of comments attached to this location + # + # source://yarp//lib/prism/parse_result.rb#54 + def comments; end + + # Create a new location object with the given options. + # + # source://yarp//lib/prism/parse_result.rb#64 + def copy(**options); end + + # source://yarp//lib/prism/parse_result.rb#115 + def deconstruct_keys(keys); end + + # The column number in bytes where this location ends from the start of the + # line. + # + # source://yarp//lib/prism/parse_result.rb#111 + def end_column; end + + # The line number where this location ends. + # + # source://yarp//lib/prism/parse_result.rb#99 + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # source://yarp//lib/prism/parse_result.rb#83 + def end_offset; end + + # Returns a string representation of this location. + # + # source://yarp//lib/prism/parse_result.rb#73 + def inspect; end + + # Returns a new location that stretches from this location to the given + # other location. Raises an error if this location is not before the other + # location or if they don't share the same source. + # + # source://yarp//lib/prism/parse_result.rb#132 + def join(other); end + + # The length of this location in bytes. + # + # source://yarp//lib/prism/parse_result.rb#51 + def length; end + + # source://yarp//lib/prism/parse_result.rb#119 + def pretty_print(q); end + + # The source code that this location represents. + # + # source://yarp//lib/prism/parse_result.rb#78 + def slice; end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://yarp//lib/prism/parse_result.rb#105 + def start_column; end + + # The line number where this location starts. + # + # source://yarp//lib/prism/parse_result.rb#88 + def start_line; end + + # The content of the line where this location starts before this location. + # + # source://yarp//lib/prism/parse_result.rb#93 + def start_line_slice; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # source://yarp//lib/prism/parse_result.rb#48 + def start_offset; end + + protected + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/parse_result.rb#44 + def source; end + + class << self + # source://yarp//lib/prism/parse_result.rb#139 + def null; end + end +end + +# source://yarp//lib/prism/node.rb#14500 +module Prism::LoopFlags; end + +# a loop after a begin statement, so the body is executed first before the condition +# +# source://yarp//lib/prism/node.rb#14502 +Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal used in the predicate of a +# conditional to implicitly match against the last line read by an IO +# object. +# +# if /foo/i then end +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#9389 +class Prism::MatchLastLineNode < ::Prism::Node + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://yarp//lib/prism/node.rb#9406 + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9416 + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9491 + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9421 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#9466 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#9397 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9431 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9426 + def compact_child_nodes; end + + # def content: () -> String + # + # source://yarp//lib/prism/node.rb#9461 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/prism/node.rb#9394 + def content_loc; end + + # def copy: (**params) -> MatchLastLineNode + # + # source://yarp//lib/prism/node.rb#9436 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9421 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9451 + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9486 + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9476 + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9471 + def ignore_case?; end + + # source://yarp//lib/prism/node.rb#9510 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9481 + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9506 + def once?; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#9456 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#9391 + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9535 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#9400 + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9501 + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#9496 + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#9403 + def flags; end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9544 +class Prism::MatchPredicateNode < ::Prism::Node + # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://yarp//lib/prism/node.rb#9555 + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9563 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9568 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9578 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9573 + def compact_child_nodes; end + + # def copy: (**params) -> MatchPredicateNode + # + # source://yarp//lib/prism/node.rb#9583 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9568 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9596 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#9605 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#9601 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#9552 + def operator_loc; end + + # attr_reader pattern: Node + # + # source://yarp//lib/prism/node.rb#9549 + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9629 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#9546 + def value; end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9638 +class Prism::MatchRequiredNode < ::Prism::Node + # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://yarp//lib/prism/node.rb#9649 + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9657 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9662 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9672 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9667 + def compact_child_nodes; end + + # def copy: (**params) -> MatchRequiredNode + # + # source://yarp//lib/prism/node.rb#9677 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9662 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9690 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#9699 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#9695 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#9646 + def operator_loc; end + + # attr_reader pattern: Node + # + # source://yarp//lib/prism/node.rb#9643 + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9723 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#9640 + def value; end +end + +# Represents writing local variables using a regular expression match with +# named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9733 +class Prism::MatchWriteNode < ::Prism::Node + # def initialize: (call: CallNode, locals: Array[Symbol], location: Location) -> void + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://yarp//lib/prism/node.rb#9741 + def initialize(call, locals, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9748 + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://yarp//lib/prism/node.rb#9735 + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9753 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9763 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9758 + def compact_child_nodes; end + + # def copy: (**params) -> MatchWriteNode + # + # source://yarp//lib/prism/node.rb#9768 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9753 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9780 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#9784 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#9738 + def locals; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9806 + def type; end +end + +# Represents a node that is missing from the source and results in a syntax +# error. +# +# source://yarp//lib/prism/node.rb#9813 +class Prism::MissingNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # source://yarp//lib/prism/node.rb#9815 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9820 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9825 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9835 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9830 + def compact_child_nodes; end + + # def copy: (**params) -> MissingNode + # + # source://yarp//lib/prism/node.rb#9840 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9825 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9850 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#9854 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9873 + def type; end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#9882 +class Prism::ModuleNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://yarp//lib/prism/node.rb#9902 + def initialize(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#9913 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#9893 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9918 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#9931 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#9923 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://yarp//lib/prism/node.rb#9890 + def constant_path; end + + # def copy: (**params) -> ModuleNode + # + # source://yarp//lib/prism/node.rb#9936 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#9918 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#9952 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#9962 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#9896 + def end_keyword_loc; end + + # source://yarp//lib/prism/node.rb#9966 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#9884 + def locals; end + + # def module_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#9957 + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#9887 + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#9899 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#9997 + def type; end +end + +# Represents a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^ +# +# source://yarp//lib/prism/node.rb#10006 +class Prism::MultiTargetNode < ::Prism::Node + # def initialize: (targets: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://yarp//lib/prism/node.rb#10017 + def initialize(targets, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10025 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10030 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10040 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10035 + def compact_child_nodes; end + + # def copy: (**params) -> MultiTargetNode + # + # source://yarp//lib/prism/node.rb#10045 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10030 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10058 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10072 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#10063 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#10011 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#10068 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#10014 + def rparen_loc; end + + # attr_reader targets: Array[Node] + # + # source://yarp//lib/prism/node.rb#10008 + def targets; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10094 + def type; end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#10103 +class Prism::MultiWriteNode < ::Prism::Node + # def initialize: (targets: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://yarp//lib/prism/node.rb#10120 + def initialize(targets, lparen_loc, rparen_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10130 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10135 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10145 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10140 + def compact_child_nodes; end + + # def copy: (**params) -> MultiWriteNode + # + # source://yarp//lib/prism/node.rb#10150 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10135 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10165 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10184 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#10170 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#10108 + def lparen_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#10180 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10114 + def operator_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#10175 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#10111 + def rparen_loc; end + + # attr_reader targets: Array[Node] + # + # source://yarp//lib/prism/node.rb#10105 + def targets; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10209 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#10117 + def value; end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://yarp//lib/prism/mutation_compiler.rb#12 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#14 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#19 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#24 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#29 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#34 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#39 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#44 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#49 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#54 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#59 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#64 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#69 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#74 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#79 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#84 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#89 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#94 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#99 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#104 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#109 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#114 + def visit_call_or_write_node(node); end + + # Copy a CapturePatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#119 + def visit_capture_pattern_node(node); end + + # Copy a CaseNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#124 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#129 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#134 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#139 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#144 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#149 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#154 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#159 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#164 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#169 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#174 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#179 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#184 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#189 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#194 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#199 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#204 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#209 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#214 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#219 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#224 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#229 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#234 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#239 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#244 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#249 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#254 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#259 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#264 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#269 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#274 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#279 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#284 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#289 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#294 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#299 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#304 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#309 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#314 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#319 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#324 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#329 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#334 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#339 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#344 + def visit_implicit_node(node); end + + # Copy a InNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#349 + def visit_in_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#354 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#359 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#364 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#369 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#374 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#379 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#384 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#389 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#394 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#399 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#404 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#409 + def visit_interpolated_x_string_node(node); end + + # Copy a KeywordHashNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#414 + def visit_keyword_hash_node(node); end + + # Copy a KeywordParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#419 + def visit_keyword_parameter_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#424 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#429 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#434 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#439 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#444 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#449 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#454 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#459 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#464 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#469 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#474 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#479 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#484 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#489 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#494 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#499 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#504 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#509 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#514 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#519 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#524 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#529 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#534 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#539 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#544 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#549 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#554 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#559 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#564 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#569 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#574 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#579 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#584 + def visit_regular_expression_node(node); end + + # Copy a RequiredDestructuredParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#589 + def visit_required_destructured_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#594 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#599 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#604 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#609 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#614 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#619 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#624 + def visit_self_node(node); end + + # Copy a SingletonClassNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#629 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#634 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#639 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#644 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#649 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#654 + def visit_statements_node(node); end + + # Copy a StringConcatNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#659 + def visit_string_concat_node(node); end + + # Copy a StringNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#664 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#669 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#674 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#679 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#684 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#689 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#694 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#699 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#704 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#709 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://yarp//lib/prism/mutation_compiler.rb#714 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#10218 +class Prism::NextNode < ::Prism::Node + # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void + # + # @return [NextNode] a new instance of NextNode + # + # source://yarp//lib/prism/node.rb#10226 + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10233 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#10220 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10238 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10250 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10243 + def compact_child_nodes; end + + # def copy: (**params) -> NextNode + # + # source://yarp//lib/prism/node.rb#10255 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10238 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10267 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10276 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#10272 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#10223 + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10302 + def type; end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://yarp//lib/prism/node.rb#10311 +class Prism::NilNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [NilNode] a new instance of NilNode + # + # source://yarp//lib/prism/node.rb#10313 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10318 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10323 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10333 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10328 + def compact_child_nodes; end + + # def copy: (**params) -> NilNode + # + # source://yarp//lib/prism/node.rb#10338 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10323 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10348 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10352 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10371 + def type; end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#10381 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://yarp//lib/prism/node.rb#10389 + def initialize(operator_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10396 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10401 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10411 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10406 + def compact_child_nodes; end + + # def copy: (**params) -> NoKeywordsParameterNode + # + # source://yarp//lib/prism/node.rb#10416 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10401 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10428 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10442 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#10438 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#10386 + def keyword_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#10433 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10383 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10463 + def type; end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://yarp//lib/prism/node.rb#11 +class Prism::Node + # Returns the value of attribute location. + # + # source://yarp//lib/prism/node.rb#12 + def location; end + + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#14 + def newline?; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # source://yarp//lib/prism/node.rb#33 + def pretty_print(q); end + + # source://yarp//lib/prism/node.rb#18 + def set_newline_flag(newline_marked); end + + # Slice the location of the node from the source. + # + # source://yarp//lib/prism/node.rb#27 + def slice; end +end + +# This object is responsible for generating the output for the inspect method +# implementations of child nodes. +# +# source://yarp//lib/prism/node_inspector.rb#6 +class Prism::NodeInspector + # @return [NodeInspector] a new instance of NodeInspector + # + # source://yarp//lib/prism/node_inspector.rb#9 + def initialize(prefix = T.unsafe(nil)); end + + # Appends a line to the output with the current prefix. + # + # source://yarp//lib/prism/node_inspector.rb#15 + def <<(line); end + + # Returns a new inspector that can be used to inspect a child node. + # + # source://yarp//lib/prism/node_inspector.rb#59 + def child_inspector(append); end + + # Generates a string that represents a child node. + # + # source://yarp//lib/prism/node_inspector.rb#54 + def child_node(node, append); end + + # This generates a string that is used as the header of the inspect output + # for any given node. + # + # source://yarp//lib/prism/node_inspector.rb#21 + def header(node); end + + # Generates a string that represents a list of nodes. It handles properly + # using the box drawing characters to make the output look nice. + # + # source://yarp//lib/prism/node_inspector.rb#31 + def list(prefix, nodes); end + + # Generates a string that represents a location field on a node. + # + # source://yarp//lib/prism/node_inspector.rb#45 + def location(value); end + + # Returns the value of attribute output. + # + # source://yarp//lib/prism/node_inspector.rb#7 + def output; end + + # Returns the value of attribute prefix. + # + # source://yarp//lib/prism/node_inspector.rb#7 + def prefix; end + + # Returns the output as a string. + # + # source://yarp//lib/prism/node_inspector.rb#64 + def to_str; end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://yarp//lib/prism/node.rb#10472 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # def initialize: (number: Integer, location: Location) -> void + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://yarp//lib/prism/node.rb#10477 + def initialize(number, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10483 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10488 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10498 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10493 + def compact_child_nodes; end + + # def copy: (**params) -> NumberedReferenceReadNode + # + # source://yarp//lib/prism/node.rb#10503 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10488 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10514 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10518 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader number: Integer + # + # source://yarp//lib/prism/node.rb#10474 + def number; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10538 + def type; end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#10548 +class Prism::OptionalParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://yarp//lib/prism/node.rb#10562 + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10571 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10576 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10586 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10581 + def compact_child_nodes; end + + # def copy: (**params) -> OptionalParameterNode + # + # source://yarp//lib/prism/node.rb#10591 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10576 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10605 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10614 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#10550 + def name; end + + # attr_reader name_loc: Location + # + # source://yarp//lib/prism/node.rb#10553 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#10610 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10556 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10638 + def type; end + + # attr_reader value: Node + # + # source://yarp//lib/prism/node.rb#10559 + def value; end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#10647 +class Prism::OrNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [OrNode] a new instance of OrNode + # + # source://yarp//lib/prism/node.rb#10658 + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10666 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10671 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10681 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10676 + def compact_child_nodes; end + + # def copy: (**params) -> OrNode + # + # source://yarp//lib/prism/node.rb#10686 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10671 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10699 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10708 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#10649 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#10704 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10655 + def operator_loc; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#10652 + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10732 + def type; end +end + +# source://yarp//lib/prism/pack.rb#4 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#57 +class Prism::Pack::Directive + # @return [Directive] a new instance of Directive + # + # source://yarp//lib/prism/pack.rb#60 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # source://yarp//lib/prism/pack.rb#98 + def describe; end + + # Returns the value of attribute endian. + # + # source://yarp//lib/prism/pack.rb#58 + def endian; end + + # Returns the value of attribute length. + # + # source://yarp//lib/prism/pack.rb#58 + def length; end + + # Returns the value of attribute length_type. + # + # source://yarp//lib/prism/pack.rb#58 + def length_type; end + + # Returns the value of attribute signed. + # + # source://yarp//lib/prism/pack.rb#58 + def signed; end + + # Returns the value of attribute size. + # + # source://yarp//lib/prism/pack.rb#58 + def size; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/pack.rb#58 + def source; end + + # Returns the value of attribute type. + # + # source://yarp//lib/prism/pack.rb#58 + def type; end + + # Returns the value of attribute variant. + # + # source://yarp//lib/prism/pack.rb#58 + def variant; end + + # Returns the value of attribute version. + # + # source://yarp//lib/prism/pack.rb#58 + def version; end +end + +# source://yarp//lib/prism/pack.rb#72 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://yarp//lib/prism/pack.rb#80 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://yarp//lib/prism/pack.rb#86 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#162 +class Prism::Pack::Format + # @return [Format] a new instance of Format + # + # source://yarp//lib/prism/pack.rb#165 + def initialize(directives, encoding); end + + # source://yarp//lib/prism/pack.rb#170 + def describe; end + + # Returns the value of attribute directives. + # + # source://yarp//lib/prism/pack.rb#163 + def directives; end + + # Returns the value of attribute encoding. + # + # source://yarp//lib/prism/pack.rb#163 + def encoding; end +end + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://yarp//lib/prism/pack.rb#54 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#10742 +class Prism::ParametersNode < ::Prism::Node + # def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://yarp//lib/prism/node.rb#10765 + def initialize(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10777 + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://yarp//lib/prism/node.rb#10762 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10782 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10800 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10787 + def compact_child_nodes; end + + # def copy: (**params) -> ParametersNode + # + # source://yarp//lib/prism/node.rb#10805 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10782 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10822 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10826 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader keyword_rest: Node? + # + # source://yarp//lib/prism/node.rb#10759 + def keyword_rest; end + + # attr_reader keywords: Array[Node] + # + # source://yarp//lib/prism/node.rb#10756 + def keywords; end + + # attr_reader optionals: Array[Node] + # + # source://yarp//lib/prism/node.rb#10747 + def optionals; end + + # attr_reader posts: Array[Node] + # + # source://yarp//lib/prism/node.rb#10753 + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://yarp//lib/prism/node.rb#10744 + def requireds; end + + # attr_reader rest: RestParameterNode? + # + # source://yarp//lib/prism/node.rb#10750 + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10867 + def type; end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#10876 +class Prism::ParenthesesNode < ::Prism::Node + # def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://yarp//lib/prism/node.rb#10887 + def initialize(body, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#10895 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#10878 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10904 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#10944 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#10884 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#10916 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#10909 + def compact_child_nodes; end + + # def copy: (**params) -> ParenthesesNode + # + # source://yarp//lib/prism/node.rb#10921 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#10904 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#10934 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#10948 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#10939 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#10881 + def opening_loc; end + + # source://yarp//lib/prism/node.rb#10899 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#10975 + def type; end +end + +# This represents an error that was encountered during parsing. +# +# source://yarp//lib/prism/parse_result.rb#170 +class Prism::ParseError + # @return [ParseError] a new instance of ParseError + # + # source://yarp//lib/prism/parse_result.rb#173 + def initialize(message, location); end + + # source://yarp//lib/prism/parse_result.rb#178 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/parse_result.rb#182 + def inspect; end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result.rb#171 + def location; end + + # Returns the value of attribute message. + # + # source://yarp//lib/prism/parse_result.rb#171 + def message; end +end + +# This represents the result of a call to ::parse or ::parse_file. It contains +# the AST, any comments that were encounters, and any errors that were +# encountered. +# +# source://yarp//lib/prism/parse_result.rb#208 +class Prism::ParseResult + # @return [ParseResult] a new instance of ParseResult + # + # source://yarp//lib/prism/parse_result.rb#211 + def initialize(value, comments, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://yarp//lib/prism/parse_result/comments.rb#168 + def attach_comments!; end + + # Returns the value of attribute comments. + # + # source://yarp//lib/prism/parse_result.rb#209 + def comments; end + + # source://yarp//lib/prism/parse_result.rb#219 + def deconstruct_keys(keys); end + + # Returns the value of attribute errors. + # + # source://yarp//lib/prism/parse_result.rb#209 + def errors; end + + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result.rb#227 + def failure?; end + + # Walk the tree and mark nodes that are on a new line. + # + # source://yarp//lib/prism/parse_result/newlines.rb#56 + def mark_newlines!; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/parse_result.rb#209 + def source; end + + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result.rb#223 + def success?; end + + # Returns the value of attribute value. + # + # source://yarp//lib/prism/parse_result.rb#209 + def value; end + + # Returns the value of attribute warnings. + # + # source://yarp//lib/prism/parse_result.rb#209 + def warnings; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# source://yarp//lib/prism/parse_result/comments.rb#19 +class Prism::ParseResult::Comments + # @return [Comments] a new instance of Comments + # + # source://yarp//lib/prism/parse_result/comments.rb#75 + def initialize(parse_result); end + + # source://yarp//lib/prism/parse_result/comments.rb#79 + def attach!; end + + # Returns the value of attribute parse_result. + # + # source://yarp//lib/prism/parse_result/comments.rb#73 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://yarp//lib/prism/parse_result/comments.rb#98 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://yarp//lib/prism/parse_result/comments.rb#49 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://yarp//lib/prism/parse_result/comments.rb#52 + def initialize(location); end + + # source://yarp//lib/prism/parse_result/comments.rb#68 + def <<(comment); end + + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result/comments.rb#64 + def encloses?(comment); end + + # source://yarp//lib/prism/parse_result/comments.rb#60 + def end_offset; end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result/comments.rb#50 + def location; end + + # source://yarp//lib/prism/parse_result/comments.rb#56 + def start_offset; end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://yarp//lib/prism/parse_result/comments.rb#22 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://yarp//lib/prism/parse_result/comments.rb#25 + def initialize(node); end + + # source://yarp//lib/prism/parse_result/comments.rb#42 + def <<(comment); end + + # @return [Boolean] + # + # source://yarp//lib/prism/parse_result/comments.rb#37 + def encloses?(comment); end + + # source://yarp//lib/prism/parse_result/comments.rb#33 + def end_offset; end + + # Returns the value of attribute node. + # + # source://yarp//lib/prism/parse_result/comments.rb#23 + def node; end + + # source://yarp//lib/prism/parse_result/comments.rb#29 + def start_offset; end +end + +# The :line tracepoint event gets fired whenever the Ruby VM encounters an +# expression on a new line. The types of expressions that can trigger this +# event are: +# +# * if statements +# * unless statements +# * nodes that are children of statements lists +# +# In order to keep track of the newlines, we have a list of offsets that +# come back from the parser. We assign these offsets to the first nodes that +# we find in the tree that are on those lines. +# +# Note that the logic in this file should be kept in sync with the Java +# MarkNewlinesVisitor, since that visitor is responsible for marking the +# newlines for JRuby/TruffleRuby. +# +# source://yarp//lib/prism/parse_result/newlines.rb#20 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # @return [Newlines] a new instance of Newlines + # + # source://yarp//lib/prism/parse_result/newlines.rb#21 + def initialize(newline_marked); end + + # source://yarp//lib/prism/parse_result/newlines.rb#25 + def visit_block_node(node); end + + # source://yarp//lib/prism/parse_result/newlines.rb#38 + def visit_if_node(node); end + + # source://yarp//lib/prism/parse_result/newlines.rb#25 + def visit_lambda_node(node); end + + # source://yarp//lib/prism/parse_result/newlines.rb#45 + def visit_statements_node(node); end + + # source://yarp//lib/prism/parse_result/newlines.rb#38 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://yarp//lib/prism/parse_result.rb#188 +class Prism::ParseWarning + # @return [ParseWarning] a new instance of ParseWarning + # + # source://yarp//lib/prism/parse_result.rb#191 + def initialize(message, location); end + + # source://yarp//lib/prism/parse_result.rb#196 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/parse_result.rb#200 + def inspect; end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result.rb#189 + def location; end + + # Returns the value of attribute message. + # + # source://yarp//lib/prism/parse_result.rb#189 + def message; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the `ConstantPathNode[...]` expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# source://yarp//lib/prism/pattern.rb#37 +class Prism::Pattern + # @return [Pattern] a new instance of Pattern + # + # source://yarp//lib/prism/pattern.rb#58 + def initialize(query); end + + # source://yarp//lib/prism/pattern.rb#63 + def compile; end + + # Returns the value of attribute query. + # + # source://yarp//lib/prism/pattern.rb#56 + def query; end + + # source://yarp//lib/prism/pattern.rb#68 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://yarp//lib/prism/pattern.rb#84 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://yarp//lib/prism/pattern.rb#90 + def combine_or(left, right); end + + # in foo | bar + # + # source://yarp//lib/prism/pattern.rb#125 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://yarp//lib/prism/pattern.rb#100 + def compile_array_pattern_node(node); end + + # in Prism::ConstantReadNode + # + # source://yarp//lib/prism/pattern.rb#130 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://yarp//lib/prism/pattern.rb#142 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://yarp//lib/prism/pattern.rb#95 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://yarp//lib/prism/pattern.rb#160 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://yarp//lib/prism/pattern.rb#185 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://yarp//lib/prism/pattern.rb#214 + def compile_node(node); end + + # in /foo/ + # + # source://yarp//lib/prism/pattern.rb#190 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://yarp//lib/prism/pattern.rb#198 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://yarp//lib/prism/pattern.rb#206 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://yarp//lib/prism/pattern.rb#40 +class Prism::Pattern::CompilationError < ::StandardError + # @return [CompilationError] a new instance of CompilationError + # + # source://yarp//lib/prism/pattern.rb#41 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a +# pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#10985 +class Prism::PinnedExpressionNode < ::Prism::Node + # def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://yarp//lib/prism/node.rb#10999 + def initialize(expression, operator_loc, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11008 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11013 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11023 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11018 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedExpressionNode + # + # source://yarp//lib/prism/node.rb#11028 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11013 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11042 + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://yarp//lib/prism/node.rb#10987 + def expression; end + + # source://yarp//lib/prism/node.rb#11061 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String + # + # source://yarp//lib/prism/node.rb#11052 + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://yarp//lib/prism/node.rb#10993 + def lparen_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#11047 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#10990 + def operator_loc; end + + # def rparen: () -> String + # + # source://yarp//lib/prism/node.rb#11057 + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://yarp//lib/prism/node.rb#10996 + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11085 + def type; end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern +# matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://yarp//lib/prism/node.rb#11095 +class Prism::PinnedVariableNode < ::Prism::Node + # def initialize: (variable: Node, operator_loc: Location, location: Location) -> void + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://yarp//lib/prism/node.rb#11103 + def initialize(variable, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11110 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11115 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11125 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11120 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedVariableNode + # + # source://yarp//lib/prism/node.rb#11130 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11115 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11142 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11151 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#11147 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#11100 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11173 + def type; end + + # attr_reader variable: Node + # + # source://yarp//lib/prism/node.rb#11097 + def variable; end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#11182 +class Prism::PostExecutionNode < ::Prism::Node + # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://yarp//lib/prism/node.rb#11196 + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11205 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11210 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#11256 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#11193 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11222 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11215 + def compact_child_nodes; end + + # def copy: (**params) -> PostExecutionNode + # + # source://yarp//lib/prism/node.rb#11227 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11210 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11241 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11260 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#11246 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#11187 + def keyword_loc; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#11251 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#11190 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#11184 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11288 + def type; end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#11297 +class Prism::PreExecutionNode < ::Prism::Node + # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://yarp//lib/prism/node.rb#11311 + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11320 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11325 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#11371 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#11308 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11337 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11330 + def compact_child_nodes; end + + # def copy: (**params) -> PreExecutionNode + # + # source://yarp//lib/prism/node.rb#11342 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11325 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11356 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11375 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#11361 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#11302 + def keyword_loc; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#11366 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#11305 + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#11299 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11403 + def type; end +end + +# The top level node of any parse tree. +# +# source://yarp//lib/prism/node.rb#11409 +class Prism::ProgramNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://yarp//lib/prism/node.rb#11417 + def initialize(locals, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11424 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11429 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11439 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11434 + def compact_child_nodes; end + + # def copy: (**params) -> ProgramNode + # + # source://yarp//lib/prism/node.rb#11444 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11429 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11456 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11460 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#11411 + def locals; end + + # attr_reader statements: StatementsNode + # + # source://yarp//lib/prism/node.rb#11414 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11482 + def type; end +end + +# source://yarp//lib/prism/node.rb#14505 +module Prism::RangeFlags; end + +# ... operator +# +# source://yarp//lib/prism/node.rb#14507 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#11494 +class Prism::RangeNode < ::Prism::Node + # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void + # + # @return [RangeNode] a new instance of RangeNode + # + # source://yarp//lib/prism/node.rb#11508 + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11517 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11522 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11535 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11527 + def compact_child_nodes; end + + # def copy: (**params) -> RangeNode + # + # source://yarp//lib/prism/node.rb#11540 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11522 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11554 + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11564 + def exclude_end?; end + + # source://yarp//lib/prism/node.rb#11568 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://yarp//lib/prism/node.rb#11496 + def left; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#11559 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#11502 + def operator_loc; end + + # attr_reader right: Node? + # + # source://yarp//lib/prism/node.rb#11499 + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11602 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#11505 + def flags; end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://yarp//lib/prism/node.rb#11611 +class Prism::RationalNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void + # + # @return [RationalNode] a new instance of RationalNode + # + # source://yarp//lib/prism/node.rb#11616 + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11622 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11627 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11637 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11632 + def compact_child_nodes; end + + # def copy: (**params) -> RationalNode + # + # source://yarp//lib/prism/node.rb#11642 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11627 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11653 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11657 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://yarp//lib/prism/node.rb#11613 + def numeric; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11678 + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://yarp//lib/prism/node_ext.rb#40 + def value; end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://yarp//lib/prism/node.rb#11687 +class Prism::RedoNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [RedoNode] a new instance of RedoNode + # + # source://yarp//lib/prism/node.rb#11689 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11694 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11699 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11709 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11704 + def compact_child_nodes; end + + # def copy: (**params) -> RedoNode + # + # source://yarp//lib/prism/node.rb#11714 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11699 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11724 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11728 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11747 + def type; end +end + +# source://yarp//lib/prism/node.rb#14510 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://yarp//lib/prism/node.rb#14524 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://yarp//lib/prism/node.rb#14521 +Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) + +# x - ignores whitespace and allows comments in regular expressions +# +# source://yarp//lib/prism/node.rb#14515 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://yarp//lib/prism/node.rb#14512 +Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) + +# m - allows $ to match the end of lines within strings +# +# source://yarp//lib/prism/node.rb#14518 +Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) + +# o - only interpolates values into the regular expression once +# +# source://yarp//lib/prism/node.rb#14533 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://yarp//lib/prism/node.rb#14530 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://yarp//lib/prism/node.rb#14527 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://yarp//lib/prism/node.rb#11756 +class Prism::RegularExpressionNode < ::Prism::Node + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://yarp//lib/prism/node.rb#11773 + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11783 + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11858 + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11788 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#11833 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#11764 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11798 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11793 + def compact_child_nodes; end + + # def content: () -> String + # + # source://yarp//lib/prism/node.rb#11828 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/prism/node.rb#11761 + def content_loc; end + + # def copy: (**params) -> RegularExpressionNode + # + # source://yarp//lib/prism/node.rb#11803 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11788 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11818 + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11853 + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11843 + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11838 + def ignore_case?; end + + # source://yarp//lib/prism/node.rb#11877 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11848 + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11873 + def once?; end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#11823 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#11758 + def opening_loc; end + + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://yarp//lib/prism/node_ext.rb#48 + def options; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#11902 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#11767 + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11868 + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#11863 + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#11770 + def flags; end +end + +# Represents a destructured required parameter node. +# +# def foo((bar, baz)) +# ^^^^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#11912 +class Prism::RequiredDestructuredParameterNode < ::Prism::Node + # def initialize: (parameters: Array[Node], opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [RequiredDestructuredParameterNode] a new instance of RequiredDestructuredParameterNode + # + # source://yarp//lib/prism/node.rb#11923 + def initialize(parameters, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#11931 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11936 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#11974 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#11920 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#11946 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#11941 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredDestructuredParameterNode + # + # source://yarp//lib/prism/node.rb#11951 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#11936 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#11964 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#11978 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#11969 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#11917 + def opening_loc; end + + # attr_reader parameters: Array[Node] + # + # source://yarp//lib/prism/node.rb#11914 + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12000 + def type; end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://yarp//lib/prism/node.rb#12010 +class Prism::RequiredParameterNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://yarp//lib/prism/node.rb#12015 + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12021 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12026 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12036 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12031 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredParameterNode + # + # source://yarp//lib/prism/node.rb#12041 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12026 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12052 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12056 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://yarp//lib/prism/node.rb#12012 + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12076 + def type; end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12085 +class Prism::RescueModifierNode < ::Prism::Node + # def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://yarp//lib/prism/node.rb#12096 + def initialize(expression, keyword_loc, rescue_expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12104 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12113 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12123 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12118 + def compact_child_nodes; end + + # def copy: (**params) -> RescueModifierNode + # + # source://yarp//lib/prism/node.rb#12128 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12113 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12141 + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://yarp//lib/prism/node.rb#12087 + def expression; end + + # source://yarp//lib/prism/node.rb#12150 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12146 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12090 + def keyword_loc; end + + # attr_reader rescue_expression: Node + # + # source://yarp//lib/prism/node.rb#12093 + def rescue_expression; end + + # source://yarp//lib/prism/node.rb#12108 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12174 + def type; end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# ^^^^^^ +# foo +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. +# `ex` is in the `exception` field. +# +# source://yarp//lib/prism/node.rb#12189 +class Prism::RescueNode < ::Prism::Node + # def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void + # + # @return [RescueNode] a new instance of RescueNode + # + # source://yarp//lib/prism/node.rb#12209 + def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12220 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12225 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12240 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12230 + def compact_child_nodes; end + + # attr_reader consequent: RescueNode? + # + # source://yarp//lib/prism/node.rb#12206 + def consequent; end + + # def copy: (**params) -> RescueNode + # + # source://yarp//lib/prism/node.rb#12245 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12225 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12261 + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Node] + # + # source://yarp//lib/prism/node.rb#12194 + def exceptions; end + + # source://yarp//lib/prism/node.rb#12275 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12266 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12191 + def keyword_loc; end + + # def operator: () -> String? + # + # source://yarp//lib/prism/node.rb#12271 + def operator; end + + # attr_reader operator_loc: Location? + # + # source://yarp//lib/prism/node.rb#12197 + def operator_loc; end + + # attr_reader reference: Node? + # + # source://yarp//lib/prism/node.rb#12200 + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#12203 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12315 + def type; end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://yarp//lib/prism/node.rb#12325 +class Prism::RestParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://yarp//lib/prism/node.rb#12336 + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12344 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12349 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12359 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12354 + def compact_child_nodes; end + + # def copy: (**params) -> RestParameterNode + # + # source://yarp//lib/prism/node.rb#12364 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12349 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12377 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12386 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://yarp//lib/prism/node.rb#12327 + def name; end + + # attr_reader name_loc: Location? + # + # source://yarp//lib/prism/node.rb#12330 + def name_loc; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#12382 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#12333 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12408 + def type; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#12417 +class Prism::RetryNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # source://yarp//lib/prism/node.rb#12419 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12424 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12429 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12439 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12434 + def compact_child_nodes; end + + # def copy: (**params) -> RetryNode + # + # source://yarp//lib/prism/node.rb#12444 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12429 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12454 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12458 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12477 + def type; end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12486 +class Prism::ReturnNode < ::Prism::Node + # def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://yarp//lib/prism/node.rb#12494 + def initialize(keyword_loc, arguments, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12501 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#12491 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12506 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12518 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12511 + def compact_child_nodes; end + + # def copy: (**params) -> ReturnNode + # + # source://yarp//lib/prism/node.rb#12523 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12506 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12535 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12544 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12540 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12488 + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12570 + def type; end +end + +# This class is meant to provide a compatibility layer between prism and +# Ripper. It functions by parsing the entire tree first and then walking it +# and executing each of the Ripper callbacks as it goes. +# +# This class is going to necessarily be slower than the native Ripper API. It +# is meant as a stopgap until developers migrate to using prism. It is also +# meant as a test harness for the prism parser. +# +# source://yarp//lib/prism/ripper_compat.rb#13 +class Prism::RipperCompat + # @return [RipperCompat] a new instance of RipperCompat + # + # source://yarp//lib/prism/ripper_compat.rb#59 + def initialize(source); end + + # Returns the value of attribute column. + # + # source://yarp//lib/prism/ripper_compat.rb#57 + def column; end + + # Public interface + # + # @return [Boolean] + # + # source://yarp//lib/prism/ripper_compat.rb#70 + def error?; end + + # Returns the value of attribute lineno. + # + # source://yarp//lib/prism/ripper_compat.rb#57 + def lineno; end + + # source://yarp//lib/prism/ripper_compat.rb#74 + def parse; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/ripper_compat.rb#57 + def source; end + + # Visitor methods + # + # source://yarp//lib/prism/ripper_compat.rb#82 + def visit(node); end + + # source://yarp//lib/prism/ripper_compat.rb#86 + def visit_call_node(node); end + + # source://yarp//lib/prism/ripper_compat.rb#100 + def visit_integer_node(node); end + + # source://yarp//lib/prism/ripper_compat.rb#125 + def visit_program_node(node); end + + # source://yarp//lib/prism/ripper_compat.rb#105 + def visit_statements_node(node); end + + # source://yarp//lib/prism/ripper_compat.rb#112 + def visit_token(node); end + + private + + # source://yarp//lib/prism/ripper_compat.rb#162 + def _dispatch0; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def _dispatch1(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def _dispatch2(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def _dispatch3(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def _dispatch4(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#167 + def _dispatch5(_, _, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#168 + def _dispatch7(_, _, _, _, _, _, _); end + + # This method is responsible for updating lineno and column information + # to reflect the current node. + # + # This method could be drastically improved with some caching on the start + # of every line, but for now it's good enough. + # + # source://yarp//lib/prism/ripper_compat.rb#151 + def bounds(location); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_BEGIN(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_CHAR(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_END(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on___end__(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_alias(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_alias_error(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_aref(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_aref_field(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_arg_ambiguous(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_arg_paren(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_args_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_args_add_block(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_args_add_star(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_args_forward; end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_args_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_array(_); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_aryptn(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_assign(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_assign_error(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_assoc_new(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_assoc_splat(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_assoclist_from_args(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_backref(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_backtick(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_bare_assoc_hash(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_begin(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_binary(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_block_var(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_blockarg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_bodystmt(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_brace_block(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_break(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_call(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_case(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_class(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_class_name_error(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_comma(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_command(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_command_call(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_comment(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_const(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_const_path_field(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_const_path_ref(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_const_ref(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_cvar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_def(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_defined(_); end + + # source://yarp//lib/prism/ripper_compat.rb#167 + def on_defs(_, _, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_do_block(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_dot2(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_dot3(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_dyna_symbol(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_else(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_elsif(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embdoc(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embdoc_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embdoc_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embexpr_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embexpr_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_embvar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ensure(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_excessed_comma; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_fcall(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_field(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_float(_); end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_fndptn(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_for(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_gvar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_hash(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_heredoc_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_heredoc_dedent(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_heredoc_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_hshptn(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ident(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_if(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_if_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_ifop(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ignored_nl(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ignored_sp(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_imaginary(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_in(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_int(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_ivar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_kw(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_kwrest_param(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_label(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_label_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_lambda(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_lbrace(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_lbracket(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_lparen(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_magic_comment(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_massign(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_method_add_arg(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_method_add_block(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mlhs_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mlhs_add_post(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mlhs_add_star(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_mlhs_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_mlhs_paren(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_module(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mrhs_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_mrhs_add_star(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_mrhs_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_mrhs_new_from_args(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_next(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_nl(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_nokw_param(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_op(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_opassign(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_operator_ambiguous(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_param_error(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#168 + def on_params(_, _, _, _, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_paren(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_parse_error(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_period(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_program(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_qsymbols_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_qsymbols_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_qsymbols_new; end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_qwords_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_qwords_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_qwords_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rational(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rbrace(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rbracket(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_redo; end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_regexp_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_regexp_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_regexp_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_regexp_literal(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_regexp_new; end + + # source://yarp//lib/prism/ripper_compat.rb#166 + def on_rescue(_, _, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_rescue_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rest_param(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_retry; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_return(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_return0; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_rparen(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_sclass(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_semicolon(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_sp(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_stmts_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_stmts_new; end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_string_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_string_concat(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_string_content; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_string_dvar(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_string_embexpr(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_string_literal(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_super(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_symbeg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_symbol(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_symbol_literal(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_symbols_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_symbols_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_symbols_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tlambda(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tlambeg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_top_const_field(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_top_const_ref(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tstring_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tstring_content(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_tstring_end(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_unary(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_undef(_); end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_unless(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_unless_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_until(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_until_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_var_alias(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_var_field(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_var_ref(_); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_vcall(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_void_stmt; end + + # source://yarp//lib/prism/ripper_compat.rb#165 + def on_when(_, _, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_while(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_while_mod(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_word_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_word_new; end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_words_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_words_beg(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_words_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_words_sep(_); end + + # source://yarp//lib/prism/ripper_compat.rb#164 + def on_xstring_add(_, _); end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_xstring_literal(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_xstring_new; end + + # source://yarp//lib/prism/ripper_compat.rb#163 + def on_yield(_); end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_yield0; end + + # source://yarp//lib/prism/ripper_compat.rb#162 + def on_zsuper; end + + # source://yarp//lib/prism/ripper_compat.rb#158 + def result; end + + class << self + # This is a convenience method that runs the SexpBuilderPP subclass parser. + # + # source://yarp//lib/prism/ripper_compat.rb#140 + def sexp(source); end + + # This is a convenience method that runs the SexpBuilder subclass parser. + # + # source://yarp//lib/prism/ripper_compat.rb#135 + def sexp_raw(source); end + end +end + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://yarp//lib/prism/ripper_compat.rb#16 +class Prism::RipperCompat::SexpBuilder < ::Prism::RipperCompat + private + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_BEGIN(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_CHAR(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_END(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on___end__(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_alias(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_alias_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_aref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_aref_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_arg_ambiguous(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_arg_paren(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_add_block(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_add_star(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_forward(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_args_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_array(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_aryptn(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assign(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assign_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assoc_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assoc_splat(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_assoclist_from_args(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_backref(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_backtick(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_bare_assoc_hash(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_begin(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_binary(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_block_var(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_blockarg(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_bodystmt(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_brace_block(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_break(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_call(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_case(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_class(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_class_name_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_comma(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_command(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_command_call(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_comment(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_const(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_const_path_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_const_path_ref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_const_ref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_cvar(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_def(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_defined(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_defs(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_do_block(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_dot2(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_dot3(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_dyna_symbol(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_else(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_elsif(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embdoc(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embdoc_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embdoc_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embexpr_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embexpr_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_embvar(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_ensure(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_excessed_comma(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_fcall(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_float(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_fndptn(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_for(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_gvar(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_hash(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_heredoc_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_heredoc_dedent(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_heredoc_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_hshptn(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_ident(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_if(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_if_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_ifop(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_ignored_nl(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_ignored_sp(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_imaginary(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_in(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_int(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_ivar(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_kw(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_kwrest_param(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_label(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_label_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_lambda(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_lbrace(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_lbracket(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_lparen(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_magic_comment(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_massign(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_method_add_arg(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_method_add_block(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_add_post(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_add_star(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mlhs_paren(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_module(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mrhs_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mrhs_add_star(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mrhs_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_mrhs_new_from_args(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_next(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_nl(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_nokw_param(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_op(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_opassign(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_operator_ambiguous(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_param_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_params(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_paren(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_parse_error(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_period(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_program(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_qsymbols_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_qsymbols_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_qsymbols_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_qwords_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_qwords_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_qwords_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_rational(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_rbrace(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_rbracket(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_redo(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_regexp_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_regexp_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_regexp_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_regexp_literal(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_regexp_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_rescue(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_rescue_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_rest_param(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_retry(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_return(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_return0(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_rparen(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_sclass(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_semicolon(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_sp(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_stmts_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_stmts_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_concat(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_content(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_dvar(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_embexpr(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_string_literal(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_super(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_symbeg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_symbol(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_symbol_literal(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_symbols_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_symbols_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_symbols_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tlambda(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tlambeg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_top_const_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_top_const_ref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tstring_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tstring_content(value); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_tstring_end(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_unary(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_undef(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_unless(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_unless_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_until(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_until_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_var_alias(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_var_field(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_var_ref(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_vcall(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_void_stmt(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_when(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_while(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_while_mod(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_word_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_word_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_words_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_words_beg(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_words_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#26 + def on_words_sep(value); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_xstring_add(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_xstring_literal(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_xstring_new(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_yield(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_yield0(*args); end + + # source://yarp//lib/prism/ripper_compat.rb#20 + def on_zsuper(*args); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://yarp//lib/prism/ripper_compat.rb#35 +class Prism::RipperCompat::SexpBuilderPP < ::Prism::RipperCompat::SexpBuilder + private + + # source://yarp//lib/prism/ripper_compat.rb#38 + def _dispatch_event_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def _dispatch_event_push(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_args_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_args_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_mlhs_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_mlhs_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_mrhs_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_mrhs_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_qsymbols_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_qsymbols_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_qwords_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_qwords_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_regexp_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_regexp_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_stmts_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_stmts_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_string_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_symbols_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_symbols_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_word_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_word_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_words_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_words_new; end + + # source://yarp//lib/prism/ripper_compat.rb#42 + def on_xstring_add(list, item); end + + # source://yarp//lib/prism/ripper_compat.rb#38 + def on_xstring_new; end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://yarp//lib/prism/node.rb#12579 +class Prism::SelfNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SelfNode] a new instance of SelfNode + # + # source://yarp//lib/prism/node.rb#12581 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12586 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12591 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12601 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12596 + def compact_child_nodes; end + + # def copy: (**params) -> SelfNode + # + # source://yarp//lib/prism/node.rb#12606 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12591 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12616 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12620 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12639 + def type; end +end + +# source://yarp//lib/prism/serialize.rb#22 +module Prism::Serialize + class << self + # source://yarp//lib/prism/serialize.rb#27 + def load(input, serialized); end + + # source://yarp//lib/prism/serialize.rb#37 + def load_tokens(source, serialized); end + end +end + +# source://yarp//lib/prism/serialize.rb#41 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://yarp//lib/prism/serialize.rb#45 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://yarp//lib/prism/serialize.rb#43 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://yarp//lib/prism/serialize.rb#43 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://yarp//lib/prism/serialize.rb#42 + def encoding; end + + # Returns the value of attribute input. + # + # source://yarp//lib/prism/serialize.rb#42 + def input; end + + # Returns the value of attribute io. + # + # source://yarp//lib/prism/serialize.rb#42 + def io; end + + # source://yarp//lib/prism/serialize.rb#59 + def load_encoding; end + + # source://yarp//lib/prism/serialize.rb#63 + def load_metadata; end + + # source://yarp//lib/prism/serialize.rb#96 + def load_nodes; end + + # source://yarp//lib/prism/serialize.rb#115 + def load_result; end + + # source://yarp//lib/prism/serialize.rb#70 + def load_tokens; end + + # source://yarp//lib/prism/serialize.rb#83 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://yarp//lib/prism/serialize.rb#42 + def serialized; end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/serialize.rb#43 + def source; end + + private + + # source://yarp//lib/prism/serialize.rb#172 + def load_constant(index); end + + # source://yarp//lib/prism/serialize.rb#149 + def load_embedded_string; end + + # source://yarp//lib/prism/serialize.rb#164 + def load_location; end + + # source://yarp//lib/prism/serialize.rb#202 + def load_node; end + + # source://yarp//lib/prism/serialize.rb#197 + def load_optional_constant; end + + # source://yarp//lib/prism/serialize.rb#168 + def load_optional_location; end + + # source://yarp//lib/prism/serialize.rb#142 + def load_optional_node; end + + # source://yarp//lib/prism/serialize.rb#193 + def load_required_constant; end + + # source://yarp//lib/prism/serialize.rb#138 + def load_serialized_length; end + + # source://yarp//lib/prism/serialize.rb#153 + def load_string; end + + # variable-length integer using https://en.wikipedia.org/wiki/LEB128 + # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints + # + # source://yarp//lib/prism/serialize.rb#124 + def load_varint; end +end + +# source://yarp//lib/prism/serialize.rb#23 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# source://yarp//lib/prism/serialize.rb#24 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# source://yarp//lib/prism/serialize.rb#25 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# source://yarp//lib/prism/serialize.rb#494 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12648 +class Prism::SingletonClassNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://yarp//lib/prism/node.rb#12668 + def initialize(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12679 + def accept(visitor); end + + # attr_reader body: Node? + # + # source://yarp//lib/prism/node.rb#12662 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12684 + def child_nodes; end + + # def class_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12723 + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12653 + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12697 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12689 + def compact_child_nodes; end + + # def copy: (**params) -> SingletonClassNode + # + # source://yarp//lib/prism/node.rb#12702 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12684 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12718 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://yarp//lib/prism/node.rb#12733 + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#12665 + def end_keyword_loc; end + + # attr_reader expression: Node + # + # source://yarp//lib/prism/node.rb#12659 + def expression; end + + # source://yarp//lib/prism/node.rb#12737 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://yarp//lib/prism/node.rb#12650 + def locals; end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#12728 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#12656 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12768 + def type; end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://yarp//lib/prism/parse_result.rb#7 +class Prism::Source + # @return [Source] a new instance of Source + # + # source://yarp//lib/prism/parse_result.rb#10 + def initialize(source, offsets = T.unsafe(nil)); end + + # source://yarp//lib/prism/parse_result.rb#27 + def column(value); end + + # source://yarp//lib/prism/parse_result.rb#19 + def line(value); end + + # source://yarp//lib/prism/parse_result.rb#23 + def line_offset(value); end + + # Returns the value of attribute offsets. + # + # source://yarp//lib/prism/parse_result.rb#8 + def offsets; end + + # source://yarp//lib/prism/parse_result.rb#15 + def slice(offset, length); end + + # Returns the value of attribute source. + # + # source://yarp//lib/prism/parse_result.rb#8 + def source; end + + private + + # source://yarp//lib/prism/parse_result.rb#33 + def compute_offsets(code); end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12777 +class Prism::SourceEncodingNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://yarp//lib/prism/node.rb#12779 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12784 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12789 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12799 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12794 + def compact_child_nodes; end + + # def copy: (**params) -> SourceEncodingNode + # + # source://yarp//lib/prism/node.rb#12804 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12789 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12814 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12818 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12837 + def type; end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12846 +class Prism::SourceFileNode < ::Prism::Node + # def initialize: (filepath: String, location: Location) -> void + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://yarp//lib/prism/node.rb#12851 + def initialize(filepath, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12857 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12862 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12872 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12867 + def compact_child_nodes; end + + # def copy: (**params) -> SourceFileNode + # + # source://yarp//lib/prism/node.rb#12877 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12862 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12888 + def deconstruct_keys(keys); end + + # attr_reader filepath: String + # + # source://yarp//lib/prism/node.rb#12848 + def filepath; end + + # source://yarp//lib/prism/node.rb#12892 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12912 + def type; end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#12921 +class Prism::SourceLineNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://yarp//lib/prism/node.rb#12923 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#12928 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12933 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#12943 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#12938 + def compact_child_nodes; end + + # def copy: (**params) -> SourceLineNode + # + # source://yarp//lib/prism/node.rb#12948 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#12933 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#12958 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#12962 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#12981 + def type; end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://yarp//lib/prism/node.rb#12990 +class Prism::SplatNode < ::Prism::Node + # def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void + # + # @return [SplatNode] a new instance of SplatNode + # + # source://yarp//lib/prism/node.rb#12998 + def initialize(operator_loc, expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13005 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13010 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13022 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13015 + def compact_child_nodes; end + + # def copy: (**params) -> SplatNode + # + # source://yarp//lib/prism/node.rb#13027 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13010 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13039 + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://yarp//lib/prism/node.rb#12995 + def expression; end + + # source://yarp//lib/prism/node.rb#13048 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://yarp//lib/prism/node.rb#13044 + def operator; end + + # attr_reader operator_loc: Location + # + # source://yarp//lib/prism/node.rb#12992 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13074 + def type; end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13083 +class Prism::StatementsNode < ::Prism::Node + # def initialize: (body: Array[Node], location: Location) -> void + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://yarp//lib/prism/node.rb#13088 + def initialize(body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13094 + def accept(visitor); end + + # attr_reader body: Array[Node] + # + # source://yarp//lib/prism/node.rb#13085 + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13099 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13109 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13104 + def compact_child_nodes; end + + # def copy: (**params) -> StatementsNode + # + # source://yarp//lib/prism/node.rb#13114 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13099 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13125 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13129 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13149 + def type; end +end + +# Represents the use of compile-time string concatenation. +# +# "foo" "bar" +# ^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13158 +class Prism::StringConcatNode < ::Prism::Node + # def initialize: (left: Node, right: Node, location: Location) -> void + # + # @return [StringConcatNode] a new instance of StringConcatNode + # + # source://yarp//lib/prism/node.rb#13166 + def initialize(left, right, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13173 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13178 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13188 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13183 + def compact_child_nodes; end + + # def copy: (**params) -> StringConcatNode + # + # source://yarp//lib/prism/node.rb#13193 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13178 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13205 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13209 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://yarp//lib/prism/node.rb#13160 + def left; end + + # attr_reader right: Node + # + # source://yarp//lib/prism/node.rb#13163 + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13232 + def type; end +end + +# source://yarp//lib/prism/node.rb#14536 +module Prism::StringFlags; end + +# frozen by virtue of a frozen_string_literal comment +# +# source://yarp//lib/prism/node.rb#14538 +Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# Represents a string literal, a string contained within a `%w` list, or +# plain string content within an interpolated string. +# +# "foo" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# source://yarp//lib/prism/node.rb#13248 +class Prism::StringNode < ::Prism::Node + # def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void + # + # @return [StringNode] a new instance of StringNode + # + # source://yarp//lib/prism/node.rb#13265 + def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13275 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13280 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#13330 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#13259 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13290 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13285 + def compact_child_nodes; end + + # def content: () -> String + # + # source://yarp//lib/prism/node.rb#13325 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/prism/node.rb#13256 + def content_loc; end + + # def copy: (**params) -> StringNode + # + # source://yarp//lib/prism/node.rb#13295 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13280 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13310 + def deconstruct_keys(keys); end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#13315 + def frozen?; end + + # source://yarp//lib/prism/node.rb#13334 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#13320 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#13253 + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13359 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#13262 + def unescaped; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#13250 + def flags; end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13371 +class Prism::SuperNode < ::Prism::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void + # + # @return [SuperNode] a new instance of SuperNode + # + # source://yarp//lib/prism/node.rb#13388 + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13398 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#13379 + def arguments; end + + # attr_reader block: Node? + # + # source://yarp//lib/prism/node.rb#13385 + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13403 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13416 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13408 + def compact_child_nodes; end + + # def copy: (**params) -> SuperNode + # + # source://yarp//lib/prism/node.rb#13421 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13403 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13436 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13455 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#13441 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#13373 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#13446 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#13376 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#13451 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#13382 + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13489 + def type; end +end + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://yarp//lib/prism/node.rb#13501 +class Prism::SymbolNode < ::Prism::Node + # def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://yarp//lib/prism/node.rb#13515 + def initialize(opening_loc, value_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13524 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13529 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#13573 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#13509 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13539 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13534 + def compact_child_nodes; end + + # def copy: (**params) -> SymbolNode + # + # source://yarp//lib/prism/node.rb#13544 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13529 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13558 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13577 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://yarp//lib/prism/node.rb#13563 + def opening; end + + # attr_reader opening_loc: Location? + # + # source://yarp//lib/prism/node.rb#13503 + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13600 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#13512 + def unescaped; end + + # def value: () -> String? + # + # source://yarp//lib/prism/node.rb#13568 + def value; end + + # attr_reader value_loc: Location? + # + # source://yarp//lib/prism/node.rb#13506 + def value_loc; end +end + +# This represents a token from the Ruby source. +# +# source://yarp//lib/prism/parse_result.rb#233 +class Prism::Token + # @return [Token] a new instance of Token + # + # source://yarp//lib/prism/parse_result.rb#236 + def initialize(type, value, location); end + + # source://yarp//lib/prism/parse_result.rb#260 + def ==(other); end + + # source://yarp//lib/prism/parse_result.rb#242 + def deconstruct_keys(keys); end + + # Returns the value of attribute location. + # + # source://yarp//lib/prism/parse_result.rb#234 + def location; end + + # source://yarp//lib/prism/parse_result.rb#246 + def pretty_print(q); end + + # Returns the value of attribute type. + # + # source://yarp//lib/prism/parse_result.rb#234 + def type; end + + # Returns the value of attribute value. + # + # source://yarp//lib/prism/parse_result.rb#234 + def value; end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://yarp//lib/prism/node.rb#13609 +class Prism::TrueNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # source://yarp//lib/prism/node.rb#13611 + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13616 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13621 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13631 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13626 + def compact_child_nodes; end + + # def copy: (**params) -> TrueNode + # + # source://yarp//lib/prism/node.rb#13636 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13621 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13646 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13650 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13669 + def type; end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13678 +class Prism::UndefNode < ::Prism::Node + # def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void + # + # @return [UndefNode] a new instance of UndefNode + # + # source://yarp//lib/prism/node.rb#13686 + def initialize(names, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13693 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13698 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13708 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13703 + def compact_child_nodes; end + + # def copy: (**params) -> UndefNode + # + # source://yarp//lib/prism/node.rb#13713 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13698 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13725 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13734 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#13730 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#13683 + def keyword_loc; end + + # attr_reader names: Array[Node] + # + # source://yarp//lib/prism/node.rb#13680 + def names; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13755 + def type; end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13767 +class Prism::UnlessNode < ::Prism::Node + # def initialize: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://yarp//lib/prism/node.rb#13784 + def initialize(keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13794 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13803 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13817 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13808 + def compact_child_nodes; end + + # attr_reader consequent: ElseNode? + # + # source://yarp//lib/prism/node.rb#13778 + def consequent; end + + # def copy: (**params) -> UnlessNode + # + # source://yarp//lib/prism/node.rb#13822 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13803 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13837 + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://yarp//lib/prism/node.rb#13847 + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://yarp//lib/prism/node.rb#13781 + def end_keyword_loc; end + + # source://yarp//lib/prism/node.rb#13851 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#13842 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#13769 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/prism/node.rb#13772 + def predicate; end + + # source://yarp//lib/prism/node.rb#13798 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#13775 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#13886 + def type; end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#13898 +class Prism::UntilNode < ::Prism::Node + # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void + # + # @return [UntilNode] a new instance of UntilNode + # + # source://yarp//lib/prism/node.rb#13915 + def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#13925 + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#13982 + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13934 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#13977 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#13903 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#13947 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#13939 + def compact_child_nodes; end + + # def copy: (**params) -> UntilNode + # + # source://yarp//lib/prism/node.rb#13952 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#13934 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#13967 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#13986 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#13972 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#13900 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/prism/node.rb#13906 + def predicate; end + + # source://yarp//lib/prism/node.rb#13929 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#13909 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#14017 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#13912 + def flags; end +end + +# The version constant is set by reading the result of calling pm_version. +Prism::VERSION = T.let(T.unsafe(nil), String) + +# A visitor is a class that provides a default implementation for every accept +# method defined on the nodes. This means it can walk a tree without the +# caller needing to define any special handling. This allows you to handle a +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == "foo" +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# source://yarp//lib/prism/visitor.rb#46 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_call_or_write_node(node); end + + # Visit a CapturePatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_capture_pattern_node(node); end + + # Visit a CaseNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_implicit_node(node); end + + # Visit a InNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_in_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_keyword_hash_node(node); end + + # Visit a KeywordParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_keyword_parameter_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_regular_expression_node(node); end + + # Visit a RequiredDestructuredParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_required_destructured_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_self_node(node); end + + # Visit a SingletonClassNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_statements_node(node); end + + # Visit a StringConcatNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_string_concat_node(node); end + + # Visit a StringNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://yarp//lib/prism/visitor.rb#22 + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://yarp//lib/prism/node.rb#14028 +class Prism::WhenNode < ::Prism::Node + # def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void + # + # @return [WhenNode] a new instance of WhenNode + # + # source://yarp//lib/prism/node.rb#14039 + def initialize(keyword_loc, conditions, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#14047 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14052 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#14065 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#14057 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://yarp//lib/prism/node.rb#14033 + def conditions; end + + # def copy: (**params) -> WhenNode + # + # source://yarp//lib/prism/node.rb#14070 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14052 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#14083 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#14092 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#14088 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#14030 + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#14036 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#14119 + def type; end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://yarp//lib/prism/node.rb#14131 +class Prism::WhileNode < ::Prism::Node + # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void + # + # @return [WhileNode] a new instance of WhileNode + # + # source://yarp//lib/prism/node.rb#14148 + def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#14158 + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://yarp//lib/prism/node.rb#14215 + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14167 + def child_nodes; end + + # def closing: () -> String? + # + # source://yarp//lib/prism/node.rb#14210 + def closing; end + + # attr_reader closing_loc: Location? + # + # source://yarp//lib/prism/node.rb#14136 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#14180 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#14172 + def compact_child_nodes; end + + # def copy: (**params) -> WhileNode + # + # source://yarp//lib/prism/node.rb#14185 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14167 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#14200 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#14219 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#14205 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#14133 + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://yarp//lib/prism/node.rb#14139 + def predicate; end + + # source://yarp//lib/prism/node.rb#14162 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://yarp//lib/prism/node.rb#14142 + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#14250 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://yarp//lib/prism/node.rb#14145 + def flags; end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://yarp//lib/prism/node.rb#14259 +class Prism::XStringNode < ::Prism::Node + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void + # + # @return [XStringNode] a new instance of XStringNode + # + # source://yarp//lib/prism/node.rb#14273 + def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#14282 + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14287 + def child_nodes; end + + # def closing: () -> String + # + # source://yarp//lib/prism/node.rb#14331 + def closing; end + + # attr_reader closing_loc: Location + # + # source://yarp//lib/prism/node.rb#14267 + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#14297 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#14292 + def compact_child_nodes; end + + # def content: () -> String + # + # source://yarp//lib/prism/node.rb#14326 + def content; end + + # attr_reader content_loc: Location + # + # source://yarp//lib/prism/node.rb#14264 + def content_loc; end + + # def copy: (**params) -> XStringNode + # + # source://yarp//lib/prism/node.rb#14302 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14287 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#14316 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#14335 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://yarp//lib/prism/node.rb#14321 + def opening; end + + # attr_reader opening_loc: Location + # + # source://yarp//lib/prism/node.rb#14261 + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#14358 + def type; end + + # attr_reader unescaped: String + # + # source://yarp//lib/prism/node.rb#14270 + def unescaped; end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://yarp//lib/prism/node.rb#14367 +class Prism::YieldNode < ::Prism::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void + # + # @return [YieldNode] a new instance of YieldNode + # + # source://yarp//lib/prism/node.rb#14381 + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://yarp//lib/prism/node.rb#14390 + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://yarp//lib/prism/node.rb#14375 + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14395 + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://yarp//lib/prism/node.rb#14407 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://yarp//lib/prism/node.rb#14400 + def compact_child_nodes; end + + # def copy: (**params) -> YieldNode + # + # source://yarp//lib/prism/node.rb#14412 + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://yarp//lib/prism/node.rb#14395 + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://yarp//lib/prism/node.rb#14426 + def deconstruct_keys(keys); end + + # source://yarp//lib/prism/node.rb#14445 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://yarp//lib/prism/node.rb#14431 + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://yarp//lib/prism/node.rb#14369 + def keyword_loc; end + + # def lparen: () -> String? + # + # source://yarp//lib/prism/node.rb#14436 + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#14372 + def lparen_loc; end + + # def rparen: () -> String? + # + # source://yarp//lib/prism/node.rb#14441 + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://yarp//lib/prism/node.rb#14378 + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://yarp//lib/prism/node.rb#14473 + def type; end +end + +# source://yarp//lib/yarp.rb#4 +YARP = Prism